Using date and time pickers

A date and time picker enables users to select the date and time of an event. After selecting a date and time, the event is added to the calendar on their device. The user experience differs slightly depending on the channel.

You configure date and time pickers for Question interactions — they are a special type of predefined answer.

The dates and times are obtained via API calls made using an Action interaction.

Support for date and time pickers

You can use date and time pickers on the following channels.

Channel Device type Supported?
Apple Business Chat Devices running iOS (such as iPhone and iPad) Yes
Apple Business Chat Devices running MAC OS No

Users cannot open messages containing date and time pickers. The device will display the message: You'll need an iOS device to interact with this conversation. Open this message on an iPhone or iPad to continue. You cannot change this message in Converse.

Facebook Messenger All devices Yes
Converse Web Client - No

Setting up date and time pickers

To configure a date and time picker:

  1. Create the Action interaction that will get the date and times. For more information, see JSON format for date and time pickers.
  2. Create a Question interaction.
  3. In the Send to user field, enter the title of the date and time picker. This is the text in the bubble when the date and time picker is collapsed or as the main title when it is expanded.
  4. On the Answers tab, select the Accept a predefined answer type option.
  5. Select the Date and Time option.
  6. Select the Use Timepicker checkbox.
  7. Configure the date and time picker:
    Timeslots variable The name of the variable returned by the Action interaction.
    Appointment Duration Duration in minutes of the event to add to the calendar on the device.
    Note: This option is currently not used and the duration is always set by the endpoint in the API call.
    Subtitle Some text that provides additional information for the user. This displays as a subtitle under the Send to user text.
  8. On the Advanced tab, in the Run Action field, select the action that will get the dates and times.
    Important: If you are adding a date and time picker to an existing integration with Facebook Messenger then the bot configuration must include the Facebook Messenger App Secret (see Integration settings for Facebook). You must also whitelist the bot host in your Facebook for developers account. See Whitelisting the bot host. Failing to do this will result in users seeing a 400 error.