Slider option
This card helps to collect input from the visitor with a slider interface, i.e., they can choose a range starting from the first in the pre-defined range of inputs.
Attribute | Mandatory | Description | Values |
type | Yes | The type of input to be displayed to the visitor. | slider |
values | Yes | An array of strings you would like to mark in the slider as options. | A maximum of 10 options in the array with a character limit of 10 each can be provided. |
Channel compatibility and limitations
Facebook Messenger:
- The card is supported on Facebook.
- When using this card, the range units/intervals would be given as a single select option for the users to select.
Instagram:
- The card is supported on Instagram.
- When using this card, the range units/intervals would be given as a single select option for the users to select.
WhatsApp:
- The card is supported on WhatsApp.
- A maximum of 10 range units/intervals (10 characters each) will be provided in a list format.
- If the units are lesser than or equal to 3, all units will be listed as single select options.
- When more than 10 units are provided, only the first 10 will be displayed.
- The characters exceeding more than 10 will be trimmed, and only the first 10 characters will be displayed.
Telegram:
- The card is supported on Telegram.
- When using this card, the range units/intervals would be given as a single select option for the users to select.
LINE:
- The card is supported on LINE.
- When using this card, the range units/intervals would be given as a single select option for the users to select.
Use Case
Copied//numbers in slider
{
"type": "slider",
"values": [
"1",
"2",
"3",
"4",
"5",
"6",
"7",
"8",
]
}
//string in slider
{
"type": "slider",
"values": [
"Sad",
"Neutral",
"Happy"
]
}
Copied//Context Handler function
result = Map();
response = Map();
response.put("action", "reply");
response.put("replies", [
"Could you please help me with your shoe size?"
]);
response.put("input", {
"type": "slider",
"values": [
"1",
"2",
"3",
"4",
"5",
"6",
"7",
"8",
]
});
prompt = Map();
prompt.put("param_name", "slider");
prompt.put("data", response);
result.put("prompt", prompt);
result.put("todo", "prompt");
return result;
//Execution function
result = Map();
response = Map();
response.put("action", "reply");
response.put("replies", {
"Could you please help me with your shoe size?"
});
response.put("input", {
"type": "slider",
"values": [
"1",
"2",
"3",
"4",
"5",
"6",
"7",
"8",
]
});
result.put("data", response);
return result;
Copied//numbers in slider
{
"type": "slider",
"values": [
"1",
"2",
"3",
"4",
"5",
"6",
"7",
"8",
]
}
Copied{
"platform": "ZOHOSALESIQ",
"replies": [
"Could you please help me with your shoe size?"
],
"input": {
"type": "slider",
"values": [
"1",
"2",
"3",
"4",
"5",
"6",
"7",
"8"
]
}
}
Copied"user_defined": {
"zohosalesiq": {
"replies": [
"Could you please help me with your shoe size?"
],
"input": {
"type": "slider",
"options": [
"1",
"2",
"3",
"4",
"5",
"6",
"7",
"8"
]
}
}
}
Copied"channelData":{
"zohosalesiq": {
"input": {
"type": "slider",
"values": [
"1",
"2",
"3",
"4",
"5",
"6",
"7",
"8"
]
},
"replies":[{
"text" : "Could you please help me with your shoe size?"
}]
}
}