Happiness Rating for Zia Skills

This card can be used to obtain the rating from the visitor in the smiley input format.

AttributesMandatoryDescriptionValues
typeYesThe type of the input to be displayed to the visitorhappiness-rating
levelNoIf you would like to handle the smileys using code use the values below:
  • :rating-angry:
  • :rating-sad:
  • :rating-neutral:
  • :rating-happy:
  • :rating-excited:
3 / 5

​​

Use Case:

Context Handler function:

Copiedresult = Map();
response = Map();
response.put("action", "reply");
response.put("replies", [
    "Rate the chat session you had with Zyt"
]);
response.put("input", {
    "type": "happiness-rating",
    "level": "3"
});
prompt = Map();
prompt.put("param_name", "rating");
prompt.put("data", response);
result.put("prompt", prompt);
result.put("todo", "prompt");
return result;

Output: