WhatsApp Flows
WhatsApp Flows is an enhancement to the existing WhatsApp channel, allowing you to create interactive and dynamic messaging experiences. This page provides step-by-step instructions for participating in the Early Access program and using WhatsApp Flows.
Setting up WhatsApp Flows
- Log in to your Meta account.
- Create Flows from one of two main locations:
- Account tools: Go to the Flows tab to view the Flow ID and create a new Flow.
- Manage templates: This is the recommended method for creating Flows. Here, you can generate templates and select a Flow option during the template creation process.
- Select an existing Flow or create one. If creating a Flow, choose from two options:
- Custom Form: For specific requirements
- Pre-designed Elements: For quicker setup
Configuring WhatsApp Flow messages and responses
- In a Braze Canvas, create a WhatsApp message step that uses the template message containing the Flow you created.
- Continue creating your template. If necessary, add media, variable content, or both to your message. Your Flow selection is chosen when the template was made, so additional information for the flow experience is not required.
Flow preview is not yet available in the early access, but you can preview the Flow by sending yourself a test message.
Saving the full Flow response
Step 1: Create an Action Path
Create an Action Path with Send a WhatsApp inbound message trigger to process the Flow information.
You’ll be able to specify the Flow when additional features are released during early access.
Step 2: Compose your WhatsApp message
When composing your WhatsApp message, select the plus icon to open the Add Personalization window, then select WhatsApp Properties for the personalization type and inbound_flow_response for the custom attribute. This will save information to user profiles or forward it to other services, like webhooks.
Step 3: Save the full Flow response
You can use the advanced JSON editor to save attributes from the Flow response to custom attributes, or use a multi-step Canvas to save the response to a nested custom attribute.
In the advanced JSON editor, enter {"attributes": [{"flow_1": {{whats_app.${inbound_flow_response}}}}]}
, where “flow_1” is the custom attribute you’d like the flow to be saved to.
- Confirm that you have already created a custom attribute with the object data type (“flow_1” in this example) inside of your workspace data settings.
- In the UI editor, use the Liquid
{{whats_app.${inbound_flow_response}}}
to populate the custom attribute and save the entire user’s Flow response to it. You need to populate the key value as{{whats_app.${inbound_flow_response}}}
before selecting the custom attribute you created.
After Braze receives a Flow response, we will save the nested custom attribute with the prescribed naming to the user profile. That custom attribute can be pulled when building Canvases.
When you’re ready, send a test message to test the Flow. Then, launch the Canvas!
Saving specific fields from Flow responses to a specific custom attribute
You can use nested custom attributes or the json_parse
Liquid tag to extract specific fields from Flow responses.
To save specific parts of the user’s Flow response, complete all the steps in Saving the full Flow response, including launching the Canvas. The Canvas must be launched to create the nested custom attribute that you will reference. After launching the Canvas and completing a Flow, do the following steps:
- Create a subsequent User Update step that uses the UI editor.
- Select Add Personalization, then select Nested Custom Attribute and the corresponding top-level attribute where the Flow is stored.
- Select the key attribute you’d like to save and insert the Liquid into the Key Value field.
- Choose the attribute where you want to store it.
- Send a test message to test the Flow.
Use the json_parse
Liquid tag to extract specific responses from the flow. For example, you can pull out the Flow token and selected options to customize a follow-up message.
Step 1: Create an Action Path
Create an Action Path with Send a WhatsApp inbound message trigger to process the Flow information.
You’ll be able to specify the Flow when additional features are released during early access.
Step 2: Compose your WhatsApp message
When composing your WhatsApp message, select the plus icon to open the Add Personalization window, then select WhatsApp Properties for the personalization type and inbound_flow_response for the custom attribute. This will save information to user profiles or forward it to other services, like webhooks.
Step 3: Save specific fields from the Flow response
In the UI editor, select the following:
- Attribute Name: YOUR_CUSTOM_ATTRIBUTE (in this example: “First_name”)
- Action: Update
- Key Value:
{% assign parsed_json = {{whats_app.${inbound_flow_response}}} | json_parse %}{{ parsed_json.FIELDS_THAT_APPLY }}
A new WhatsApp message “clears” the Canvas’s ability to use (and reuse) the Liquid Flow response, so make sure that follow-up messages are after all User Update steps, webhooks, or other steps that use the Liquid Flow response.
When you’re ready, send a test message to test the Flow. Then, launch the Canvas!
Additional Flow functionalities will be introduced, including advanced action step filters and response messages that incorporate Flow elements.
For any questions or further assistance, contact Support.