Omnichannel webhooks

The article provides information on various types of webhooks related to omnichannel functionality, including the list of parameters and examples in JSON format.

sms_sent

SMS message was sent to the user.

🚧

If you received only the "sent" webhook, it means that the SMS was successfully sent to the user. If after the webhook "sent", you also received the webhook "lost", it means the SMS was not delivered to the user.

event (string)  
client_user_id (string)  
project_id (int)  
category_id (int)
template_id (int)
sms_id (int)  
ts (int)  
omnichannel(int)  
channel (string)  
{  
  "0": {  
    "event": "sms_sent",  
    "client_user_id": "test123",  
    "project_id": 99,  
    "category_id": 1,  
    "template_id": 15,
    "sms_id": 1233,
    "ts": 1549382627,  
    "omnichannel": 1,
    "channel" : "sms
    }  
  }  
}
  • ts – time when the webhook was sent in Unix timestamp format;
  • omnichannel – this parameter distinguishes between email and omnichannel webhooks. Default value is "1";
  • category_id – category of the sending ("1" – system sending, "2" – custom: sending from the marketing campaign);
  • sms_id – identifier of the SMS message.

sms_lost

The SMS message was sent but had not been delivered to the user.

event (string)  
client_user_id (string)  
project_id (int)  
category_id (int)
template_id (int)
sms_id (int)  
ts (int)  
omnichannel(int)  
channel (string)  
{  
  "0": {  
    "event": "sms_lost",  
    "client_user_id": "test123",  
    "project_id": 99,  
    "category_id": 1,  
    "template_id": 15,
    "sms_id": 1233,
    "ts": 1549382627,  
    "omnichannel": 1,
    "channel" : "sms
    }  
  }  
}
  • ts – time when the webhook was sent in Unix timestamp format;
  • omnichannel – this parameter distinguishes between email and omnichannel webhooks. Default value is "1";
  • category_id – category of the sending ("1" – system sending, "2" – custom: sending from the marketing campaign);
  • sms_id – identifier of the SMS message.

sms_click

The user clicked on the SMS message.

event (string)  
client_user_id (string)  
project_id (int)  
category_id (int)
template_id (int)
sms_id (int)  
ts (int)  
omnichannel(int)  
channel (string)  
link (string)
{  
  "0": {  
    "event": "sms_click",  
    "client_user_id": "test123",  
    "project_id": 99,  
    "category_id": 1,  
    "template_id": 15,
    "sms_id": 1233,
    "ts": 1549382627,  
    "omnichannel": 1,
    "channel" : "sms",
    "link" : "example.com"
    }  
  }  
}
  • ts – time when the webhook was sent in Unix timestamp format;
  • omnichannel – this parameter distinguishes between email and omnichannel webhooks. Default value is "1";
  • category_id – category of the sending ("1" – system sending, "2" – custom: sending from the marketing campaign);
  • sms_id – identifier of the SMS message;
  • link – link the user followed from the SMS message.

app_push_sent

App push notification was sent to the user.

event (string)  
client_user_id (string)  
project_id (int)  
category_id (int)
template_id (int)
push_id (string)  
ts (int)  
omnichannel(int)  
channel (string)  
{  
  "0": {  
    "event": "app_push_sent",  
    "client_user_id": "test123",  
    "project_id": 99,  
    "category_id": 1,  
    "template_id": 15,
    "push_id": "fdsfsdfsdFerw534df",
    "ts": 1549382627,  
    "omnichannel": 1,
    "channel" : "app_push",
    }  
  }  
}
  • ts – time when the webhook was sent in Unix timestamp format;
  • omnichannel – this parameter distinguishes between email and omnichannel webhooks. Default value is "1";
  • category_id – category of the sending ("1" – system sending, "2" – custom: sending from the marketing campaign);
  • push_id – identifier of the app push notification.

app_push_lost

App push notification was sent but had not been delivered to the user.

event (string)  
client_user_id (string)  
project_id (int)  
category_id (int)
template_id (int)
push_id (string)  
ts (int)  
omnichannel(int)  
channel (string)  
{  
  "0": {  
    "event": "app_push_lost",  
    "client_user_id": "test123",  
    "project_id": 99,  
    "category_id": 1,  
    "template_id": 15,
    "push_id": "fdsfsdfsdFerw534df",
    "ts": 1549382627,  
    "omnichannel": 1,
    "channel" : "app_push",
    }  
  }  
}
  • ts – time when the webhook was sent in Unix timestamp format;
  • omnichannel – this parameter distinguishes between email and omnichannel webhooks. Default value is "1";
  • category_id – category of the sending ("1" – system sending, "2" – custom: sending from the marketing campaign);
  • push_id – identifier of the app push notification.

app_push_click

The user clicked on the app push notification.

event (string)  
client_user_id (string)  
project_id (int)  
category_id (int)
template_id (int)
push_id (string)  
ts (int)  
omnichannel(int)  
channel (string)  
{  
  "0": {  
    "event": "app_push_click",  
    "client_user_id": "test123",  
    "project_id": 99,  
    "category_id": 1,  
    "template_id": 15,
    "push_id": "fdsfsdfsdFerw534df",
    "ts": 1549382627,  
    "omnichannel": 1,
    "channel" : "app_push",
    }  
  }  
}
  • ts – time when the webhook was sent in Unix timestamp format;
  • omnichannel – this parameter distinguishes between email and omnichannel webhooks. Default value is "1";
  • category_id – category of the sending ("1" – system sending, "2" – custom: sending from the marketing campaign);
  • push_id – identifier of the app push notification.