Queues

Create a Queue

Action: POST /queues

Creates a new queue with a set of specified properties (see Queue Parameters). The user whose credentials are provided in Authorization header must have super_manager role on the site that the queue is defined for.

cURL
Untitled
Untitled
cURL
curl --request POST \
--header "Authorization: Bearer $access_token" \
--header "Content-Type: application/json" \
--data-binary '{
"site_id": "51138845-3c46-4c21-8bd8-1cf45957f62e",
"name": "Technical support queue (rich media)",
"capacity_policy": {
"type": "fixed",
"capacity": 15
},
"routing_policy": {
"media": ["phone", "audio", "video"]
},
"when_unstaffed": "reject",
"operator_ranking_enabled": false,
"welcome_message": "Welcome to our company",
"scheduling_policy_id": "db46cede-0927-46a2-ae02-3d93dbb6648d",
"fallback_queue_id": "7a5ba173-3f6e-432e-96fc-1a45b3eba3b1",
"operator_affinity": {
"time_window_sec": 600
}
}' \
"https://api.salemove.com/queues"
Untitled
var XMLHttpRequest = require('xmlhttprequest').XMLHttpRequest;
var xhr = new XMLHttpRequest();
xhr.open('POST', 'https://api.salemove.com/queues', false);
xhr.setRequestHeader('authorization', `Bearer ${accessToken}`);
xhr.setRequestHeader('content-type', 'application/json');
var data = {
site_id: '51138845-3c46-4c21-8bd8-1cf45957f62e',
name: 'Technical support queue (rich media)',
capacity_policy: {
type: 'fixed',
capacity: 15
},
routing_policy: {
media: ['phone', 'audio', 'video']
},
when_unstaffed: 'reject',
operator_ranking_enabled: false,
welcome_message: 'Welcome to our company',
scheduling_policy_id: 'db46cede-0927-46a2-ae02-3d93dbb6648d',
fallback_queue_id: '7a5ba173-3f6e-432e-96fc-1a45b3eba3b1',
operator_affinity: {
time_window_sec: 600
}
};
var query = JSON.stringify(data);
xhr.send(query);
var response = JSON.parse(xhr.responseText);
console.log(response);
Untitled
require 'httparty'
ENDPOINT = 'https://api.salemove.com/queues'
token = ARGV[0].strip
headers = {
'Authorization' => "Bearer #{access_token}",
'Content-Type' => 'application/json'
}
options = {
headers: headers,
query: {
site_id: "51138845-3c46-4c21-8bd8-1cf45957f62e",
name: "Technical support queue (rich media)",
capacity_policy: {
type: "fixed",
capacity: 15
},
routing_policy: {
media: ["phone", "audio", "video"]
},
when_unstaffed: "reject",
operator_ranking_enabled: false,
welcome_message: "Welcome to our company",
scheduling_policy_id: "db46cede-0927-46a2-ae02-3d93dbb6648d",
fallback_queue_id: "7a5ba173-3f6e-432e-96fc-1a45b3eba3b1",
operator_affinity: {
time_window_sec: 600
}
}
}
raw_response = HTTParty.post(
ENDPOINT,
options
)
response = JSON.parse(raw_response.body)
puts response

Generates the output

{
"id": "59b0d786-e59a-4c62-a064-05e4f47488a2",
"name": "Technical support queue (rich media)",
"site_id": "51138845-3c46-4c21-8bd8-1cf45957f62e",
"capacity": 15,
"capacity_policy": {
"type": "fixed",
"capacity": 15
},
"routing_policy": {
"media": ["phone", "audio", "video"]
},
"when_unstaffed": "reject",
"status": "closed",
"self_status": "closed",
"operator_ranking_enabled": false,
"welcome_message": "Welcome to our company",
"scheduling_policy_id": "db46cede-0927-46a2-ae02-3d93dbb6648d",
"fallback_queue_id": "7a5ba173-3f6e-432e-96fc-1a45b3eba3b1",
"operator_affinity": {
"time_window_sec": 600
},
"created_at": "2017-02-20T00:00:00Z",
"updated_at": "2017-02-20T00:00:00Z"
}

