WhatsApp Flows

Integrating WhatsApp Flows with Dialogflow

Updated 14 November 2026

If your Dialogflow CX agent is connected to Baat, it can send a WhatsApp Flow and read the answers the customer submits. Baat passes the messages both ways, so you do not need a server of your own for this.

Before you start, connect your agent. See Connecting Dialogflow CX to Baat. Your Flow must be published in Meta.

How it works

  • Your agent replies with a custom payload that describes a Flow message

  • Baat sends the Flow to the customer, with a button that opens it

  • The customer fills in the form and submits it

  • Baat sends the submission to your agent as a new turn, with the text flow_submitted and each answer as a session parameter

  • Your agent replies, and Baat sends the reply to the customer

Sending a Flow from your agent

In the fulfillment of a page or route, add a Custom payload like this:

{
  "type": "flow",
  "meta_flow_id": "1234567890",
  "flow_cta": "Book now",
  "body": "Tap below to choose a date and time.",
  "footer": "Takes under a minute",
  "flow_screen": "SERVICE_SCREEN"
}
  • meta_flow_id — the Flow’s ID in Meta. Required

  • body — the message text shown above the button

  • flow_cta — the button label. If you leave it out, Baat uses “Open Form”

  • flow_screen — the id of the Flow’s first screen. If you leave it out, Baat uses FIRST_SCREEN, which works only if your first screen has that id

  • footer and header — optional

Baat creates a unique flow_token for every Flow it sends.

You can also write the Flow as a full WhatsApp interactive message inside the BAAT_WAC_API key. See Sending interactive WhatsApp messages from Dialogflow CX.

Receiving the answers

When the customer submits the Flow, Baat sends your agent a turn with the text flow_submitted. Each field in the Flow’s complete payload becomes a session parameter with the same name. For example, a field called appointment_date arrives as $session.params.appointment_date.

  • Answers that are lists or objects arrive as JSON text

  • The flow_token is not passed on

  • A field cannot replace the parameters Baat sets itself, such as conversation_id, merchant_id and contact_phone. Give your fields other names

Only fields listed in the Flow’s complete payload are sent. See WhatsApp Flow JSON structure.

Handling the submission in your agent

On the page that sent the Flow, add a route that matches the text flow_submitted, for example with an intent trained on that phrase. In its fulfillment, use the answers in your reply:

Thanks $session.params.full_name! Your booking for $session.params.appointment_date is confirmed.

The route can also call your own webhook first, for example to save the booking in your system.

The answers are also stored in Baat: in the conversation, and under View responses in Settings → Flows.

Filling a Flow with live data

Some Flows need data while the customer is filling them in, such as free time slots. Meta calls this data_exchange. Meta sends these requests straight to an endpoint that you host and register with Meta, not to Baat or to Dialogflow. The requests are encrypted, and your endpoint must decrypt them and encrypt its replies. Meta’s WhatsApp Flows documentation explains how to set this up.

Related reading

Where this fits in the wider picture.

Need a hand?

Our team answers on WhatsApp, usually within a business day.

Contact support Book a demo