[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-08-18。"],[[["\u003cp\u003eThe address collection prebuilt component gathers an address from users and validates it using the Google Address Validation API.\u003c/p\u003e\n"],["\u003cp\u003eThis component supports addresses only from countries covered by the Address Validation API and offers functionalities like repeat, waiting room, and playback.\u003c/p\u003e\n"],["\u003cp\u003eThe component can handle full and partial valid addresses, inferred elements, and user-provided corrections, while also managing unrecognized input and unsupported regions.\u003c/p\u003e\n"],["\u003cp\u003eThe component relies on the Address Validation API to identify and return specific address elements such as administrative area, city, country, postal code, route, and street number, and can be configured to require certain elements.\u003c/p\u003e\n"],["\u003cp\u003eSetting up this component involves importing it, enabling the Address Validation API, and configuring the provided webhook with a Maps API key for address validation.\u003c/p\u003e\n"]]],[],null,["# Address collection prebuilt component\n\nThe address collection\n[prebuilt component](/dialogflow/cx/docs/concept/prebuilt-component)\ncollects an address from the end-user, and it uses the\n[Google Address Validation API](https://mapsplatform.google.com/maps-products/address-validation/)\nto validate addresses.\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- Only supports addresses from countries listed at [Address Validation API coverage details](https://developers.google.com/maps/documentation/address-validation/coverage).\n\nAdditional functionalities\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### Full valid address\n\nEnd-user provides a complete address and the address collection component successfully verifies it.\n\n### Partial valid address with inferred elements\n\nEnd-user provides a partial address; agent guesses the missing part and successfully verifies it after confirmation from the end-user.\n\n### Partial valid address with user-provided elements\n\nEnd-user provides a partial address; agent guesses the missing part but the end-user provides their own input after saying \"no\", and the agent successfully accepts the address.\n\n### Unrecognized input\n\nComponent exits the flow after the end-user provides unrecognized input three times.\n\n### Unsupported address\n\nComponent exits the flow after the end-user provides an address not currently supported by the Address Validation API.\n\nAddress validation\n------------------\n\nTo understand how the address collection component validates addresses, see\n[Address Validation API Overview](https://developers.google.com/maps/documentation/address-validation/overview).\n\nThe address collection component captures end-user input using the\n[@sys.address system entity](/dialogflow/cx/docs/reference/system-entities)\nand sends the captured address to the Address Validation API\nto extract address elements for further processing.\n\nThe following address elements are returned by the Address Validation API\nand are used by the component to collect and validate a complete address:\n\n- *administrative_area_level_1*\n- *archipelago*\n- *country*\n- *locality*\n- *postal_code*\n- *route*\n- *street_number*\n\nYou can try the\n[Google Address Validation Demo](https://developers.google.com/maps/documentation/address-validation/demo)\nwith any address from a\n[supported region](https://developers.google.com/maps/documentation/address-validation/coverage).\n\nNaming conventions\n------------------\n\nThis prebuilt component uses the following naming conventions:\n\nInput parameters\n----------------\n\nInput parameters are parameters that are used to configure certain behaviors of\nthe component. The parameters will be used by one or more conditions within the\nflow to determine how the component should behave. Flow-scoped parameters must\nbe set on the start page of the component as described below. Session-scoped\nparameters may be set either by a calling flow, or on the start\npage of this component.\n\nYou can configure which address elements are required by this component by modifying\n[parameter presets](/dialogflow/cx/docs/concept/fulfillment#param-preset) in the\n[flow's start page](/dialogflow/cx/docs/concept/flow#data).\n\nThis prebuilt component accepts the following input parameters:\n\n#### To configure the input parameters for this component, expand for instructions.\n\n1. Open the [Dialogflow CX console](https://dialogflow.cloud.google.com/cx/projects).\n2. Choose your Google Cloud project.\n3. Select your agent.\n4. Select the **Build** tab.\n5. Click the imported component in the **Flows** section.\n6. Click the Start Page in the **Pages** section.\n7. Click the **true** Route in the Start Page.\n8. In the Route window, edit the **Parameter Presets** values as needed.\n9. Click **Save**.\n\nOutput parameters\n-----------------\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).\n2. [Enable](/service-usage/docs/enable-disable) the Address Validation API.\n3. Configure the provided [flexible webhook](/dialogflow/cx/docs/concept/webhook#flexible) with your Maps API key, see Webhook setup below.\n\nWebhook setup\n-------------\n\nIn order to use the Address Validation API to validate addresses, you will need\nto configure the provided flexible webhook with the correct credentials.\n\n### Address Validation webhook\n\nThis webhook performs the following actions:\n\n1. Processes captured Conversational Agents (Dialogflow CX) parameters, forms request, and verifies the address using the [Address Validation API](https://developers.google.com/maps/documentation/address-validation).\n2. Extracts confirmed, unconfirmed, missing, and inferred address elements from the [Google Address Validation API response](https://developers.google.com/maps/documentation/address-validation/demo).\n\nTo configure the webhook for this component, you'll need to update the webhook\nsettings with your Maps API key.\n\n1. To retrieve your API Key: go to [Google Cloud Platform Console \\\u003e APIs \\& Services \\\u003e Credentials](https://console.cloud.google.com/apis/credentials), select your Maps API key, copy the API Key field.\n\nTo configure the webhook:\n\n1. Open the [Dialogflow CX console](https://dialogflow.cloud.google.com/cx/projects).\n2. Choose your Google Cloud project.\n3. Select your agent.\n4. Select the **Manage** tab.\n5. Click **Webhooks**.\n6. Select the prebuilt_components_address_collection:address_validation webhook.\n7. Replace the URL in the Conversational Agents (Dialogflow CX) **Webhook URL** field with the URL including your Maps API Key: https://addressvalidation.googleapis.com/v1:validateAddress?key=\u003cvar translate=\"no\"\u003eMAPS_API_KEY\u003c/var\u003e\n8. In the **Authentication** settings, configure the Username as `key` and set the Password to your Maps API key.\n9. Click **Save**.\n\n### Complete\n\nYour agent and its webhook should now be set up and ready to test."]]