Time Slots

You can use this card to display the list of time slots in the window and allow the visitor to pick one from the given slots.

AttributeMandatoryDescriptionValues
typeYesThe type of the input to be displayed to the visitortimeslots
slotsYesYou can specify the array of time slots in hh:mm (24 hrs) format that you would like to display[hh:mm, hh:mm]
tzNoYou can specify to allow the visitor to choose the timezone in the calendartrue - To allow the visitor to choose the timezone in the calendar. If not specified, then the timezone of the visitor's device will be taken by default.

SalesIQ Script Input:


				{
  "type": "timeslots",
  "tz": true,
  "label": "Book a slot",
  "slots": [
    "09:00",
    "09:30",
    "10:00",
    "10:30",
    "11:00",
    "11:30"
  ]
}			

Dialogflow Input:


				{
  "platform": "ZOHOSALESIQ",
  "input": {
    "type": "timeslots",
    "label": "Pick a slot",
    "tz": false,
    "slots": [
      "09:00",
      "09:30",
      "10:00",
      "10:30",
      "11:00",
      "11:30"
    ]
  }
}			

Watson Assistant:


				"user_defined": {
"zohosalesiq": {
        "input": {
          "tz": true,
          "type": "timeslots",
          "label": "Book a slot",
          "slots": [
            "09:00",
            "09:30",
            "10:00",
            "10:30",
            "11:00",
            "11:30"
          ]
        }
}
}			

Zia Skills Platform Input:

For Param Loader function:


result = Map();
response = Map();
response.put("action", "reply");
response.put("replies", {
    "Choose your slot"
});
response.put("input", {
  "type": "timeslots",
  "tz": true,
  "label": "Book a slot",
  "slots": [
    "09:00",
    "09:30",
    "10:00",
    "10:30",
    "11:00",
    "11:30"
  ]
});
additionalParams = {
    {
        "name": "timeslot",
        "data_type": "DATE",
        "input_mode": "TEXTUAL",
        "prompt_msg": "Choose your slot",
        "data": response
    }
};
result.put("additionalParams", additionalParams);
return result;

For Context Handler function:


result = Map();
response = Map();
response.put("action", "reply");
response.put("replies", {
    "Choose your slot"
});
response.put("input", {
    "type": "timeslots",
    "tz": true,
    "label": "Book a slot",
    "slots": [
        "09:00",
        "09:30",
        "10:00",
        "10:30",
        "11:00",
        "11:30"
    ]
});
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", {
    "Choose your slot"
});
response.put("input", {
  "type": "timeslots",
  "tz": true,
  "label": "Book a slot",
  "slots": [
    "09:00",
    "09:30",
    "10:00",
    "10:30",
    "11:00",
    "11:30"
  ]
});
result.put("data", response);
return result;

 

Output: