Sending WhatsApp Flows Through a Publisher Bot and Linking the Config Bot Application
Updated
After creating the WhatsApp Flow, configuring the Flow JSON, and building the orchestration logic within the Config Bot Application, the final step is exposing the Flow to end users. This is achieved through a Publisher Bot Application, which sends the WhatsApp Flow asset as part of a bot reply. When the user clicks the Call-to-Action (CTA) button on the Flow message, WhatsApp automatically invokes the Config Bot Application, which then manages all subsequent Flow interactions.
This article explains how the Publisher Bot and Config Bot work together, how to configure the Dynamic Asset, and the steps required to move a Flow from testing to production.
Understanding the Architecture
A Dynamic WhatsApp Flow implementation typically consists of two Conversational AI applications:
Publisher Bot Application
The Publisher Bot is the application the user is actively conversing with. Its responsibilities include:
Sending the WhatsApp Flow asset
Displaying the Flow entry point to the user
Linking the Flow to the secondary Config Bot Application
The Publisher Bot does not handle screen navigation or Flow logic.

Config Bot Application
The Config Bot Application contains:
The qualifying bot
Flow orchestration logic
Dialogue Tree configuration
Dynamic data exchange logic
Screen navigation handling
Once the user clicks the CTA button on the Flow message, this application becomes responsible for processing all Flow interactions.

Flow Invocation Journey
The interaction flow follows the sequence below:
The user interacts with the Publisher Bot.
Publisher Bot sends a WhatsApp Flow asset.
User clicks the CTA button.
WhatsApp invokes the linked Config Bot Application.
The Qualifying Bot within the Config Bot Application is triggered.
Dynamic Flow processing begins.
Every subsequent screen interaction invokes the same qualifying bot until the Flow is completed.
This separation allows the Publisher Bot to remain lightweight while the Config Bot manages the complete Flow lifecycle.
Configuring the Dynamic Asset in the Publisher Bot
The WhatsApp Flow asset is sent through a Bot Reply Node. To configure the asset:
1. Add a Bot Reply Node.
2. Enable the toggle: Write Script to Publish Dynamic Asset

3. Configure the Dynamic Asset JSON.
Required Parameters
The following parameters must be updated before using the asset.
flowId: The unique identifier of the WhatsApp Flow. This value is obtained from the WhatsApp Business Account (WABA).
Example:
sam.socialAsset.content['flowId'] = '26880631371550912'Replace the sample value with the actual Flow ID obtained from WABA.
applicationId: The Conversational AI Application ID of the Config Bot Application. This value links the Flow asset to the secondary application responsible for handling Flow interactions. When the CTA button is clicked, this application is automatically invoked.
Draft Mode Configuration
During testing, the Flow should remain in Draft mode. The Dynamic Asset script contains:
sam.socialAsset.content['flowMode'] = 'DRAFT'This allows unpublished Flows to be tested before moving to production. Only users with access to the Flow can interact with Draft-mode assets.
How the Config Bot is Invoked
The Flow configuration is typically maintained within a separate Conversational AI application. For example:
Primary Application
Bank Al Balad – Moe Amer [WA] BotThis application contains a Dialogue Tree with a Bot Reply Node that sends the Flow asset.
Secondary Application
WA_Flows_Italy_SecondaryThis application contains:
The Qualifying Bot
Flow orchestration logic
Dynamic screen routing
Data exchange configuration
When the CTA button is clicked:
The Flow asset references the secondary application's Application ID.
WhatsApp invokes the secondary application.
The Qualifying Bot is triggered.
The Dialogue Tree begins processing Flow interactions.
The Qualifying Bot serves as the central controller for the entire Flow journey and is invoked every time the customer performs an action within the Flow.
Publisher Bot vs Config Bot Responsibilities
Publisher Bot
Responsibilities include:
Sending the Flow asset
Displaying the initial message
Linking the Flow to the Config Bot Application
The Publisher Bot does not participate in Flow execution after the CTA button is clicked.
Config Bot (Orchestrator Bot)
Responsibilities include:
Processing Flow requests
Managing screen navigation
Returning dynamic payloads
Handling validations
Processing user inputs
Completing the Flow
All Flow-related logic should reside within this application.
Publishing the Flow to Production
After testing is complete, the Flow must be published from the WhatsApp Business Account.
Publish the Flow in WABA
1. Navigate to the WABA Record Manager.
2. Locate the Flow using its Flow ID.

3. Open the Flow.
4. Review the final configuration.
.png)
5. Publish the Flow.
Note: Once a Flow is published:
The existing Flow can no longer be edited.
Any future changes require the creation of a new Flow version.
For this reason, complete all testing before publishing. If publishing permissions are unavailable, coordinate with the Product or Support team for assistance.
Updating the Publisher Bot for Production
After publishing the Flow, update the Dynamic Asset script.
Remove:
sam.socialAsset.content['flowMode'] = 'DRAFT'This allows the Publisher Bot to send the published production Flow. Failure to remove this line may result in the published Flow not functioning as expected.
Customizing the Initial WhatsApp Flow Message
The Dynamic Asset allows customization of the message displayed to the user before launching the Flow.
Message Header: Configure the message header.
Example:
sam.socialAsset.content.header['text'] = 'Header text'Replace the Header text with the desired header value.
Message Body: Configure the primary content of the message.
Example:
sam.socialAsset.content['title'] = 'WA Title Here'Replace WA Title Here with the desired body text.
Message Footer: Configure any supplementary information.
Example:
sam.socialAsset.content['footerText'] = 'Footer here'Replace Footer here with the required footer content.
CTA Button Label: Configure the text displayed on the Flow launch button.
Example:
sam.socialAsset.content.submit['title'] = 'Submit Title'Replace Submit Title with the desired Call-to-Action label.
Examples include:
Start
Continue
Browse Products
Verify Identity
View Details
Complete Registration
Final Validation Checklist
Before publishing a Flow to production, verify the following:
WhatsApp Flow
Flow JSON is validated.
Screen navigation is working correctly.
Dynamic payloads are functioning.
Terminal screens are configured.
Flow is published in WABA.
Config Bot Application
Qualifying Bot is configured.
Screen routing logic is complete.
Dynamic data exchange is validated.
Success handling is implemented.
Publisher Bot Application
Correct Flow ID is configured.
Correct Application ID is configured.
Message content is finalized.
CTA button label is configured.
Draft mode has been removed after publishing.