Skip to main content

Customer satisfaction

Project description

Add a form (viewlet) for the customer satisfaction on site contents.

Users can add a vote (positive or negative) and a comment to every page on the site.

Review

Captcha protection

This product can use collective.recaptcha or just an environment variable (RECAPTCHA_PRIVATE_KEY) to recaptcha validation.

collective.recaptcha usage is the preferred one for classic Plone because it’s used in the viewlet.

For Volto integration, we need to use recaptcha v3, so we can’t use collective.recaptcha right now.

You just need to set and environment variable RECAPTCHA_PRIVATE_KEY with the private key value.

The default is without collective.recaptcha.

If you want to add it, you need to add the extra required part (see Installation section).

After installing it, you need to setup proper keys into its control panel.

Permissions

There are two new specific permission:

  • rer.customersatisfaction.AddCustomerSatisfactionVote (rer.customersatisfaction: Add Customer Satisfaction Vote) Allows users to vote (by default Anonymous).

  • rer.customersatisfaction.ManageCustomerSatisfaction (rer.customersatisfaction: Manage Customer Satisfaction) Allows to reset data (by default Manager and Site Administrator).

  • rer.customersatisfaction.ShowDeletedFeedbacks (rer.customersatisfaction: Show Deleted Feedbacks) Allow list also feedbacks from deleted contents (by default Manager and Site Administrator)

  • rer.customersatisfaction.AccessCustomerSatisfaction (rer.customersatisfaction: Access Customer Satisfaction) Allows users to list feedbacks on contents where they have that permission (by default Editor, Manager and Site Administrator)

Feedbacks catalog

Reviews are stored inside an internal catalog (based on souper.plone).

You can access/edit data through restapi routes (see below) or through a Plone utility:

from zope.component import getUtility
from rer.customersatisfaction.interfaces import ICustomerSatisfactionStore

tool = getUtility(ICustomerSatisfactionStore)

Add a vote

  • Method add

  • Parameters: data (dictionary with parameters)

  • Response: unique-id of new record

data should be a dictionary with the following parameters:

  • uid [required]: the uid of the Plone content

  • vote [required]: the vote (should be 1 or -1)

  • title: the title of the Plone content

  • comment: an optional comment

Othere parameters will be ignored.

Search reviews

  • Method search

  • Parameters: query (dictionary with parameters), sort_index (default=date), reverse (default=False)

  • Response: a list of results

query is a dictionary of indexes where perform the search.

Right now data is not indexed so search filters does not work. You only need to call search method to get all data.

restapi routes

Add a vote

@customer-satisfaction-add

POST endpoint that need to be called on a site content.

Only users with “rer.customersatisfaction.AddCustomerSatisfactionVote” can post it:

> curl -i -X POST http://localhost:8080/Plone/front-page/@customer-satisfaction-add -H 'Accept: application/json' -H 'Content-Type: application/json' --data-raw '{"vote": "1"}' --user admin:admin

If vote is successful, the response is a 204.

Feedbacks listing

There is a view (a link is also available on user menu in sidebar) that shows all infos about feedbacks: @@customer-satisfaction

The list of feedbacks is filtered based on some permissions.

Feedbacks listing

Comments listing

Users with rer.customersatisfaction.AccessCustomerSatisfaction can call @@show-feedbacks view on a content, to see a detailed list of feedbacks and comments.

Comments listing

Installation

Add rer.customersatisfaction to buildout:

[buildout]

...

eggs =
    rer.customersatisfaction

If you need collective.recaptcha support, add the egg like this:

...

eggs =
    rer.customersatisfaction[collective_recaptcha]

and run bin/buildout command.

Contribute

Compatibility

This product has been tested on Plone 5.1 and 5.2

Credits

Developed with the support of Regione Emilia Romagna;

Regione Emilia Romagna supports the PloneGov initiative.

Authors

This product was developed by RedTurtle Technology team.

RedTurtle Technology Site

Contributors

Changelog

1.1.2 (2021-12-27)

  • Do not break viewlet if collective.recaptcha is not installed. [cekk]

1.1.1 (2021-12-02)

  • Fix python requirement. [cekk]

1.1.0 (2021-10-22)

  • A11y fixes [nzambello]

  • Conditional use of collective.recaptcha. [cekk]

1.0.0 (2021-08-19)

  • Initial release. [cekk]

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rer.customersatisfaction-1.1.2.tar.gz (1.6 MB view details)

Uploaded Source

File details

Details for the file rer.customersatisfaction-1.1.2.tar.gz.

File metadata

  • Download URL: rer.customersatisfaction-1.1.2.tar.gz
  • Upload date:
  • Size: 1.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.7.0 requests/2.25.1 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.7.11

File hashes

Hashes for rer.customersatisfaction-1.1.2.tar.gz
Algorithm Hash digest
SHA256 e0025b0a9b293e46ead2ecbebaa98a22d81472d633a45676241e9c79b60b9f2d
MD5 15edd397c95737b3cb548daae407b110
BLAKE2b-256 efc8d95bdc6fe2dc3112cd67651a583432c9b71f62143c4141f1630ec2eeb5fb

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page