Example Flow - Hand off call to WhatsApp message

In some scenarios you may want to allow a caller to choose to get contacted via WhatsApp instead of continuing a voice conversation. For these scenarios, below you'll find details on how this can be accomplished using Webhooks in Genius.

In this case we have spelled out how to create a Flow which offers an IVR to callers. If callers choose a certain option in the IVR, a message will be sent to the WhatsApp API which triggers a message to be started in WhatsApp to the number that caller has called from. After that, the call is disconnected so that the conversation can continue on WhatsApp instead.

 

Premium Cloud Service Required

In order to use Advanced Flow Builder functionality, you will need the Premium Cloud Service subscription. This enables usage of Webhooks to communicate with systems external to Genius. Please contact your Account Manager and see the Pricing Page for more details.

 

 

Prerequisites:

  • Have a WhatsApp Business Account setup and have a Profile setup in Meta Business Manager
  • Create a WhatsApp App in Meta Business Manager
  • Have at least 1 approved Message Template in the Meta Business Manager
  • Have payment information in Meta Business Manager
  • Have an API Key from Meta Business Manager

How to set up in Genius:

  1. Set up a new Flow
    1. Go to Flow Builder and Add a new Inbound Flow

 

  1. Add your IVR and routing nodes

 

  1. Set up a Webhook node for the routing option you want to send to WhatsApp
    1. Method & URL: POST https://graph.facebook.com/v22.0/[Your Number ID Goes Here]/messages
    2. Headers: 
      1. parameter key = Authorization 
      2. value = Bearer [Your Bearer Token from WhatsApp goes here]
    3. Body:
      1. {
            "messaging_product": "whatsapp",
            "recipient_type": "individual",
            "to": "<%-call?.from?.number%>",
            "type": "template",
            "template": {
                "name": "whatsapp_request",
                "language": {
                    "code": "en_US"
                }
            }
        }
      2. Make sure you have an approved Message Template in your WhatsApp Business account, and make sure you know the language for that Message Template. You will need to provide the name of the template exactly as shown in WhatsApp and the correct language code for this to work.

 

WhatsApp API Tips:

  • Add confirmation audio to the WhatsApp option so that once the user presses the relevant number in the IVR you inform them “Your call will end and you will receive a WhatsApp message shortly” so that the call does not abruptly end
  • Test different numbers from different countries you would expect to see calls from to ensure the number formatting is correct
  • Test the API call out separately in Postman before plugging the configuration into Genius, that can allow you to do quick troubleshooting on the API call
 

 

Give feedback about this article

Was this article helpful?

Have more questions? Submit a request

Can’t find what you’re looking for?

Contact our award-winning customer care team.