Output

See Queue Output.

List Queues

Action: GET /queues

Fetches a collection of queues. The endpoint requires an array of site_ids.

Authorization

See Authorization.

Visitors

A visitor can only request collection of queues for the site he is currently on.

Operators

An operator can request collection of queues for the sites specified in the request. The operator must be authorized to access the requested sites.

Request

The endpoint accepts the following filters when requested by operator:

Parameter

Required

Type

Description

site_ids

Yes

array of strings

A list of site IDs whose queues are requested.

cURL
JavaScript
Ruby
cURL
curl --request GET \
--header "Authorization: Bearer $access_token" \
--header "Content-Type: application/json" \
"https://api.salemove.com/queues?site_ids\[\]=51138845-3c46-4c21-8bd8-1cf45957f62e"
JavaScript
var XMLHttpRequest = require('xmlhttprequest').XMLHttpRequest;
var xhr = new XMLHttpRequest();
xhr.open(
'GET',
'https://api.salemove.com/queues?site_ids[]=51138845-3c46-4c21-8bd8-1cf45957f62e',
false
);
xhr.setRequestHeader('authorization', `Bearer ${accessToken}`);
xhr.setRequestHeader('content-type', 'application/json');
xhr.send();
var response = JSON.parse(xhr.responseText);
console.log(response);
Ruby
require 'httparty'
ENDPOINT = 'https://api.salemove.com/queues'
token = ARGV[0].strip
headers = {
'Authorization' => "Bearer #{access_token}",
'Content-Type' => 'application/json'
}
options = {
headers: headers,
query: {
site_ids: ['51138845-3c46-4c21-8bd8-1cf45957f62e']
}
}
raw_response = HTTParty.get(
ENDPOINT,
options
)
response = JSON.parse(raw_response.body)
puts response

Generates the output

{
"queues": [
{
"id": "59b0d786-e59a-4c62-a064-05e4f47488a2",
"name": "Technical support queue (rich media)",
"site_id": "51138845-3c46-4c21-8bd8-1cf45957f62e",
"capacity": 15,
"capacity_policy": {
"type": "fixed",
"capacity": 15
},
"routing_policy": {
"media": ["phone", "audio", "video"]
},
"when_unstaffed": "reject",
"status": "closed",
"self_status": "closed",
"operator_ranking_enabled": false,
"welcome_message": "Welcome to our company",
"scheduling_policy_id": "db46cede-0927-46a2-ae02-3d93dbb6648d",
"fallback_queue_id": "7a5ba173-3f6e-432e-96fc-1a45b3eba3b1",
"operator_affinity": {
"time_window_sec": 600
},
"created_at": "2017-02-20T00:00:00Z",
"updated_at": "2017-02-20T00:00:00Z"
},
{
"id": "3f82ad26-fada-4f77-a293-9a7a84fb3d1e",
"name": "Technical support queue (text)",
"site_id": "51138845-3c46-4c21-8bd8-1cf45957f62e",
"capacity": 15,
"capacity_policy": {
"type": "fixed",
"capacity": 15
},
"routing_policy": {
"media": ["text"]
},
"when_unstaffed": "reject",
"status": "closed",
"self_status": "closed",
"operator_ranking_enabled": false,
"welcome_message": null,
"scheduling_policy_id": null,
"fallback_queue_id": null,
"operator_affinity": null,
"created_at": "2017-02-20T00:00:00Z",
"updated_at": "2017-02-20T00:00:00Z"
}
]
}

Output

Field

Type

Required

Description

queues

array

Yes

List of Queue Outputs.

Get a Queue

Action: GET /queues/{queue_id}

Retrieves the properties of the queue with the given ID. The user whose bearer access token is provided in Authorization header must have at least manager role on the site that the queue is defined for.

