Messaging Apps Fallback management

8x8 Messaging Apps API allows you to set a fallback sequence and orchestrate messages between different channels.

This can be done at the subaccount level for all messages (please contact your account manager to set this up), or on sending a message using our Messaging Apps API.

๐Ÿšง

The callback sequence defined in the Send API will overwrite any setting that is already in place at the subaccount level.

Setting a callback sequence

{
    "channels": [
        { "channel": "WhatsApp", "fallbackAfter": 60, "successStatus": "Read" },
        { "channel": "Viber", "fallbackAfter": 60, "successStatus": "Delivered" },
        { "channel": "SMS" }
    ],
    
    "user": {
        "msisdn": "+65000000"
    },
    "type": "text",
    
    "content": {
        "text": "Hello World!",
        "sms": {
            "encoding": "AUTO",
            "source": "SENDERID"
        }
    }
}

The status can be:

  • Accepted
  • Sent
  • Delivered
  • Read

Please see Supported Messaging Apps for the list of supported channels and statuses per channel.

In the example above, you are sending your message on WhatsApp channel first, with a fallback after 60 seconds, in case this message is not read.

If the fallback is triggered, you are then sending to Viber and defining a new fallback after 60 seconds, in case the message is not delivered.

In this case, the last channel, SMS will be triggered.

Another example:

{
    "channels": [
        { "channel": "WhatsApp", "successStatus": "Accepted" },
        { "channel": "SMS" } 
        ],
    
    "user": {
        "msisdn": "+65000000"
    },
    "type": "text",
    
    "content": {
        "text": "Hello World!",
        "sms": {
            "encoding": "AUTO",
            "source": "SENDERID"
        }
    }
}

In this case, you are requesting this message to be sent to WhatsApp first and fallback to SMS, only in case WhatsApp rejects the message.

This is a great setting if you are not sure if a phone number is registered on WhatsApp or not.

You can also use this mechanism to define a single channel, for example:

{
    "channels": [ { "channel": "WhatsApp" } ],
    
    "user": {
        "msisdn": "+65000000"
    },
    "type": "text",
    
    "content": {
        "text": "Hello World!",
        "sms": {
            "encoding": "AUTO",
            "source": "SENDERID"
        }
    }
}

โ—๏ธ

Important

Please make sure that your fallback settings are in line with the channels you are using.