Replying to Messages with WhatsApp

Using SmartFlows to reply to a WhatsApp Session Messages can occur one of two ways: 

    1. Synchronous Message Replies 
    2. 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 (eg. “we got your message”), automated responses (e.g. automated bot-based messaging), or generally any message that does not involve an agent or third-party system involvement.  

Asynchronous Message Replies 

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

Sending Replies  

How you send the reply will depend on the type of reply you will be using. 

For Synchronous Message Replies: 

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

To configure: 

    • add a WhatsApp Send Action to your Atmosphere SmartFlow: 

  • Click on the WhatsApp Send action 
  • Select the appropriate Message Type (Text or Image) 
  • Complete the configuration of the message. For details see WhatsApp Send Message Action 
  • The App Id and App User Id are not required. The WhatsApp Send action will gather that information from the Inbound WhatsApp Message Trigger.  

For Asynchronous Message Replies: 

Sending Asynchronous Message Replies are a little more complicated. They will require multiple Atmosphere 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 will need to 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 you will need to 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 will normally be executed via a call to the Atmosphere SmartFlows API. For specifics on how to call SmartFlows via an API, please see Executing SmartFlows from an External Source

To configure your flow:  

  • Within you Inbound API Trigger, you will need to include the following variables: 

  • replyText or replyURL: The message or image you wish to reply with. 

  • appId: Identifies which WhatsApp number received the message 
  • appUserId: Identifies the conversation you are replying to. 

  • Next, you will add a WhatsApp Send to your Flow 

  • Configure the WhatsApp Send based on the message type  

  • For Text: 

  • For image: 

  • Add any additional steps your business rules require.  
  • 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. 

 

 

Additional Information 

WhatsApp Send Message Action