cURL
Untitled
Untitled
cURL
curl --request GET \
--header "Authorization: Bearer $access_token" \
--header "Content-Type: application/json" \
"https://api.salemove.com/queues/59b0d786-e59a-4c62-a064-05e4f47488a2"
Untitled
var XMLHttpRequest = require('xmlhttprequest').XMLHttpRequest;
var xhr = new XMLHttpRequest();
xhr.open(
'GET',
'https://api.salemove.com/queues/59b0d786-e59a-4c62-a064-05e4f47488a2',
false
);
xhr.setRequestHeader('authorization', `Bearer ${accessToken}`);
xhr.setRequestHeader('content-type', 'application/json');
xhr.send();
var response = JSON.parse(xhr.responseText);
console.log(response);
Untitled
require 'httparty'
ENDPOINT = 'https://api.salemove.com/queues/59b0d786-e59a-4c62-a064-05e4f47488a2'
token = ARGV[0].strip
headers = {
'Authorization' => "Bearer #{access_token}",
'Content-Type' => 'application/json'
}
options = {
headers: headers
}
raw_response = HTTParty.get(
ENDPOINT,
options
)
response = JSON.parse(raw_response.body)
puts response

Generates the output

{
"id": "59b0d786-e59a-4c62-a064-05e4f47488a2",
"name": "Technical support queue (rich media)",
"site_id": "51138845-3c46-4c21-8bd8-1cf45957f62e",
"capacity": 15,
"capacity_policy": {
"type": "fixed",
"capacity": 15
},
"routing_policy": {
"media": ["phone", "audio", "video"]
},
"when_unstaffed": "reject",
"status": "closed",
"self_status": "closed",
"operator_ranking_enabled": false,
"welcome_message": "Welcome to our company",
"scheduling_policy_id": "db46cede-0927-46a2-ae02-3d93dbb6648d",
"fallback_queue_id": "7a5ba173-3f6e-432e-96fc-1a45b3eba3b1",
"operator_affinity": {
"time_window_sec": 600
},
"created_at": "2017-02-20T00:00:00Z",
"updated_at": "2017-02-20T00:00:00Z"
}

Output

See Queue Output.

Delete a Queue

Action: DELETE /queues/{queue_id}

Removes a queue with the given ID if the queue is empty.

If the queue is not empty, or is in use in any other sense, e.g. associated to a phone channel, digital channel, or assigned as a fallback queue to another queue, the queue cannot be deleted and a 409 Conflict response is returned.

The user whose bearer access token is provided in Authorization header must have the super_manager role on the site that the queue is defined for.

cURL
Untitled
Untitled
cURL
curl --request DELETE \
--header "Authorization: Bearer $access_token" \
"https://api.salemove.com/queues/59b0d786-e59a-4c62-a064-05e4f47488a2"
Untitled
var XMLHttpRequest = require('xmlhttprequest').XMLHttpRequest;
var xhr = new XMLHttpRequest();
xhr.open(
'DELETE',
'https://api.salemove.com/queues/59b0d786-e59a-4c62-a064-05e4f47488a2',
false
);
xhr.setRequestHeader('authorization', `Bearern ${accessToken}`);
xhr.send();
var response = JSON.parse(xhr.responseText);
console.log(response);
Untitled
require 'httparty'
ENDPOINT = 'https://api.salemove.com/queues/59b0d786-e59a-4c62-a064-05e4f47488a2'
token = ARGV[0].strip
headers = {
'Authorization' => "Bearer #{access_token}"
}
options = {
headers: headers
}
raw_response = HTTParty.delete(
ENDPOINT,
options
)
response = JSON.parse(raw_response.body)
puts response

Generates the output

204 No Content

Update a Queue

Action: PUT /queues/{queue_id}

Updates the properties of the queue with the given ID with a set of specified properties (see Queue Parameters). Note that the site ID of a queue can not be changed. The user whose bearer access token is provided in Authorization header must have the super_manager role on the site that the queue is defined for.

If the specified fallback queue creates a fallback cycle with the updated queue then a 409 Conflict response is returned. See Fallback Queue for more details.

