Ask: date
Last updated
Last updated
The ask date node helps to elicit date input since dates are a special entity that needs careful validation and can be bound to various constraints, like dates that need to be in the future, or only in the past, etc. For this reason date is a special node variant you can add to your flow when acquiring a date.
The date node will behave differently on different channels. On Web, when hide input is enabled, it will offer a date picker.
On phone it will use the numeric input (dtmf) to elicit the date when the node is configured with a dtmf input format option.
And on when no dtmf format is provided, or no hide input is used on web, or any of the other channels the node will ask the date by using a question and open text input:
Because of all the above differences and constraints the node contains quite some different properties to configure. See below.
Property | Description | Explanation |
---|---|---|
Question | The original question | |
Try again (1) | The repeat question when wrong input is provided | optional |
Try again (2) | An alternative repeat question when wrong input is provided | optional |
Input by dtmf | Choose how and if DTMF (numeric input) is allowed. | This is only relevant for the phone channel. The formatting options are described below. |
Output format | Choose how the date that is stored in the assign to field needs to be formatted | The formatting options are described below. |
Assign to | To assign the result to a variable in the conversation | |
Assign ISO to | To assign the ISO format of the value to a variable in the conversation | The ISO format is {YYYY}-{0M}-{0D}, see formatting options below. |
Remember | To store the variable in the user object using the names described above. | |
Disable data validation | To prevent any validation on the date. | The properties below are not applicable when set to true |
Range | To limit the allowed date range to either future or past. | |
Offset | To limit the allowed date to an amount of days from the range chosen | So when range = past and offset = 1 you can choose from yesterday and earlier. When offset = 2 you can choose from the day before yesterday and earlier. |
Constraints | To constraint which type of day can be selected (work days or weekends) | |
Exclusions | To prevent certain precise dates to be chosen. |
The date format used in the fields "Input by dtmf" and "Output format" is composed out of the following elements:
Formatting element | Description | Example |
---|---|---|
{D} | Day number | 1, 2, 3 … 29, 30, 31 |
{0D} | Day number (0-prepended) | 01, 02, 03 ... 29, 30, 31 |
{M} | Month number | 1, 2, 3 |
{0M} | Month number (0- prepended) | 01, 02, 03 … 10, 11, 12 |
{Mfull} | Full month name | january, february, match |
{YYYY} | Year | 2013, 2014, 2015 |
Special events can trigger another flow or set of nodes in your existing flow using the so called Dialog Triggers. See the chapter Dialog triggers for more details.