Some products and features are in the process of being renamed. Generative playbook and flow features are also being migrated to a single consolidated console. See the details.
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.
Valid zip code
End-user provides a five-digit zip code; agent successfully collects it.
User input
Agent response
Please say or enter the five digit zip code.
27656
You mentioned the zip code is 27656, is that correct?
yes
Great, I'm done with collecting the zip code.
Retry
End-user provides a five-digit zip code in the second attempt; agent successfully accepts it.
User input
Agent response
Please say or enter the five digit zip code.
27656
You mentioned the zip code is 27657, is that correct?
no
Sorry I didn't get it right. Please say or enter the five digit zip code.
27656
You mentioned the zip code is 27656, is that correct?
yes
Great, I'm done with collecting the zip code.
Invalid zip code
End-user provides an invalid zip code that is over five digits long; agent reprompts and successfully collects the corrected zip code.
User input
Agent response
Please say or enter the five digit zip code.
276566
I heard 123456, which is not a valid five digit zip code. Please say or enter the five digit zip code.
27656
You mentioned the zip code is 27656, is that correct?
yes
Great, I'm done with collecting the zip code.
Unrecognized input
Component exits the flow after the end-user provides unrecognized input three times.
User input
Agent response
Please say or enter the five digit zip code.
It's fine
Sorry, I didn't get that. Can you please say or enter the five digit zip code again?
Good
Hmm, I still wasn't able to get that. Please make sure you're saying the five digit zip code. You can also use the keypad to enter the zip code.
Nice
Sorry, I'm having difficulty understanding your response.
Naming conventions
This prebuilt component uses the following naming conventions:
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
zip_code_collection_zip_code
This parameter returns the zip code collected by the conversation flow
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eThis prebuilt component is designed to collect five-digit zip codes from users, ensuring only numeric inputs of that length are accepted.\u003c/p\u003e\n"],["\u003cp\u003eThe component offers additional features including repeat, waiting room, and playback functionalities, allowing the user to interact with the component in different ways.\u003c/p\u003e\n"],["\u003cp\u003eThe component is setup to handle scenarios like invalid input, retries, and unrecognized input by prompting the user for a valid input or exiting the flow after three failures.\u003c/p\u003e\n"],["\u003cp\u003eDTMF should be enabled to allow users to input numeric zip codes using the telephone keypad.\u003c/p\u003e\n"],["\u003cp\u003eThe component uses a specific naming convention for flows, intents, and parameters, such as \u003ccode\u003eZip Code Collection\u003c/code\u003e for the flow and \u003ccode\u003ezip_code\u003c/code\u003e for the collected parameter.\u003c/p\u003e\n"]]],[],null,["# Zip code collection prebuilt component\n\nThis\n[prebuilt component](/dialogflow/cx/docs/concept/prebuilt-component)\ncollects five-digit zip codes.\n\nLimitations\n-----------\n\nIn addition to the\n[common prebuilt component limitations](/dialogflow/cx/docs/concept/prebuilt-component#limits),\nthis prebuilt component has the following limitations:\n\n- Zip codes longer than five digits are not accepted.\n- Alphanumeric zip codes are not accepted.\n\nRecommended agent settings\n--------------------------\n\n[Enable DTMF](/dialogflow/cx/docs/concept/parameter#dtmf) to allow users to input numeric values using the telephone keypad.\n\nAdditional features\n-------------------\n\nThe following additional functionalities are provided by this prebuilt component:\n\n- [Repeat](/dialogflow/cx/docs/concept/prebuilt-component#repeat-functionality)\n- [Waiting room](/dialogflow/cx/docs/concept/prebuilt-component#waiting-room-functionality)\n- [Playback](/dialogflow/cx/docs/concept/prebuilt-component#playback-functionality)\n\nSample dialogs\n--------------\n\nThe following sample dialogs demonstrate common scenarios handled by this\nprebuilt component. The sample dialogs demonstrate behavior when the component is\ncalled via telephony, which triggers the Default Welcome Intent and the first\nagent response at the start of the conversation.\n\n### Valid zip code\n\nEnd-user provides a five-digit zip code; agent successfully collects it.\n\n### Retry\n\nEnd-user provides a five-digit zip code in the second attempt; agent successfully accepts it.\n\n### Invalid zip code\n\nEnd-user provides an invalid zip code that is over five digits long; agent reprompts and successfully collects the corrected zip code.\n\n### Unrecognized input\n\nComponent exits the flow after the end-user provides unrecognized input three times.\n\nNaming conventions\n------------------\n\nThis prebuilt component uses the following naming conventions:\n\n### Output parameters\n\nOutput parameters are session parameters that will remain active after exiting\nthe component. These parameters contain important information collected by the\ncomponent. This prebuilt component provides values for the following output\nparameters:\n\nBasic setup\n-----------\n\nTo set up this prebuilt component:\n\n1. [Import the prebuilt component](/dialogflow/cx/docs/concept/prebuilt-component#import).\n\n### Complete\n\nYour agent and should now be set up and ready to test."]]