V3 Send notification to agents

 

Send Notification on XCALLY Motion

 

You can send a notification to an agent or a group of agents authenticated on the web interface by using the following API endpoint:

POST /api/userNotifications

Parameters  

text

The content of the notification

TemplateId

Id of the template used  as the notification's content

view

View object used to render the selected template

senderName

The name of the sender (optional). Default: the name of the user sending the notification.

recipients

Array of recipients as string (see details)

recipientsDescription

Description of recipients that will be displayed in the notification title (optional)

beep

Enable/Disable audio notification. Default: false


Recipients

The recipients array must contains at least one object structured as below:

{ "model": "user", "ids": [1, 2] }
  • model: identifies the entity group to which the notification will be sent

  • ids: a list of the selected model's resources' ids

The following models are supported: 

  • chatqueue

  • faxqueue

  • mailqueue

  • openchannelqueue

  • smsqueue

  • voicequeue

  • whatsappqueue

  • team

  • user

If you specify as a model a queue or team that does not have any agents associated, no notification will be sent.


Examples

Sending a simple text notification

POST https://{host}/api/userNotifications { "text": "Hello!", "recipients": "[{\"model\": \"user\", \"ids\": [1]}]", "beep": false }





Using a template