Hi, Humans. How may we help you?

Consult ZIP code in Chatbot
4 min
Created by Maria Malheiro on 2/8/2024 4:22 PM
Updated by Ligia Sarmento on 10/28/2025 6:12 PM
Important: Before following the instructions, make sure the feature is available for your access profile.

In Zenvia Customer Cloud, the Consult ZIP Code action can be used to look up details of the ZIP Code entered by the customer.
It receives the number provided during the conversation and retrieves complementary information such as Street, Neighborhood, City, and State.

This action is recommended when you need to confirm whether the address provided by the customer is correct.
A common example is asking the customer for their ZIP Code, then displaying a new message with Street, Neighborhood, City, and State, asking if they confirm the address.


How to access

The Consult ZIP Code content is available in the Bot Builder.
To access it, click the desired block to open the Block Details modal and follow the steps below:

1. Click Add content and locate the Consult ZIP Code option.

2. Choose the source of the ZIP Code that will be validated. There are two options:

2.1 User Input: select this if the ZIP Code to be consulted is the last message sent by the customer to the chatbot;

2.2 Variable: select this if another question was asked before this action, allowing the chatbot to use the previously saved ZIP Code.

3. After configuring, click outside the block and select Save changes.

Tip: Check the box Save address in the conversation. When enabled, if the ZIP Code is validated, the identified address will be assigned to the customer and saved in the conversation record.


Displaying ZIP Code data

For the chatbot to receive the ZIP Code entered by the customer, you must include an Open field in the same block.
This field will allow the customer to type the ZIP Code before the consultation takes place.

Then, to display the identified data from the ZIP Code provided, add a new block and follow these steps:

  1. Click Add content;

  2. Choose the Open field option so the customer can enter the ZIP Code;

  3. In the same block, add another content of type Text message;

  4. Insert the variables in the message body. Example:

I found the following data: Street: <?$resposta_cep.result.logradouro?> Neighborhood: <?$resposta_cep.result.bairro?> City: <?$resposta_cep.result.localidade?> State: <?$resposta_cep.result.uf?>


Confirming the address

To confirm the information with the customer, create a new block using the Quick Response option:

  1. Create a new block;

  2. Click Add content;

  3. Choose the Menu option and the Quick Response type;

  4. Set up the question and response options. Example:

Do you confirm the identified data? Yes  No


Once this is done, finish building the flow and continue with the conversation normally. See below a visual example of how to build the flow in the chatbot builder:

Did this article solve your doubts?
Recently viewed