cURL
Untitled
Untitled
cURL
curl --request PUT \
--header "Authorization: Bearer $access_token" \
--header "Content-Type: application/json" \
--data-binary '{
"name": "Technical support queue (text)",
"description": "Text queue for technical support team",
"capacity_policy": {
"type": "variable",
"multiplier": 1.5
},
"routing_policy": {
"media": ["text"],
"team_ids": ["ca98bb0c-187e-4db9-9662-b33e7f2326c0"]
},
"when_unstaffed": "reject",
"operator_ranking_enabled": true,
"welcome_message": "Welcome to our company",
"scheduling_policy_id": "db46cede-0927-46a2-ae02-3d93dbb6648d",
"fallback_queue_id": "7a5ba173-3f6e-432e-96fc-1a45b3eba3b1",
"operator_affinity": {
"time_window_sec": 600
}
}' \
"https://api.salemove.com/queues/59b0d786-e59a-4c62-a064-05e4f47488a2"
Untitled
var XMLHttpRequest = require('xmlhttprequest').XMLHttpRequest;
var xhr = new XMLHttpRequest();
xhr.open(
'PUT',
'https://api.salemove.com/queues/59b0d786-e59a-4c62-a064-05e4f47488a2',
false
);
xhr.setRequestHeader('authorization', `Bearer ${accessToken}`);
xhr.setRequestHeader('content-type', 'application/json');
var data = {
name: 'Technical support queue (text)',
description: 'Text queue for technical support team',
capacity: 7,
capacity_policy: {
type: 'variable',
multiplier: 1.5
},
routing_policy: {
media: ['text'],
team_ids: ['ca98bb0c-187e-4db9-9662-b33e7f2326c0']
},
when_unstaffed: 'reject',
operator_ranking_enabled: true,
welcome_message: 'Welcome to our company',
scheduling_policy_id: 'db46cede-0927-46a2-ae02-3d93dbb6648d',
fallback_queue_id: '7a5ba173-3f6e-432e-96fc-1a45b3eba3b1',
operator_affinity: {
time_window_sec: 600
}
};
var query = JSON.stringify(data);
xhr.send(query);
var response = JSON.parse(xhr.responseText);
console.log(response);
Untitled
require 'httparty'
ENDPOINT = 'https://api.salemove.com/queues/59b0d786-e59a-4c62-a064-05e4f47488a2'
token = ARGV[0].strip
headers = {
'Authorization' => "Bearer #{access_token}",
'Content-Type' => 'application/json'
}
options = {
headers: headers,
query: {
name: "Technical support queue (text)",
description: "Text queue for technical support team",
capacity_policy: {
type: "variable",
multiplier: 1.5
},
routing_policy: {
media: ["text"],
team_ids: ["ca98bb0c-187e-4db9-9662-b33e7f2326c0"]
},
when_unstaffed: "reject",
operator_ranking_enabled: true,
welcome_message: "Welcome to our company",
fallback_queue_id: "7a5ba173-3f6e-432e-96fc-1a45b3eba3b1",
operator_affinity: {
time_window_sec: 600
}
}
}
raw_response = HTTParty.put(
ENDPOINT,
options
)
response = JSON.parse(raw_response.body)
puts response

Generates the output

{
"id": "59b0d786-e59a-4c62-a064-05e4f47488a2",
"name": "Technical support queue (text)",
"description": "Text queue for technical support team",
"site_id": "51138845-3c46-4c21-8bd8-1cf45957f62e",
"capacity_policy": {
"type": "variable",
"multiplier": 1.5
},
"routing_policy": {
"media": ["text"],
"team_ids": ["ca98bb0c-187e-4db9-9662-b33e7f2326c0"]
},
"when_unstaffed": "reject",
"status": "closed",
"self_status": "closed",
"operator_ranking_enabled": true,
"welcome_message": "Welcome to our company",
"scheduling_policy_id": "db46cede-0927-46a2-ae02-3d93dbb6648d",
"fallback_queue_id": "7a5ba173-3f6e-432e-96fc-1a45b3eba3b1",
"operator_affinity": {
"time_window_sec": 600
},
"created_at": "2017-02-20T00:00:00Z",
"updated_at": "2017-02-21T00:00:00Z"
}

