Create a Service Level Agreement (SLA)

You can use a POST request to create a Service Level Agreement (SLA) on a tenant. You'll need the CUSTOM_STATS_UPDATE permission to perform this operation.

Request

Sample request

The request below creates an SLA on a tenant:

curl -X POST -H "Content-Type: application/json" https://api.cxengage.net/v1/tenants/<tenantId>/slas
{
 "name": "Name",
 "description": "This is an optional description",
 "shared": false,
 "active": true,
 "activeSla": {
    "versionName": "Name",
    "description": "This is an optional description",
    "slaThreshold": 20,
    "abandonType": "ignore-abandons",
    "abandonThreshold": 10
 }
}

Request parameters

The table below lists the parameters you can include in a request:

Parameter Required Type Description
tenantId yes UUID

The unique identifier of the tenant.

name yes string

The name of the SLA.

description no string

A description of the SLA.

shared no boolean

A flag indicating whether or not the SLA is available to children of the tenant. The default value is false.

active no boolean

A flag indicating whether the SLA is active or inactive. 

activeSla yes object
Parameter Description

versionName

Required

String

The name of the SLA version.

description

Optional

String

The description of the SLA version.

slaThreshold

Required

Number

The threshold, in seconds, that an interaction must meet to be counted in the SLA statistic.

abandonType

Required

String

The SLA Abandon Type, either:

  • ignore-abandons: Abandons that occur within the specified abandonThreshold are excluded from the SLA calculation.
  • count-against-sla: Abandons are counted as interactions that aren't answered within the specified SLA threshold. In other words, abandoned interactions negatively impact the SLA.

abandonThreshold

Required for ignore-abandons only

Number

The threshold, in seconds, that an abandoned interaction must meet to be excluded from SLA statistics.

  abandonThreshold applies only when the abandonType is ignore-abandons.

Response

Sample response

The request returns JSON structured like the example below:

{
  "result": {
	"tenantId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
	"description": "This is an optional description",
	"createdBy": "0bf2f7b0-9b33-11e8-953c-911d1138c503",
	"updated": "2019-05-09T17:51:32Z",
	"activeSla": {
	  "tenantId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
	  "description": "This is an optional description",
	  "versionId": "14f62a31-7283-11e9-9fb2-3ea920705407",
	  "createdBy": "0bf2f7b0-9b33-11e8-953c-911d1138c503",
	  "slaId": "14f62a30-7283-11e9-9fb2-3ea920705407",
	  "abandonThreshold": 10,
	  "created": "2019-05-09T17:51:32Z",
	  "versionName": "Name",
	  "slaThreshold": 20,
	  "createdByName": "Jon Doe",
	  "abandonType": "ignore-abandons"
	},
	"name": "Name",
	"created": "2019-05-09T17:51:32Z",
	"updatedBy": "0bf2f7b0-9b33-11e8-953c-911d1138c503",
	"active": true,
	"id": "14f62a30-7283-11e9-9fb2-3ea9207054076",
	"shared": false,
	"activeVersion": "14f62a31-7283-11e9-9fb2-3ea920705407",
	"updatedByName": "Jon Doe",
	"createdByName": "Jon Doe"
 }
}

Response parameters

The response includes the following parameters:

Parameter Type Description
tenantId uuid

The unique identifier of the tenant.

description string A description of the SLA.
createdBy uuid

The unique identifier of the user who created the SLA.

updated string

The date and time, in the UTC timezone, that the SLA was last updated.

activeSla object

The version of the SLA that is currently active. These parameters provide details about the active SLA version.

Parameter Description

tenantId

UUID

The unique identifier of the tenant.

description

String

The description of the SLA version.

versionId

UUID

The unique identifier of the SLA version.

createdBy

UUID

The unique identifier of the user who created the SLA version.

slaId

UUID

The unique identifier of the SLA.

abandonThreshold

Number

The threshold, in seconds, that an abandoned interaction must meet to be excluded from SLA statistics.

  abandonThreshold applies only when the abandonType is ignore-abandons.

created

String

The date and time, in the UTC timezone, that the SLA version was created.

versionName

String

The name of the SLA version.

slaThreshold

Number

The threshold, in seconds, that an interaction must meet to be counted in the SLA statistic.

createdByName

String

The first name and last name of the user who created this SLA version.

abandonType

String

The SLA Abandon Type, either:

  • ignore-abandons: Abandons that occur within the specified abandonThreshold are excluded from the SLA calculation.
  • count-against-sla: Abandons are counted as interactions that aren't answered within the specified SLA threshold. In other words, abandoned interactions negatively impact the SLA.
name string The name of the SLA.
created string

The date and time, in the UTC timezone, that the SLA was created.

updatedBy uuid

The unique identifier of the user who last updated this SLA.

active boolean A flag indicating whether the SLA is active or inactive. 
Id uuid The unique identifier of the SLA.
shared boolean A flag indicating whether or not the SLA is available to children of the tenant. The default value is false.
activeVersion uuid

The unique identifier of the active version of this SLA.

updatedByName string

The first and last name of the user who last updated this SLA.

createdByName string

The first name and last name of the user who created this SLA.