Validate a User or an API Response - Flag
A flag is used to validate an end user or API response which is saved under Key Name. It supports the following options:
- email_id - It can be used to validate that the value stored in Key Name is a valid email address.
- phone_number - It can be used to validate that the value stored in Key Name is a valid phone number. It uses a phone number library to check whether it is valid or not.
- media - It can be used to validate that the value stored in Key Name is a valid media file.
- location - It can be used to validate that the value stored in Key Name is a valid WhatsApp location (expressed in latitude and longitude).
- Regex - Regular expressions can be used to validate that the value stored in Key Name matches a certain pattern. For example, if you want the user reply to contain only numbers, you would add the following regex in the Flag field: ^[0-9]+$.
If the validation fails, the Retry message is sent. After 3 errors in a row, the message in the Final Retry field will be sent, and the end-user will exit the intent.
Note:
The Retry message should not be provided if Response Callback is used.
Updated 11 months ago