Star Rating

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

AttributeMandatoryDescriptionValues
typeYesThe type of the input to be displayed to the visitorstar-rating
levelNoThe number of stars to be displayed to the visitor3-10

SalesIQ Script Input:


				{
  "type": "star-rating",
  "level": "5" 
}			

Dialogflow Input:


				{
  "platform": "ZOHOSALESIQ",
  "input": {
    "type": "star-rating",
    "level": "5"
  }
}			

Watson Assistant:


				"user_defined": {
"zohosalesiq": {
    "input": {
      "type": "star-rating",
      "level": "5"
    }
  }
}			

Zia Skill Platform Input:

For Param Loader function:


result = Map();
response = Map();
response.put("action", "reply");
response.put("replies", {
    "Please rate us for our support"
});
response.put("input", {
    "type": "star-rating",
    "level": "5"
});
additionalParams = {
    {
        "name": "starrating",
        "data_type": "INTEGER",
        "input_mode": "TEXTUAL",
        "prompt_msg": "Please rate us for our support",
        "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 for our support"
});
response.put("input", {
    "type": "star-rating",
    "level": "5"
});
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 for our support"
});
response.put("input", {
    "type": "star-rating",
    "level": "5"
});
result.put("data", response);
return result;

 

Output: