Hi, Humans. How may we help you?

12. Troubleshooting Data Validation in Zenvia Customer Cloud
5 min
Created by Ligia Sarmento on 7/15/2025 3:58 PM
Updated by Ligia Sarmento on 7/15/2025 4:06 PM

When creating a conversation flow for your chatbot in Zenvia Customer Cloud, it's common to set up validations to ensure the information provided by users is correct. This data might include a Social Security Number (SSN), email, phone number, order number, among others.

However, sometimes a configured validation might not work as expected. This article details the main reasons this occurs and what you can do to fix the problem, ensuring your chatbot collects accurate data and maintains a smooth conversation.

How Field Validation Works in Zenvia Customer Cloud

Validation usually happens through variables and conditions configured within the flow builder.

When a user types a response, the chatbot checks if that response meets the defined rules. If it doesn't, the chatbot can ask the user to correct the information, ensuring the quality of the collected data.

Use Cases and Troubleshooting

If your chatbot's validation isn't working, the most common issues are related to variable configurationdata format, or block exit conditions.

1. Data Formatting Issues

One of the most frequent reasons for validation failure is incorrect data formatting entered by the user.

Example: If you expect a Social Security Number (SSN) in the format 000-00-0000, but the user types 000000000 (only numbers), the validation might fail if it's not configured to accept both formats.

Solution:

  • Check the validation rule: Make sure the rule defined in the chatbot builder aligns with what the platform accepts by default for each field type. For an SSN, for example, Zenvia Customer Cloud's default validation usually works well with just the 9 numeric digits.

2. Incorrect Variable Configuration

In Zenvia Customer Cloud, information provided by the user is stored in variables. If the variable isn't being captured or used correctly, the validation won't work.

Example: You used or created a variable called #{user_ssn}, but the validation block is trying to check a different variable, like #{client_ssn}.

Solution:

  • Review the variable name: Check if the name of the input variable (where the user's response is saved) is exactly the same as the one used in the validation condition.

  • Confirm the block action: Make sure the input block is configured to save the response to the correct variable.

3. Block Order and Exit Conditions

The order of blocks and their exit conditions determine the conversation flow. If the validation is in the wrong place or if the exit condition is misconfigured, the chatbot might skip the validation or proceed to the wrong block.

Example: If field validation is in the block after information collection, but the previous block's exit condition already directs the user to the next step without checking the validation.

Solution:

  • Check the block order: Validation should occur immediately after collecting user information.

  • Adjust exit conditions: Make sure the validation block has an exit condition that directs the user to an error block (if validation fails) and another condition that directs them to the next step of the flow (if validation is successful).

Tips for Minimizing Validation Errors

  • Test the flow frequently: Use the chatbot's test function to simulate user interaction and check if validation works in different scenarios (valid and invalid inputs).

  • Use clear error messages: When validation fails, provide a message to the user that explains the reason for the error and suggests the correct formatting (e.g., "Please enter your SSN in the format 000-00-0000").

  • Consider flexibility: In some cases, allow the user to try again before escalating to a human agent.

Did this article solve your doubts?
Recently viewed