Happiness Rating

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

​​

SalesIQ Script Input:


				{
  "type": "happiness-rating",
  "level": "3"
}			

Dialogflow Input:


				{
  "platform": "ZOHOSALESIQ",
  "input": {
    "type": "happiness-rating",
    "level": "3"
  }
}			

Watson Assistant:


				"user_defined": {
"zohosalesiq": {
     "input": {
      "type": "happiness-rating",
      "level": "3"
    }
  }
}			

Zia Skills Platform Input:

For Param Loader function:


result = Map();
response = Map();
response.put("action", "reply");
response.put("replies", {
    "Please rate us"
});
response.put("input", {
    "type": "happiness-rating",
    "level": "3"
});
additionalParams = {
    {
        "name": "rating",
        "data_type": "STRING",
        "input_mode": "TEXTUAL",
        "prompt_msg": "Please rate us",
        "data": response
    }
};
result.put("additionalParams", additionalParams);
return result;

For Context Handler function:


result = Map();
response = Map();
response.put("action", "reply");
response.put("replies", {
    "Please rate us"
});
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;

For Execution function:


result = Map();
response = Map();
response.put("action", "reply");
response.put("replies", {
    "Please rate us"
});
response.put("input", {
    "type": "happiness-rating",
    "level": "3"
});
result.put("data", response);
return result;

 

Output: