Date Time Slots

You can use this card to display the list of date and 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 visitordate-timeslots
slotsYesYou can specify the array of dates in dd/mm/yyyy format and time slots in hh:mm (24 hrs) format that you would like to display. The date and time will be sorted in acending order automatically. {
dd/mm/yyyy : [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": "date-timeslots",
  "tz": true,
  "label": "Select a time ",
  "slots": {
    "24/08/2018": [
     "09:00",
    "09:30",
    "10:00",
    "10:30",
    "11:00",
    "11:30"
    ]
  }
}			

Dialogflow Input:


				{
  "platform": "ZOHOSALESIQ",
  "input": {
    "type": "date-timeslots",
    "label": "Select a time",
    "tz": true,
    "slots": {
      "24/08/2018": [
       "09:00",
      "09:30",
      "10:00",
      "10:30",
      "11:00",
      "11:30"
    ]
    }
  }
}			

Watson Assistant:


				"user_defined": {
"zohosalesiq": {
        "input": {
          "tz": true,
          "type": "date-timeslots",
          "label": "Select a time ",
          "slots": {
            "24/08/2018": [
              "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 convenient date and time:"
});
response.put("input", {
  "type": "date-timeslots",
  "tz": true,
  "label": "Select a time ",
  "slots": {
    "24/08/2018": [
     "09:00",
    "09:30",
    "10:00",
    "10:30",
    "11:00",
    "11:30"
    ]
  }
});
additionalParams = {
    {
        "name": "datetimeslot",
        "data_type": "DATE",
        "input_mode": "TEXTUAL",
        "prompt_msg": "Choose your convenient date and time:",
        "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 convenient date and time:"
});
response.put("input", {
    "type": "date-timeslots",
    "tz": true,
    "label": "Select a time ",
    "slots": {
        "24/08/2018": [
            "09:00",
            "09:30",
            "10:00",
            "10:30",
            "11:00",
            "11:30"
        ]
    }
});
prompt = Map();
prompt.put("param_name", "date-timeslots");
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 convenient date and time:"
});
response.put("input", {
  "type": "date-timeslots",
  "tz": true,
  "label": "Select a time ",
  "slots": {
    "24/08/2018": [
     "09:00",
    "09:30",
    "10:00",
    "10:30",
    "11:00",
    "11:30"
    ]
  }
});
result.put("data", response);
return result;

 

Output: