This prebuilt component captures first, last, and optional middle names along with any spaces, hyphens, or apostrophes.
Limitations
In addition to the common prebuilt component limitations, this prebuilt component has the following limitations:
- This component does not support names with special characters outside of spaces, apostrophes, and hyphens.
Additional features
The following additional features are provided by this prebuilt component:
Sample dialogs
These sample dialogs show common scenarios that this prebuilt component handles. They demonstrate behavior when the user calls the component using telephony, which triggers the Default Welcome Intent and the first agent response at the start of the conversation.
Full name
- The user provides a full name in the first turn.
- The agent successfully accepts it.
| User Input | Agent Response |
|---|---|
| What is your full name? Please tell me your first, last, and middle name, if you have one. | |
| Sundar Pichai | |
| To confirm, your first name is Sundar, and your last name is Pichai. Did I spell your full name correctly? | |
| Yes | |
| Do you have a middle name? | |
| no | |
| Thank you, Sundar. |
Full name in parts
- The user fails to provide a full name on the first attempt.
- The user then provides their first, last, and middle names in separate turns.
- The agent successfully accepts it.
| User Input | Agent Response |
|---|---|
| What is your full name? Please tell me your first, last, and middle name, if you have one. | |
| nice | |
| Sorry, I didn't get that right. Let's start capturing the name again. Before capturing your name, could you please help me confirm whether you have any hyphens, extra spaces, or apostrophes in your name? |
|
| no | |
| Let's start by capturing your first name. What is your first name? |
|
| Lawrence | |
| Lawrence. Did I spell your first name correctly? | |
| yes | |
| What is your last name? | |
| Page | |
| Page. Did I spell your last name correctly? | |
| yes | |
| Do you have a middle name? | |
| yes | |
| What is your middle name? | |
| Edward | |
| Edward. Did I spell your middle name correctly? | |
| yes | |
| Thank you, Lawrence. |
Special characters
- The user fails to provide a full name on the first attempt.
- The user then provides their first, last, and middle names in separate turns with special characters.
- The agent successfully accepts it.
| User Input | Agent Response |
|---|---|
| What is your full name? Please tell me your first, last, and middle name, if you have one. | |
| nice | |
| Sorry, I didn't get that right. Let's start capturing the name again. Before capturing your name, could you please help me confirm whether you have any hyphens, extra spaces, or apostrophes in your name? |
|
| Yes I have | |
| Got it. Are these special characters in your first name, middle name, or last name? | |
| First name | |
| Please tell me the first part of your first name before any special characters. | |
| Evan | |
| Evan. Did I spell the first part correctly? | |
| yes | |
| Please tell me what's next: a space, apostrophe, or hyphen. | |
| hyphen | |
| "hyphen". Did I capture the name separator after the first part of your first name correctly? | |
| yes | |
| Please spell out the next part of your first name, after the hyphen. Say only the letters, for example J-O-H-N. | |
| James | |
| James. Tell me if that's wrong, if that's the end, or, what's next: a space, apostrophe, or hyphen. | |
| I am done | |
| What is your last name? | |
| Mady | |
| Mady. Did I spell your last name correctly? | |
| yes | |
| Do you have a middle name? | |
| no | |
| Thank you, Evan-James. |
No input
The component exits the flow after the user provides no input three times.
| User Input | Agent Response |
|---|---|
| What is your full name? Please tell me your first, last, and middle name, if you have one. | |
| [No-input] | |
| Sorry, I wasn't able to hear you. What is your full name? | |
| [No-input] | |
| Hmm, I still cannot hear you. Try speaking louder or moving to a quieter area. | |
| [No-input] | |
| Sorry, I'm having difficulty understanding your response. |
Naming conventions
This prebuilt component uses the following naming conventions:
| Feature | Format | Example |
|---|---|---|
| Flow | [Component Name] | Name Collection |
| Component Specific Intent | prebuilt_components_[component_name]_[intent_name] | prebuilt_components_name_collection_special_characters_decider |
| Entity Type | prebuilt_components_[component_name]_[entity_type_name] | prebuilt_components_name_collection_first_name |
| Parameter | [param_name] | user_provided_first_name |
Output parameters
Output parameters are session parameters that 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 |
|---|---|---|
| name_collection_first_name | Returns the user-provided first name that the component collects. | string |
| name_collection_last_name | Returns the user-provided last name that the component collects. | string |
| name_collection_middle_name | Returns the user-provided middle name that the component collects. If the component doesn't collect a middle name, it returns an empty string. | string |
Basic setup
To set up this prebuilt component, import the prebuilt component.
Complete
The prebuilt component is now set up and ready to test.