Numeric collection prebuilt component

This prebuilt component collects numeric sequences from the user. The minimum and maximum length accepted can be configured using input parameters.

The component captures chunks of digits from the user on each conversational turn and concatenates them to form the final sequence. The minimum and maximum length accepted per chunk can be configured using input parameters.

The sequence capture continues until the user indicates that they're done with the sequence by providing input that matches the prebuilt_components_confirmation_done intent.

Limitations

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

  • Non-numeric characters are not supported. For more information about supporting sequences with non-numeric characters, see the alphanumeric collection.
  • Enable DTMF to let users input numeric values using the telephone keypad.

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.

Single chunk

  1. The user provides a numeric sequence on the first attempt.
  2. The agent successfully accepts it.
User Input Agent Response
Please start by saying the first 1 to 30 digits of the numeric sequence. Once you're done, say "I'm done" to finish the collection. You can also say "playback" at any time to check the current collected sequence.
2374 30940 029 30
I got 23743094002930, is that correct?
Yes
Okay. Please say or enter the next part of the numeric sequence.
done
Thank you, the numeric sequence I've collected is 23743094002930. Is that correct?
yes
Great, I'm done collecting the numeric sequence.

Multiple chunks

  1. The user provides a numeric sequence in multiple chunks.
  2. The agent successfully accepts it.
User Input Agent Response
Please start by saying the first 1 to 30 digits of the numeric sequence. Once you're done, say "I'm done" to finish the collection. You can also say "playback" at any time to check the current collected sequence.
2374 30940 029 30
I got 23743094002930, is that correct?
No
No worries, can you please provide the first 1 to 30 digits of the numeric sequence again?
2374
I got 2374, is that correct?
Yes
Okay. Please say or enter the next part of the numeric sequence.
3094
I got 3094, is that correct?
Yeah
Okay. Please say or enter the next part of the numeric sequence.
002930
I got 002930, is that correct?
No
No worries, what is after 23743094?
2930
I got 2930, is that correct?
Yes, that's all
Thank you, the numeric sequence I've collected is 237430942930. Is that correct?
Yes
Great, I'm done collecting the numeric sequence.

Successful retry

  1. The user provides a numeric sequence in the first attempt.
  2. The agent re-confirms it but the user says "no".
  3. The agent asks the user to provide the sequence again.
  4. The user provides and confirms the sequence.
  5. The agent successfully accepts it.
User Input Agent Response
Please start by saying the first 1 to 30 digits of the numeric sequence. Once you're done, say "I'm done" to finish the collection. You can also say "playback" at any time to check the current collected sequence.
92832938 3489
I got 928329383459, is that correct?
no
No worries, can you please provide the first 1 to 30 digits of the numeric sequence again?
928329383435
I got 928329383435, is that correct?
Yes and that's all for me
Thank you, the numeric sequence I've collected is 928329383435. Is that correct?
yes
Great, I'm done collecting the numeric sequence.

Unsuccessful retries

  1. The user provides a numeric sequence three times and says "no" on the re-confirmation step.
  2. The component exits the flow on the third failed confirmation.
User Input Agent Response
Please start by saying the first 1 to 30 digits of the numeric sequence. Once you're done, say "I'm done" to finish the collection. You can also say "playback" at any time to check the current collected sequence.
928329383435
I got 928329383835, is that correct?
no
No worries, can you please provide the first 1 to 30 digits of the numeric sequence again?
23 289 0239 903
I got 232890239953, is that correct?
no
No worries, can you please provide the first 1 to 30 digits of the numeric sequence again?
23847 02938
I got 2384702938, is that correct?
no
Sorry, I've used too many tries and failed to collect your response.

Unrecognized input

The component exits the flow after the user provides unrecognized input three times.

User Input Agent Response
Please start by saying the first 1 to 30 digits of the numeric sequence. Once you're done, say "I'm done" to finish the collection. You can also say "playback" at any time to check the current collected sequence.
It's fine
Sorry, I didn't get that. Please start by saying the first 1 to 30 digits of the numeric sequence. Once you're done, say "I'm done" to finish the collection. You can also say "playback" at any time to check the current collected sequence.
nice
Hmm, I still wasn't able to get that. Please make sure you're saying the first 1 to 30 digits of the numeric sequence. Once you're done, say "I'm done" to finish the collection. You can also say "playback" at any time to check the current collected sequence. If we're having trouble hearing you, you can also use the keypad to enter the numeric sequence.
great
Sorry, I'm having difficulty understanding your response.

Naming conventions

This prebuilt component uses the following naming conventions:

Feature Format Example
Flow [Component Name] Numeric Collection
Component Specific Intent prebuilt_components_[component_name]_[intent_name] prebuilt_components_numeric_collection_collect_numeric_sequence
Parameter [param_name] user_provided_cur_seq

Input parameters

Input parameters configure certain behaviors of the component. One or more conditions within the flow use these parameters to determine how the component behaves. You must set flow-scoped parameters on the start page of the component. You can set session-scoped parameters using a calling flow or on the start page of this component.

The user can configure the minimum and maximum lengths accepted per capture and for the final collected sequence by modifying parameter presets on the flow's start page.

This prebuilt component accepts the following input parameters:

Parameter Name Description Input Format
$flow.numeric_min_length The minimum length of the final numeric sequence. integer
$flow.numeric_max_length The maximum length of the final numeric sequence. integer
$flow.lower_limit The minimum length of the chunk a user can provide each turn. integer
$flow.upper_limit The maximum length of the chunk a user can provide each turn. integer

To configure the input parameters for this component, expand for instructions.

  1. Open the Dialogflow CX console.
  2. Choose your Google Cloud project.
  3. Select your agent.
  4. Select the Build tab.
  5. Click the imported component in the Flows section.
  6. Click the Start Page in the Pages section.
  7. Click the true Route in the Start Page.
  8. In the Route window, edit the Parameter Presets values as needed.
  9. Click Save.

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
numeric_collection_numeric_sequence Returns the numeric sequence captured during the session. 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.