Rating and Survey
Rating Guide Line
Rating Add-ons allows bot to collect and manage ratings from users.
Manage Add-on
Access: https://rating.fpt.ai. Login with FPT ID account.
Add a new Rating Item
- Create a new Rating Item:

- Copy token:
Token is used for bot to call add-on

Get detail report for a Rating Item
- Users statistics

- The statistics includes:
- Rating Item name
- Total rates
- Average Stars (value)
- List of users' ratings

Manage Bot
Bot is created to use rating add-on
Access: http://bot.fpt.ai. Login with FPT ID account
Create new bot
Setup variables
| ID | Variable name | Entity Type | Validation | Description |
|---|---|---|---|---|
| 4 | rate_success | None | text | Rating status ("1": success, "0": fail) |
| 5 | rate_level | None | text | A value from "1" to "5" represents the number of stars rated by user |
| 6 | one_stars | None | text | Number of users rated 1 star |
| 7 | two_stars | None | text | Number of users rated 2 stars |
| 8 | three_stars | None | text | Number of users rated 3 stars |
| 9 | four_stars | None | text | Number of users rated 4 stars |
| 10 | five_stars | None | text | Number of users rated 5 stars |
| 11 | one_stars_percentage | None | text | Percentage of users rated 1 star over all users |
| 12 | two_stars_percentage | None | text | Percentage of users rated 2 stars over all users |
| 13 | three_stars_percentage | None | text | Percentage of users rated 3 stars over all users |
| 14 | four_stars_percentage | None | text | Percentage of users rated 4 stars over all users |
| 15 | five_stars_percentage | None | text | Percentage of users rated 5 stars over all users |
| 16 | total_rates | None | text | Total ratings |
| 17 | mean_of_stars | None | text | Mean of rating stars |
| 18 | comment | None | text | User's comment belong to the rate |
Setup constant
| ID | Constant name | Value | Description |
|---|---|---|---|
| 1 | token | text | Authorized key to call rating add-on (Key can be copied as described above) |
Setup scenario
- Add step Rate
- Add Quick Reply card:
Message:Welcome to rating add-on
Add Button: Five button for five rate level- Button Setting:
Type: To Step
Name: 1 star
Action: RateProcess
Data Payload:{"set_attributes": {"rate_level": "1"}}

- Button Setting:
- Add Quick Reply card:

Add step RateProcess
- Add JSON card:
Method: POST
URL: https://rating.fpt.ai/api/rates/
Authorization: Bearer {{token}}
Variable: sender_id, session_id, app_code, rate_level, comment

Add step RateResult
- Add JSON card:
Method: GET
URL: https://rating.fpt.ai/rate-result/
Authorization: Bearer {{token}}
Variable: app_code

