Sometimes, you might have a scenario where you want to preferentially display a widget for one queue (or user) over another. Maybe you have a cooperative service with another department. Maybe you have a web page for a specialized area, and you'd like the guest to get connected to the specialist(s) if they are available, but if they're not, then your general guest support queue is fine and is better than a simple offline contact point. In any case, you want to do something more flexible than showing and hiding a widget for only one queue. You can use service rollover to set-up preferential chat routing based upon availability.
The service levels for a service are ordered starting at 0. Your zeroth service level has the highest preference. That is, guests will be routed there when the user or queue associated with that level is available. If service level 0 is unavailable, guests will be routed to service level 1 if available and so on. If no service levels are available, the guest will see your service as offline.
LibraryH3lp supports cookie-based authentication. To learn more, you can read the details on authentication.
Requests are served over HTTPS. To ensure data privacy, unencrypted HTTP is not supported.
A Service Level instance resource represents a single service level attached to a given service managed by the user account provided during authentication.
/2011-12-03/services/{ServiceId}/level/{Level}
A Service Level resource is represented by the following properties:
Property | Description |
---|---|
serviceId | The id of the service to which this level is attached. |
level | A non-negative integer indicating this level's precedence within the service rollover ordering. |
type | Either queues or users depending on whether this service level is associated with a queue or user. |
name | The queue name or username associated with this service level. |
widgetId | The id of the widget associated with this service level. |
html | An HTML string that determines this level's online appearance. When empty, the online behavior is a clickable link with "Chat is online." anchor text. Read HTML code samples to get a better idea of what this field typically looks like when customized. |
Returns a JSON response containing a representation of a service level, including the properties above.
GET /2011-12-03/services/1933/level/0
[
{
"serviceId": 1933,
"level": 0,
"type": "queues",
"name": "example-queue",
"widgetId": 411,
"html": ""
}
]
Not supported.
Allows you to modify the properties of an existing service level.
You may include, as JSON PUT data, name, widgetId, or html. When changing name, type will be automatically inferred.
Always returns a JSON response containing the representation of the service level resource.
PUT /2011-12-03/services/1933/levels/0
{
"name": "another-queue",
}
[
{
"serviceId": 1933,
"level": 0,
"type": "queues",
"name": "another-queue",
"widgetId": 411,
"html": ""
}
]
Removes a service level.
Returns a JSON response with the following properties:
Property | Description |
---|---|
success | Boolean indicating if the request was successful. |
message | Optional. If success is null, message is a string describing the reason for the failed request. |
DELETE /2011-12-03/services/1933/level/0
{
"success": true
}
In order to minimize HTTP requests and simplify the process of reordering service levels, we have added two convenience URIs.
Moves the specified service level up in precedence and automatically reorders any other levels. Only POST is supported. GET, PUT, and DELETE on this URI are not supported.
/2011-12-03/services/{ServiceId}/levels/{Level}/up
Returns the modified service level.
POST /2011-12-03/services/1933/levels/1/up
{
"serviceId": 1933,
"level": 0,
"type": "queues",
"name": "an-example-queue",
"widgetId": 411,
"html": ""
}
Moves the specified service level down in precedence and automatically reorders any other levels. Only POST is supported. GET, PUT, and DELETE on this URI are not supported.
/2011-12-03/services/{ServiceId}/levels/{Level}/down
Returns the modified service level.
POST /2011-12-03/services/1933/levels/0/down
{
"serviceId": 1933,
"level": 1,
"type": "queues",
"name": "example-queue",
"widgetId": 411,
"html": ""
}
The Service Levels list resource represents the set of Service Levels attached to a given service managed by the user whose credentials were used to make the API request.
/2011-12-03/services/{ServiceId}/levels
Returns all the service levels managed by the user whose credentials were used to make the API request.
Returns a JSON response containing a list of Service Level resources.
GET /2011-12-03/services/1933/levels
[
{
"serviceId": 1933,
"level": 0,
"type": "queues",
"name": "example-queue",
"widgetId": 411,
"html": ""
}
]
Allows you to add a new service level.
You must include, as JSON POST data, the level, name and widgetId properties of a service level. You may include the html property. type is automatically inferred from name.
If successful, returns a JSON response containing the resource representation of the newly created service level. If unsuccessful, returns a JSON response with the following properties:
Property | Description |
---|---|
success | Boolean indicating if the request was successful. |
message | Optional. If success is null, message is a string describing the reason for the failed request. |
POST /2011-12-03/services/1933/levels
{
"level": 1,
"name": "another-queue",
"widgetId": 3,
}
{
"serviceId": 1933,
"level": 1,
"type": "queues",
"name": "another-queue",
"widgetId": 3,
"html": ""
}
Not supported.
Not supported.