Data Exchange
Data exchange is used to enable the exchange of data between your system and Meta within the WhatsApp Flow process.
To create a data exchange, navigate to the Bot Settings menu and select Dialog Flows. You can create the required Intention and Entity as described on the previous page. Then, at the Prompt Response stage, select 'WhatsApp Flows' and complete the Attach WhatsApp Flows form as shown in the image below.

Component Explanation:
Title
The main title that appears in the WhatsApp message when the flow is sent to the customer.
Body
The main content of the message that explains the purpose of the flow and provides guidance to the customer.
Flows ID
The ID from Meta Business Suite used to connect a previously created WhatsApp Flow.
Flows CTA
This is text that will displayed on the form button to customers.
Flows Action
A field to define the action for data exchange that will be sent to Meta.
Note:
data_exchange = Indicates the data from flows will be sent to Meta for each step form.
navigate = No data exchange occurs because the page has been predefined from the beginning, as defined in the flow screen ID.
Flows Screen ID
An Screen ID that directs customers straight to the Flows step after clicking the CTA button.
Note: Required if using navigate within Flows Action.
Fallback Message
This is the message that will be sent to the customer if the WhatsApp Flow cannot be executed.
In the process flow, you are required to add an MVEL node named handler, which functions to handle data requests from WhatsApp when a user clicks the flow, as shown in the image below.

It is also necessary to add flowData for each data element requested by Meta. This flowData contains information sent from the flow, including the last accessed page, the currently active page, the flow name, the flow ID, and the flow completion status (whether the flow has been completed or not).

Each final node that will be sent to WhatsApp must include the following script:
The final step is configuring the endpoint in the Business WhatsApp Flow to enable data exchange with the flow.

The endpoint configuration in the process flow can be seen in the image below.

Last updated
Was this helpful?