Output

See Queue Output.

List Queue Operator Rankings

Action: GET /queues/{id}/rankings

Fetches a collection of operators with their ranks in the queue. The operator collection includes only the operators that have been assigned a rank in the queue at some point in time. This means that the collection might not include all of the operators that are associated with the queue and it might include operators that are no longer associated with the queue. The user whose bearer access token is provided in Authorization header must have the super_manager role on the site that the queue is defined for.

Operators

The operator must be authorized to access the site of the queue.

cURL
Untitled
Untitled
cURL
curl --request GET \
--header "Authorization: Bearer $access_token" \
--header "Content-Type: application/json" \
"https://api.salemove.com/queues/59b0d786-e59a-4c62-a064-05e4f47488a2/rankings"
Untitled
var XMLHttpRequest = require('xmlhttprequest').XMLHttpRequest;
var xhr = new XMLHttpRequest();
xhr.open(
'GET',
'https://api.salemove.com/queues/59b0d786-e59a-4c62-a064-05e4f47488a2/rankings',
false
);
xhr.setRequestHeader('authorization', `Bearer ${accessToken}`);
xhr.setRequestHeader('content-type', 'application/json');
xhr.send();
var response = JSON.parse(xhr.responseText);
console.log(response);
Untitled
require 'httparty'
ENDPOINT = 'https://api.salemove.com/queues/59b0d786-e59a-4c62-a064-05e4f47488a2/rankings'
token = ARGV[0].strip
headers = {
'Authorization' => "Bearer #{access_token}",
'Content-Type' => 'application/json'
}
options = {
headers: headers
}
raw_response = HTTParty.get(
ENDPOINT,
options
)
response = JSON.parse(raw_response.body)
puts response

Generates the output

{
"operators": [
{
"id": "c8b52f0b-ad05-4c71-8c98-5056f07c4d1a",
"rank": 10
},
{
"id": "f42811bc-8519-4d33-bbb1-36d4555ecb0a",
"rank": 2
}
]
}

Output

Field

Type

Required

Description

operators

array

Yes

List of Queue Operator Rankings.

Update Queue Operator Rankings

Action: PATCH /queues/{id}/rankings

Updates operators' rankings of the queue. Input is an array of Queue Operator Rankings. Operators must be assigned to the site that the queue is defined for. The user whose bearer access token is provided in Authorization header must have the super_manager role on the site that the queue is defined for.

cURL
Untitled
Untitled
cURL
curl --request PATCH \
--header "Authorization: Bearer $access_token" \
--header "Content-Type: application/json" \
--data-binary '{
"operators": [
{
"id": "c8b52f0b-ad05-4c71-8c98-5056f07c4d1a",
"rank": 5
},
{
"id": "f42811bc-8519-4d33-bbb1-36d4555ecb0a",
"rank": 1
}
]
}' \
"https://api.salemove.com/queues/59b0d786-e59a-4c62-a064-05e4f47488a2/rankings"
Untitled
var XMLHttpRequest = require('xmlhttprequest').XMLHttpRequest;
var xhr = new XMLHttpRequest();
xhr.open(
'PATCH',
'https://api.salemove.com/queues/59b0d786-e59a-4c62-a064-05e4f47488a2/rankings',
false
);
xhr.setRequestHeader('authorization', `Bearer ${accessToken}`);
xhr.setRequestHeader('content-type', 'application/json');
var data = {
operators: [
{
id: 'c8b52f0b-ad05-4c71-8c98-5056f07c4d1a',
rank: 5
},
{
id: 'f42811bc-8519-4d33-bbb1-36d4555ecb0a',
rank: 1
}
]
};
var query = JSON.stringify(data);
xhr.send(query);
var response = JSON.parse(xhr.responseText);
console.log(response);
Untitled
require 'httparty'
ENDPOINT = 'https://api.salemove.com/queues/59b0d786-e59a-4c62-a064-05e4f47488a2/rankings'
token = ARGV[0].strip
headers = {
'Authorization' => "Bearer #{access_token}",
'Content-Type' => 'application/json'
}
options = {
headers: headers,
query: {
"operators": [
{
"id": "c8b52f0b-ad05-4c71-8c98-5056f07c4d1a",
"rank": 5
},
{
"id": "f42811bc-8519-4d33-bbb1-36d4555ecb0a",
"rank": 1
}
]
}
}
raw_response = HTTParty.patch(
ENDPOINT,
options
)
response = JSON.parse(raw_response.body)
puts response

