Name collection prebuilt component

This prebuilt component captures first, last, and optional middle name along with any spaces, hyphens or apostrophes.

Limitations

In addition to the common prebuilt component limitations, this prebuilt component has the following limitations:

  • Names having special characters outside of spaces, apostrophes and hyphens are not supported by this component.

Additional features

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 name

End-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

End-user is unable to provide a full name on the first attempt. The end-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

End-user is unable to provide a full name on the first attempt. The end-user then provides their first, last, and middle names in separate turns with special characters; 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

Component exits the flow after the end-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 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
name_collection_first_name This parameter returns the user-provided first name that is captured by the component string
name_collection_last_name This parameter returns the user-provided last name that is captured by the component string
name_collection_middle_name This parameter returns the user-provided middle name that is captured by the component. If no middle name is collected, the parameter will be an empty string string

Basic setup

To set up this prebuilt component:

  1. Import the prebuilt component.

Complete

Your agent should now be set up and ready to test.