Create Approved WhatsApp Flows Template
WhatsApp Flows template allows you to send a message to start a conversation with a customer, where the customer can click a button that will open a WhatsApp flow so a customer can complete a form.
Prerequisites
Before creating a WhatsApp Flows template a published WhatsApp flow needs to be created in the WhatsApp business manager
- To create a WhatsApp Flow see create-a-whatsapp-flow
- Once you have published your WhatsApp Flow take a note of the flow id
How to create an approved WhatsApp Flows template
Step one: Set up up your message project
- Go to Content > Message templates.
- Click Create message template
- Under 'Platform', select WhatsApp.
- Under 'Interaction', select WhatsApp approved.
- Under 'WhatsApp Business account', select the account you want to use.
- Under category, select Marketing.
- Under 'Message type', select Flow.
- Give your message project a recognizable name.
- Give your message template a unique name. This name will be used when we submit your message template to WhatsApp for approval.
- Use the 'Default locale' dropdown to select the default language for your template.
- Click Create project.
Step two: Design and publish your template
Configure the header
- Text: Enter the desired text. Example: "Welcome to the WhatsApp Store!"
OR - Image, Video, or None: Select if you prefer a media file or no header.
Set up the body text
- Enter the Body Text in the designated field. This text will be the main content of your message.
- Example: "Hi there! We'd love to hear your feedback on your recent purchase. Please take a moment to complete this quick survey."
Add footer text
- Enter the Footer Text in the footer section. This is optional but can be useful for additional information.
- Example: "Your opinion matters to us."
Define the flow action
- The flow action defines what flow will be presented when the user clicks on the flow action button
- Fill in the following fields
- Flow ID: The unique identifier for the flow created earlier.
- Flow Button Label: Text that will appear on the action button. Example: "Give feedback"
- Flow Token: This can be set as a variable to provide a unique tracking id to each flow run.
- Flow Action: Choose between "Data Exchange" or "Navigate" depending on the required action. When selecting "Data Exchange"
- Ensure you have set up an endpoint for your WhatsApp Flow. See how to setup a whatsapp-flow-endpoint-trigger.md
- When selecting "Navigate"
-
Flow Starting Screen: Define the starting screen for the flow. Example: "SURVEY"
-
Flow Payload (JSON): Add any additional data in JSON format. If you are providing no starting data just enter {}Example:代码示例
{ "name": "John Smith" }
-
Publish the template
You can now publish the template