Generates the output

{
"operators": [
{
"id": "c8b52f0b-ad05-4c71-8c98-5056f07c4d1a",
"rank": 5
},
{
"id": "f42811bc-8519-4d33-bbb1-36d4555ecb0a",
"rank": 1
}
]
}

Output

Field

Type

Required

Description

operators

array

Yes

List of Queue Operator Rankings.

Queue Parameters

Parameter

Type

Required

Description

site_id

string

Yes

ID of the site to create queue on. Can not be modified.

name

string

Yes

Queue name.

description

string

No

Queue description.

capacity

integer

No

DEPRECATED. Use capacity_policy instead.

capacity_policy

object

Yes

Capacity calculation policy, which determines how the queue capacity will be calculated. See Capacity Policy for the object format.

routing_policy

object

Yes

A collection of properties which determine whether visitor should be put into this queue when enqueued and whether operator can serve visitors from this queue. Note, that one visitor may be put into multiple queues at once, based on queue routing policy and visitor's attributes. See Routing Policy. When an empty object is given, all enqueueing visitors will be put into created queue.

when_unstaffed

string

No

A strategy to apply to visitors when queue becomes unstaffed (i.e. when no operators, that match queue routing policy, are online). Allowed values are: accept, reject.

operator_ranking_enabled

boolean

No

If true, queued visitor will be engaged with the first available operator who has the highest rank in the queue. The default value is false.

welcome_message

string

No

If specified, this message will be sent automatically at the start of each engagement in this queue. Welcome message can be specified as a Response Card in JSON format. See Response Card in Welcome Message.

scheduling_policy_id

string

No

ID of the queue scheduling policy (in UUID v4 format). See Queues Scheduling Policy on how to create a scheduling policy for the queue.

fallback_queue_id

string

No

ID of a fallback queue (in UUID v4 format). See Fallback Queue for more details.

operator_affinity

object

No

Operator affinity of the queue. See Operator Affinity.

Response Card in Welcome Message

A response card contains a set of appropriate responses for the visitor to choose from. Use response cards to simplify interactions for your users. You can send a response card in welcome messages.

The following is a response card:

The visitor user can either type the text or choose from the list of insurance types. This response card is configured with an image, which appears in the client as shown.

To send a response card as shown above, provide the following JSON as welcome_message value:

{
"content": "What type of insurance are you interested in?",
"attachment": {
"type": "single_choice",
"image_url": "https://cdn.pixabay.com/photo/2018/01/28/10/05/insurance-3113180_960_720.jpg",
"options": [
{
"text": "Life",
"value": "Life"
},
{
"text": "Health",
"value": "Health"
},
{
"text": "Home",
"value": "Home"
},
{
"text": "Car",
"value": "Car"
}
]
}
}

Message format follows the same specification as regular chat message; see Chat Messages. Only attributes content and attachment are taken into account.

Welcome messages allow only one type of attachment: single_choice.

Queue Output

Field

Type

Description

id

string

ID of the created queue (in UUID v4 format).

site_id

string

Site ID, which created queue belongs to.

name

string

Name of the created queue.

description

string

Queue description.

capacity

integer

The maximum number of concurrent visitors allowed into the queue.

capacity_policy

object

Capacity calculation policy of the queue. See Capacity Policy

routing_policy

object

Routing policy of the queue. See Routing Policy.

available_properties

object

