Sending messages via automation
This section deals with automation in chats to send messages and run workflows.
Basic chat flow
A basic chat flow where agent is a participant of the chatroom along with capabilities to send one-way messages via API (for ex. at the start of the chatroom or updates in between) is achieved as follows.
Create a contact
Create a chatroom with participants
Send a message
Send Template Message API
Since WABA requires initialization of a new chat session via a pre-approved template, the API currently allows sending of only template messages via API.
Even during the conversation, any interactive message, for example, messages with buttons, also need to be sent as a template.
Workflows using templates
Organizations that want to optimize agents time may want to send messages and also process the response via workflow automation.
To be able to achieve this, the Send Template Message API provides a relay_response query parameter.

Silent messaging / Bump
In a basic chat scenario, each message bumps the chatroom to the top of the chatroom list.
Organizations may require that while the workflow automation is sending messages as well as any interaction on the template message remain silent and do not bump the chatroom to the top.
To be able to achieve this, the Send Template Message API provides 2 parameters -
bump- when set tofalse, the chatroom will not be bumped to the top of chatroom list when a template message is sent.bump_response- when set tofalse, any interaction with the template message will not bump the chatroom to the top of the chatroom list.

Optimizing Agent Participation
A new chatroom for a participant, unlike a message, will always bump it to the top of the chatroom list.
In some cases, bots can handle the initial conversation with a new customer. The system sends a message and waits for the customer to respond. On the basis of handover rules, a human agent can step in to manage the interaction. This ensures efficiency and allows agents to focus on engaged customers.
To be able to achieve this, the Create Chatroom API provides a flag assign_on_handover
This would also make sure that the chatroom is created but not bumped in the list of chatrooms for the agent, because the agent is not yet a participant of the chatroom.
Explicit Reassignment
In some cases, organizations may want to send a message to a customer and not wait for response even though assign_on_handover was set to true .
Consider the following scenario -
A chatroom was created with
assign_on_handoverset totrueA message was sent via STM
Customer neither interacted with the STM message nor responded with any free flow message
Organization would like the agent to follow up manually
To achieve this, you can re-assign chatroom.
On explicitly reassigning in this manner, the pending assign_on_handover will be discarded.
Last updated