Data Exchange
Data exchange lets your flow communicate with your server in real time. When a customer interacts with your flow, WhatsApp sends data to your endpoint, your server processes it, and returns dynamic content — all in the blink of an eye.
Use data exchange when you need to:
- Fetch dynamic data — available time slots, product prices, account details
- Validate input — check if a coupon code is valid, verify an email isn't already registered
- Process submissions — create a booking, update a record, trigger a notification
How it works
- Switch to Smart Flow — Click the flow mode button in the builder header to switch from "Simple Flow" to "Smart Flow". This enables data exchange for the flow.
- Endpoint URI — An endpoint URL is auto-generated for your flow (read-only — managed automatically by EzPulze)
- Configure a footer action — Add a footer with the "Data Exchange" action on the screen where you need server communication
- Customer taps the button — WhatsApp collects the form data and sends it to your endpoint
- Your server responds — Return dynamic data that populates the next screen
- Customer sees the result — The next screen loads with the server-provided data
Data exchange is also auto-enabled when you configure an External API data source on any component — the flow automatically switches to Smart Flow mode.
Customer fills form → Taps button → WhatsApp encrypts data → Your server
│
Customer sees next screen ← WhatsApp decrypts ← Server responds ←─┘
Encryption
All data exchange communication is encrypted end-to-end using RSA-2048 + AES-128-GCM:
- WhatsApp encrypts the request payload using your public key
- EzPulze decrypts the payload using your private key
- Your flow logic processes the data
- EzPulze encrypts the response using the same AES key
- WhatsApp decrypts and displays the result to the customer
Encryption keys are managed automatically by EzPulze. You can rotate keys from the settings if needed — for example, as a security best practice or if you suspect the keys may have been compromised.
Footer Data Exchange action
To trigger a data exchange from a screen:
- Click on the Footer component
- Set the action type to Data Exchange
- Configure the payload — a JSON object with
${form.field}references
2. Select "Data Exchange" as the action type
3. Add a payload with form field references
4. Capture the configuration panel
Save to:
static/img/screenshots/developer-tools/whatsapp-flows/data-exchange/footer-data-exchange.pngExample payload:
{
"name": "${form.full_name}",
"email": "${form.email}",
"service": "${form.service_type}"
}
When the customer taps the button:
- The
${form.field}references are replaced with the customer's actual input values - The payload is encrypted and sent to your endpoint
- Your server processes the data and returns the next screen's content
- The customer is navigated to the next screen with the server-provided data
Update Data action
The Update Data action (available in WhatsApp Flow JSON v7.1+) sends data to your server and updates the current screen without navigating to a different screen.
This is useful for:
- Dependent dropdowns — selecting a country updates the city dropdown
- Live calculations — updating a quantity recalculates the total price
- Inline validation — checking if a username is available without leaving the screen
Configure it the same way as Data Exchange — set the footer or navigation list action to "Update Data" and provide a payload.
Validation rules
When using Smart Flow mode, you can add server-side validation rules for each screen. These rules validate the customer's input before your server processes it — catching errors early and showing clear error messages.
Configuring validation
- Open the screen where you want to add validation
- Click Validation Rules in the screen settings
- For each field, add one or more validators
2. Add validators for email (required, email format) and phone (required, phone format, min length)
3. Capture the dialog showing the validator list with badges
Save to:
static/img/screenshots/developer-tools/whatsapp-flows/data-exchange/validation-config.pngAvailable validators
Basic validators
| Validator | Description | Example |
|---|---|---|
| Required | Field must have a value | "Please enter your name" |
| Must be a valid email format | "Please enter a valid email address" | |
| Phone | Must be a valid phone number | "Please enter a valid phone number" |
| URL | Must be a valid URL | "Please enter a valid URL" |
| Numeric | Must be a number | "Please enter a number" |
String validators
| Validator | Parameter | Description | Example |
|---|---|---|---|
| Min Length | minLength | Minimum number of characters | "Must be at least 3 characters" |
| Max Length | maxLength | Maximum number of characters | "Must be less than 100 characters" |
| Pattern | pattern (regex) | Must match a regex pattern | "Must contain only letters and numbers" |
Number validators
| Validator | Parameter | Description | Example |
|---|---|---|---|
| Min Value | min | Minimum numeric value | "Must be at least 1" |
| Max Value | max | Maximum numeric value | "Must be 100 or less" |
Date validators
| Validator | Description | Example |
|---|---|---|
| Future Date | Date must be in the future | "Please select a future date" |
| Past Date | Date must be in the past | "Please select a past date" |
Database validators
These validators check values against your database — useful for ensuring uniqueness or existence.
| Validator | Description | Example |
|---|---|---|
| Unique Email | Email must not already exist in the database | "This email is already registered" |
| Unique Phone | Phone number must not already exist | "This phone number is already registered" |
| Exists in DB | Value must exist in a specified table/column | "Invalid coupon code" |
Custom error messages
Each validator can have a custom error message. If no custom message is provided, a default message is used. Keep messages short and helpful — tell the customer what they need to fix.
Validation summary
After configuring validators, a badge shows the number of validators on each field. This gives you a quick overview of which fields have validation rules.
Send test flow
Test your flow before publishing by sending it to a real WhatsApp number.
- Click Send Test from the flow builder or flow list page
- Configure the test options:
2. Fill in the recipient phone number
3. Select a first screen and configure screen data
4. Capture the full dialog
Save to:
static/img/screenshots/developer-tools/whatsapp-flows/data-exchange/send-test-dialog.png| Option | Description |
|---|---|
| Recipient phone | The WhatsApp number to send the test to |
| Flow token | A token for tracking the test session (auto-generated for Smart Flows) |
| First screen | Which screen to show first (defaults to the first screen) |
| Request data on first screen | Whether to trigger a data exchange request when the first screen opens |
| Screen data | A JSON editor (Monaco) where you can provide initial data for the first screen — useful for testing dynamic content without a running server |
- Click Send
- The flow is delivered to the selected contact's WhatsApp
You can send test flows for Draft flows — no need to publish first. This is the best way to test data exchange, dynamic data, and validation rules before going live.
Send test flows to yourself or team members to verify the full experience on a real device.
Tips
- Use Smart Flow only when needed — Simple forms that collect static data can stay as Simple Flows. Smart Flow adds API connectivity and requires a running server endpoint.
- Test with the Send Test dialog — Use the screen data JSON editor to simulate server responses without setting up a server.
- Add validation rules for critical fields — Email and phone validators catch typos early. Unique validators prevent duplicate registrations.
- Use Update Data for dependent fields — When one field's value should change another (like country → city), Update Data keeps the user on the same screen.
- Keep payloads small — Only send the fields you need. Large payloads slow down the data exchange.