Description of current queue availability. See Available Properties.

status

string

Current queue status. Takes into account the status of fallback queue(s) recursively (if any).

self_status

string

Current queue status without taking into account the status of fallback queue(s). Always closed for new queues.

when_unstaffed

string

A strategy to apply to visitors when queue becomes unstaffed. See Queue Parameters for more details.

operator_ranking_enabled

boolean

If true, queued visitor will be engaged with the first available operator who has the highest rank in the queue.

welcome_message

string

If specified, this message will be sent automatically at the start of each engagement in this queue.

scheduling_policy_id

string

ID of the queue scheduling policy (in UUID v4 format). See Queues Scheduling Policy on how to create a scheduling policy for the queue.

fallback_queue_id

string

ID of a fallback queue (in UUID v4 format). See Fallback Queue for more details.

operator_affinity

object

Operator affinity of the queue. See Operator Affinity.

created_at

string

An ISO-8601 timestamp of when the queue was created.

updated_at

string

An ISO-8601 timestamp of when the queue was last updated.

Capacity Policy

Capacity policy dictates how will the queue capacity be regulated. At the moment, two types of capacity policies are supported:

  • Fixed: the queue capacity is set to a fixed number and doesn't change.

  • Variable: the queue capacity changes depending on the number of operators

    staffing the queue.

Fixed Capacity

Field

Type

Required

Description

type

string

Yes

Must be fixed.

capacity

integer

Yes

The maximum number of concurrent visitors allowed into the queue.

Variable Capacity

Field

Type

Required

Description

type

string

Yes

Must be variable.

multiplier

float

Yes

The number that is multiplied by the number of operators staffing the queue to determine the effective queue capacity (rounded down).

Routing Policy

Field

Type

Required

Description

media

array of strings

No

The allowed engagement media types. Must be a set of strings where each element is one of text, phone, audio, video. When this routing policy is applied to the queue, visitors who request engagement with insufficient media level, won't be placed into the queue. Example 1: A queue has routing_policy.media = ["text"], visitor requests engagement with media type audio. Because queue doesn't have audio in the list of allowed media types, such visitor can't be put into the queue. Example 2: A queue has routing_policy.media = ["text", "phone", "audio"], visitor requests engagement with media type audio. In this case visitor can be put into the queue, because the queue allowed media types includes audio.

team_ids

array of strings

No

The allowed team IDs. Must be a set of strings, where each element refers to a team by its ID (in UUID v4 format). This routing policy allows visitors to be put into the queue only if they are assigned to at least one team from the specified list. Similarly, only operators who belong to at least one team from the specified list can serve visitors from the queue.

Available Properties

Field

Type

Description

media

array of strings

The currently available engagement media types. A set of strings where each element is one of text, phone, audio, video. Visitors cannot request engagements with media that is not currently available.

Queue Operator Rankings

Field

Type

Description

id

string

Operator ID.

rank

integer

Operator rank. Operators with a smaller rank number will be considered for engagement before operators with a high rank number. Can be null or a number in range from 1 to 10. If null is set as a rank, the operator rank will be removed and not be included in the collection anymore. Operators with rank 10 and no rank are treated as having the same priority.

Operator Affinity

Allows to engage the visitor with the last operator with whom the visitor had an engagement prior to enqueueing.

Field

Type

Description

time_window_sec

integer

The number of seconds to wait for the previously engaged operator to become available after the visitor has enqueued. If the operator does not become available during time_window_sec, the visitor will be matched with other operators based on the routing policy. Must be in (0, 345600] range.

Fallback Queue

Fallback queue is a queue to which visitors are re-routed when the Primary queue is full, unstaffed or closed.

Fallback queue must be a queue that does not have the Primary queue as a direct or indirect fallback, or in other words there can be no fallback cycles. For example if:

  1. Queue B is assigned as a fallback queue to queue A

  2. Queue C is assigned as a fallback queue to queue B

Then queue A cannot be assigned as a fallback queue of queue C as this creates a fallback cycle: A -> B -> C -> A