Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Info

The /api/notifications method is deprecated starting with version 2.5.20 and the /api/userNotifications method is used instead.

Table of Contents

Send Notification on XCALLY Motion (version 2.5.0 - 2.5.19)

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

Code Block
languagexml
themeMidnight
POST /api/notifications

PARAMETERS 

textThe content of the notificationTemplateIdId of the template used  as the notification's contentviewView object used to render the selected templatesenderNameThe name of the sender (optional). Default: the name of the user sending the notification.recipientsArray of recipients as string (see details)recipientsDescriptionDescription of recipients that will be displayed in the notification title (optional)beepEnable/Disable audio notification. Default: false Info
titleRecipients
AnchorRecipientsRecipientsThe recipients array must contains at least one object structured as below:
Code Block
{
	"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
Note

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

Image Removed

Code Block
languagexml
themeConfluence
POST https://{host}/api/notifications

{
    "text": "Hello!",
    "recipients": "[{\"model\": \"user\", \"ids\": [1]}]",
    "beep": false
}
Code Block
languagexml
themeMidnight
curl http://{host}/api/notifications -d '{"text": "Hello!", "recipients": "[{\"model\": \"user\", \"ids\": [1]}]", "beep": "false"}' -v -u {name}:{password} -H "Content-Type: application/json"

Using a template

Image Removed

Code Block
languagexml
themeConfluence
POST https://{host}/api/notifications

{
    "TemplateId": 1,
    "view": {"content": "Hello!"},
    "recipients": "[{\"model\": \"team\", \"ids\": [1]}, {\"model\": \"voiceQueue\", \"ids\": [2,3]}]",
    "recipientsDescription": "Group of agents",
    "beep": true
}
Code Block
languagexml
themeMidnight
curl https://{host}/api/notifications -d '{"TemplateId": "1", "view": {"content": "Hello!"}, "recipients": "[{\"model\": \"team\", \"ids\": [1]}, {\"model\": \"voiceQueue\", \"ids\": [2,3]}]", "recipientsDescription": "Group of agents", "beep": "true"}' -v -u {name}:{password} -H "Content-Type: application/json"
Send Notification on XCALLY Motion (version 2.5.20 onwards)

Table of Contents
minLevel1
maxLevel7

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:

Code Block
languagexml
themeMidnight
POST /api/userNotifications
PARAMETERS 

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

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

beep

Enable/Disable audio notification. Default: false

Infotitle


Recipients

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

Code Block
{
	"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

Note

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

EXAMPLES

Examples

Sending a simple text notification

Image Removed
Image Added
Code Block
languagexml
themeConfluence
POST https://{host}/api/userNotifications

{
    "text": "Hello!",
    "recipients": "[{\"model\": \"user\", \"ids\": [1]}]",
    "beep": false
}


Code Block
languagexml
themeMidnight
curl http://{host}/api/userNotifications -d '{"text": "Hello!", "recipients": "[{\"model\": \"user\", \"ids\": [1]}]", "beep": "false"}' -v -u {name}:{password} -H "Content-Type: application/json"


Using a template

Image Removed
Image Added
Code Block
languagexml
themeConfluence
POST https://{host}/api/userNotifications

{
    "TemplateId": 1,
    "view": {"content": "Hello!"},
    "recipients": "[{\"model\": \"team\", \"ids\": [1]}, {\"model\": \"voiceQueue\", \"ids\": [2,3]}]",
    "recipientsDescription": "Group of agents",
    "beep": true
}


Code Block
languagexml
themeMidnight
curl https://{host}/api/userNotifications -d '{"TemplateId": "1", "view": {"content": "Hello!"}, "recipients": "[{\"model\": \"team\", \"ids\": [1]}, {\"model\": \"voiceQueue\", \"ids\": [2,3]}]", "recipientsDescription": "Group of agents", "beep": "true"}' -v -u {name}:{password} -H "Content-Type: application/json"