This prebuilt component captures and validates a date of birth by collecting month, date, and year.
Limitations
In addition to the common prebuilt component limitations, this prebuilt component has the following limitations:
- This component does not support verification of end-user's date of birth via ID verification.
Recommended agent settings
Enable DTMF to allow users to input numeric values using the telephone keypad.
Additional functionalities
The following additional functionalities are provided by this prebuilt component:
Sample dialogs
The following sample dialogs demonstrate common scenarios handled by this prebuilt component. The sample dialogs demonstrate behavior when the component is called via telephony, which triggers the Default Welcome Intent and the first agent response at the start of the conversation.
Full date of birth
End-user provides complete date of birth in one turn; agent successfully accepts it.
User input | Agent response |
---|---|
Please provide your date of birth. Please say your birth month, followed by your birth day, and then your birth year. | |
September 9th 1995 | |
Okay, your birthdate is September 9, 1995. Is that correct? | |
yes | |
Great, I've collected your birthdate. |
Partial date of birth
End-user provides date of birth by saying month first followed by date and year; agent successfully accepts it.
User input | Agent response |
---|---|
Please provide your date of birth. Please say your birth month, followed by your birth day, and then your birth year. | |
March | |
What day were you born on? | |
12 | |
What year were you born in? | |
1999 | |
Okay, your birthdate is March 12, 1999. Is that correct? | |
yes | |
Great, I've collected your birthdate. |
Future date validation
This scenario assumes the current date is March 22, 2023. End-user provides a future date of birth; agent validates it and re-prompts end-user to provide the correct date of birth.
User input | Agent response |
---|---|
Please provide your date of birth. Please say your birth month, followed by your birth day, and then your birth year. | |
September 9th 2023 | |
What year were you born in? | |
2023 | |
Okay, your birthdate is September 9, 2023. Is that correct? | |
yes | |
Sorry, you have provided a future date. Let's start again. Which month were you born in? |
|
March | |
What day were you born on? | |
12 | |
What year were you born in? | |
1999 | |
Okay, your birthdate is March 12, 1999. Is that correct? | |
yes | |
Great, I've collected your birthdate. |
Invalid date
End-user provides an invalid date of birth such as February 30th 1999 or April 31st 1999; agent validates it and re-prompts end-user to provide the correct date of birth.
User input | Agent response |
---|---|
Please provide your date of birth. Please say your birth month, followed by your birth day, and then your birth year. | |
February 30th 1999 | |
Okay, your birthdate is February 30, 1999. Is that correct? | |
yes | |
The date you have provided is invalid. Let's start again. Which month were you born in? |
|
March | |
What day were you born on? | |
12 | |
What year were you born in? | |
1999 | |
Okay, your birthdate is March 12,1999. Is that correct? | |
yes | |
Great, I've collected your birthdate. |
Unrecognized input
Component exits the flow after the end-user provides unrecognized input three times.
User input | Agent response |
---|---|
Please provide your date of birth. Please say your birth month, followed by your birth day, and then your birth year. | |
It's fine | |
Sorry, I didn't get that. Can you please say or enter your date of birth again? | |
nice | |
Sorry I did not get your date of birth. Let's start with month. Please say which month were you born in? | |
good | |
Sorry, I didn't get that. Can you please say or enter the month number again? | |
nice | |
Hmm, I still wasn't able to get that. Please make sure you're saying the month. If I am having trouble hearing you, you can also use the keypad to enter the month number. | |
nice | |
Sorry, I'm having difficulty understanding your response. |
Date of birth validation
This prebuilt component uses the IS_DATE and IS_FUTURE_DATE system functions to check whether a collected date is valid and in the past. In addition:
- Inputs such as "this month", "next month" or "last month" are converted into the appropriate months. For example, if the end-user is interacting with the agent in March, then "this month", "next month" and "last month" are converted into "March", "April" and "February" respectively.
- Validates that the year should be four digits. If the year input contains only two digits, the component converts it into a four-digit year. For example, "98" is converted to "1998".
- Input such as "this Thursday", "last Thursday", and "next Thursday" are captured as the appropriate month and day and the agent prompts to provide the year. For example, if end-user is interacting with the agent on March 22, 2023, which is a Wednesday, then "this Thursday", "last Thursday", and "next Thursday" are converted into "March 23", "March 16", and "March 30" respectively.
Naming conventions
This prebuilt component uses the following naming conventions:
Feature | Format | Example |
---|---|---|
Flow | [Component Name] | DOB Collection |
Component Specific Intent | prebuilt_components_[component_name]_[intent_name] | prebuilt_components_dob_collection_collect_month |
Parameter | [param_name] | dob |
Entity Type | prebuilt_components_[component_name]_[entity_type] | prebuilt_components_dob_collection_dob_day |
Output parameters
Output parameters are session parameters that will remain active after exiting the component. These parameters contain important information collected by the component. This prebuilt component provides values for the following output parameters:
Parameter Name | Description | Output Format |
---|---|---|
dob_collection_dob | This parameter returns an object containing date of birth elements: day, month and year | { |
Basic setup
To set up this prebuilt component:
Complete
Your agent and should now be set up and ready to test.