Cascading Message Sending#

Description#

Cascading message sending is the sequential sending of a message via different channels over the message’s lifetime.

The message is resent in case of receiving a status indicating that the message was not successfully sent.

The service supports the following types of cascading message:

  • FlashingCall;

  • Push;

  • SMS;

  • Viber;

  • VK;

  • WhatsApp.

When sending it can be any sequence of message types.

The order and options for such resending can be configured on the Service Provider’s side at the request of the Partner. In this case this additional sending of messages performs with the default parameters, and no additional parameters need to be passed in the request body.

It is possible to pass the desired cascade options using additional parameters of the HTTP request.

Request Parameters#

Possible parameters of the HTTP request for cascade message resending.

Parameter Name

Type

Description

order_list

string

A parameter that defines the sequence of message sending.

More details

Message types should be listed in the order they are to be sent.

Possible values (case insensitive):

  • s – SMS;
  • p – Push;
  • v – VK;
  • i – Viber;
  • w – WhatsApp;
  • f – FlashingCall.

Example: order_list=v,i,s means sequential resending of messages of the following types: VK → Viber → SMS.

<type>_resendCond

string

A parameter that defines the conditions for triggering a resend.

More details

Here is a character that defines the type of message (i, s, v, f, p, w), for which the settings are applied.

Possible values (case insensitive):

  • N – do not resend;
  • Y – resend upon receiving status Not Delivered;
  • S – same as Y, plus resending will occur if status Viewed is not received within the message's lifetime.

Important! The value S is not applicable for SMS and FlashingCall messages, as they do not have a Viewed status.

Using a combination of parameters, various settings can be defined for different types of messages.

Example 1. Standard values with arbitrary order of message types:
order_list = "W,V,S", W_resendCond = Y, V_resendCond = S

In this case, a resend will be performed to VK if the status Not Delivered is received for WhatsApp, and then to SMS if the status Viewed is not received, or if the status Not Delivered is received for VK.

Example 2. In this case, only the first message of the cascade (Flashing Call) will be sent:
order_list = "F,S", F_resendCond = N, S_resendCond = Y

The cascaded SMS will not be sent, as the triggering of a cascade AFTER the Flashing Call message is prohibited (F_resendCond = N).
The parameter S_resendCond = Y has no effect here, as this is a setting for triggering the cascade AFTER SMS.

<type>_resendSn

string

A parameter that defines the service names from which messages will be sent in resend mode.

More details

Here is a character that defines the type of message (i, s, v, f, p, w), for which the settings are applied.

Example. v_resendSn=0002&i_resendSn=0001&s_resendSn=0000 means that:

  • VK messages are sent from the 0002 name;
  • Viber messages are sent from the 0001 name;
  • SMS messages are sent from the 0000 name.

The service names used must be available for the Partner.

To use service names, please contact your account manager.

<type>_resendText

string

A parameter that defines the alternative message text for different types of messages that will be sent in resend mode.

More details

Here is a character that defines the type of message (i, s, v, f, p, w), for which the settings are applied.

Example: v_resendText=textVK&i_resendText=textViber&s_resendText=textSMS means that:

  • VK messages are sent with the text textVK;
  • Viber messages are sent with the text textViber;
  • SMS messages are sent with the text textSMS.

The message text is subject to the same restrictions as the corresponding types of individual messages (see the relevant sections “Request Parameters”).

<type>_resendValid

string

A parameter that defines the lifespan for different types of messages sent in resend mode.

More details

Here is a character that defines the type of message (i, s, v, f, p, w), for which the settings are applied.

The lifespan means the interval during which the operator will attempt to deliver the message to the recipient. If the message lifespan has expired and the message has not been delivered, it will no longer be delivered to the recipient.

The value format for the parameter is: YYMMDDhhmmsstnnp, where:

  • YYMMDDhhmmss – year, month, day, hours, minutes, seconds;
  • t – tenths of seconds;
  • nn – quarters of an hour (15 minutes each), for example, for 8 hours the value will be 32;
  • p – offset.

Possible values for p:

  • + and specify the time offset from GMT in either direction, i.e., 08+ corresponds to GMT+2, and 04– corresponds to GMT–1;
  • R – the values of t and nn are ignored, everything else is added to the current local time.

Acceptable lifespan ranges for different types of messages:

  • SMS – from 1 to 2880 minutes (up to 2 days);
  • FlashingCall – from 1 to 5 minutes;
  • VK – from 60 to 86400 seconds (up to 1 day);
  • Viber – from 30 to 86400 seconds (up to 1 day);
  • Push – from 30 to 86400 seconds (up to 1 day);
  • WhatsApp – from 1 to 10080 minutes (on the operator's side, the value is rounded to whole days).

shorten_list

string

A parameter designed to control the shortening of links in various types of cascaded messages.

More details

Important! This parameter will only be processed if the order_list parameter is provided.

The value of the shorten_list parameter may contain:

  • a list of message types (comma-separated) for which links need to be shortened;
  • an empty value (shorten_list=) if link shortening is not required for all message types.

Possible values (case insensitive):

  • s – SMS;
  • p – Push;
  • v – VK;
  • i – Viber;
  • w – WhatsApp.

Example: shorten_list=S,I means that links will be shortened only in SMS and Viber messages of the cascade.

By default, the Link Shortening Service is not available. To enable it, please contact your account manager.

Примечание

An example of the processing procedure for configured cascade sending VK → Viber → SMS:

  1. The message will be sent into VK.

  2. If the message is successfully delivered, the cascading is completed (go to step 6).

  3. If the message is not delivered due to an error or within the specified time to live, the message will be resent via Viber.

  4. If the message is successfully delivered, the cascading is completed (go to step 6).

  5. If the message is not delivered due to an error or within the specified time to live, an SMS message will be sent.

  6. The Partner receives the final status of message sending (optionally - all intermediate statuses).