Replying to Messages with WhatsApp

Using SmartFlows to reply to a WhatsApp Session Messages can occur as:

  • Synchronous Message Replies
  • Asynchronous Replies

Synchronous Message Replies

Synchronous replies are single or multiple message replies to WhatsApp Session Messages that contain the WhatsApp Inbound Message trigger. Messages of these type include message receipt acknowledgments (for example, “we got your message”), automated responses (for example, automated bot-based messaging), or generally any message that does not involve an agent or third-party system involvement.

Asynchronous Replies

Asynchronous replies are replies to WhatsApp session messages that require the message be sent to an external system (for example, ACD, CRM, or workflow automation) outside of SmartFlows before another system for processing.

Sending Replies

How you send the reply depends on the type of reply you are using.

For Synchronous Message Replies:

Synchronous message replies are the easiest types of replies to configure.

To configure:

  1. Add a Send WhatsApp action to your SmartFlow.

A sample flow with an Inbound API action connected to the Send WhatsApp action

  1. Click the Send WhatsApp action.
  2. Select the appropriate Message Type: Text or Image.
  3. Complete the configuration of the message. For more information, see Send WhatsApp.
  4. The App Id and App User Id are not required. The Send WhatsApp action gathers the information from the Inbound WhatsApp message trigger.

For Asynchronous Message Replies:

Sending Asynchronous Message Replies are a little more complicated. They require multiple SmartFlows to complete the process, a message receiving flow, and a reply message flow.

The Message Receiving Flow

The message receiving flow contains the Inbound WhatsApp Messaging trigger. At some point in the flow, you must send the message to a third-party system. This could be an agent chat application, a customer relationship management system, or even a call distribution system.

How the message is sent to the third-party system may vary. When the message is sent, ensure that you send the following system variable information:

  • $IbWapp.messageText: The message that was received
  • $IbWapp.appId: Identifies which WhatsApp number received the message
  • $IbWapp.appUserId: Identifies the conversation you are replying to

If you are using the External Web Call action to send the message to the third-party system, you can find additional information on how to configure this action here.

The Reply Message Flow

Reply message flow is normally executed via a call to the SmartFlows API. For specifics on how to call SmartFlows via an API, see Executing SmartFlows from an External Source.

To configure your flow:

  1. Within the Inbound API trigger, you must include the following variables in the Inputs section:
    • replyText or replyURL: The message or image you want to reply with.
    • appId: Identifies which WhatsApp number received the message
    • appUserId: Identifies the conversation you are replying to.

The Inputs section of the Configurations Panel for an Inbound API action

  1. Add a Send WhatsApp to your Flow.

The Send WhatsApp action in the sample flow is selected

  1. Configure the Send WhatsApp Inputs based on the Message Type: Text or Image.
  2. Add any additional steps your business rules require.

  3. Save and Deploy your flow.

Your flow now has everything it needs to successfully reply. You can now test your replies from your external system.

For additional information, check out Send WhatsApp.