SLA Policy
  • 16 Jun 2022
  • 5 Minutes to read
  • Dark
    Light

SLA Policy

  • Dark
    Light

Article summary

SLA Policy

Policy of ticketing sla.

SLA Policy JSON Format

SLA Policy is represented as simple flat JSON objects with the following keys:

NameTypeDescription
idguidId of the SLA Policy.
isEnabledboolWhether SLA Policy is enabled or not.
orderintegerOrder of the SLA Policy.
firstResponseintegerFirst response time of the SLA Policy.
nextResponseintegerNext response time of the SLA Policy.
resolutionintegerResolution time of the SLA Policy.
operationalHoursstringOperating hours refer to the working hours of your company. Allowed values are "CalendarHour", "BusinessHour".
conditionMetTypestringHow conditions are matched. Allowed values are "any", "all", "logicalExpression".
logicalExpressionstringLogical expression to match the conditions i.e., (1 or 2 or 3) and (4 and 5).
namestringName of the SLA Policy.
slaPolicyConditionsslaPolicyConditions[]Reference to SLA Policy Condition.

SLA Policy Condition JSON Format:

NameTypeDescription
idguidId of the SLA Policy condition.
slaPolicyIdguidId of the SLA Policy which the condition belongs to.
fieldNamestringName of the ticketing field you want to set value for.
operatorstringHow value for this condition field is matched. Allowed values are "contains", "notContains", "is", "isNot", "isMoreThan", "isLessThan", "before", "after", "regularExpression", "isOneOf", "isNotIn".
valuestringValue of the condition field.
orderintegerOrder of the condition.

Get the list of SLA Policies

GET ticketing/slaPolicies

  • Parameters:

NameTypeinRequiredDescription
includestringquerynoAllowed value is "slaPolicyCondition".
  • Response:

An array of SLA Policy

  • Example

Sample Request:

curl https://api11.comm100.io/v4/ticketing/slaPolicies \ 
    -X 'GET' \ 
    -H 'Authorization: Bearer {access_token}' \ 

Response:

HTTP/1.1 200 OK

{
  "slaPolicies": [
      {
          "id": "662ad4a7-0f87-4713-b9eb-4eae7c7fb648",
          "isEnabled": true,
          "order": 1,
          "firstResponse": 1,
          "nextResponse": 2,
          "resolution": 3,
          "operationalHours": "BusinessHour",
          "conditionMetType": "all",
          "logicalExpression": "",
          "name": "Sla example",
          "slaPolicyConditions": [
              {
                  "id": "980cce41-58ae-43b2-8de8-37eea94da4a4",
                  "slaPolicyId": "662ad4a7-0f87-4713-b9eb-4eae7c7fb648",
                  "fieldName": "{!Ticket.Status}",
                  "operator": "is",
                  "value": "resolved",
                  "order": 1
              }
          ]
      }
  ],
  "nextPage": null,
  "previousPage": null,
  "total": 1
} 

Get a single SLA Policy

GET ticketing/slaPolicies/{id}

  • Parameters:

NameTypeinRequiredDescription
includestringquerynoAllowed value is "slaPolicyCondition".
  • Response:

SLA Policy

  • Example

Sample Request:

curl https://api11.comm100.io/v4/ticketing/slaPolicies/662ad4a7-0f87-4713-b9eb-4eae7c7fb648 \ 
    -X 'GET' \ 
    -H 'Authorization: Bearer {access_token}' \ 

Response:

HTTP/1.1 200 OK

{
  "id": "662ad4a7-0f87-4713-b9eb-4eae7c7fb648",
  "isEnabled": true,
  "order": 1,
  "firstResponse": 1,
  "nextResponse": 2,
  "resolution": 3,
  "operationalHours": "BusinessHour",
  "conditionMetType": "all",
  "logicalExpression": "",
  "name": "Sla example",
  "slaPolicyConditions": [
      {
          "id": "980cce41-58ae-43b2-8de8-37eea94da4a4",
          "slaPolicyId": "662ad4a7-0f87-4713-b9eb-4eae7c7fb648",
          "fieldName": "{!Ticket.Status}",
          "operator": "is",
          "value": "resolved",
          "order": 1
      }
  ]
} 

Create a new SLA Policy

POST ticketing/slaPolicies

  • Parameters:

NameTypeinRequiredDescription
isEnabledboolbodyyesWhether SLA Policy is enabled or not.
orderintegerbodynoOrder of the SLA Policy.
firstResponseintegerbodyyesFirst response time of the SLA Policy.
nextResponseintegerbodyyesNext response time of the SLA Policy.
resolutionintegerbodyyesResolution time of the SLA Policy.
operationalHoursstringbodyyesOperating hours refer to the working hours of your company. Allowed values are "CalendarHour", "BusinessHour".
conditionMetTypestringbodyyesHow conditions are matched. Allowed values are "any", "all", "logicalExpression".
logicalExpressionstringbodynoLogical expression to match the conditions i.e., (1 or 2 or 3) and (4 and 5).
namestringbodyyesName of the SLA Policy.
slaPolicyConditionsslaPolicyConditions[]bodynoCondition of Sla policy.
  • Response:

SLA Policy

  • Example

Sample Request:

curl https://api11.comm100.io/v4/ticketing/slaPolicies \ 
    -X 'POST' \ 
    -H 'Authorization: Bearer {access_token}' \ 
    -H 'Content-Type: application/json' \ 
    -D '{"isEnabled":true,"order":1,"firstResponse":1,"nextResponse":2,"resolution":3,"operationalHours":"BusinessHour","conditionMetType":"all","logicalExpression":"","name":"Sla example","slaPolicyConditions":[{"fieldName":"{!Ticket.Status}","operator":"is","value":"resolved","order":1}]}' 

Response:

HTTP/1.1 201 Created

{
  "id": "662ad4a7-0f87-4713-b9eb-4eae7c7fb648",
  "isEnabled": true,
  "order": 1,
  "firstResponse": 1,
  "nextResponse": 2,
  "resolution": 3,
  "operationalHours": "BusinessHour",
  "conditionMetType": "all",
  "logicalExpression": "",
  "name": "Sla example",
  "slaPolicyConditions": [
      {
          "id": "980cce41-58ae-43b2-8de8-37eea94da4a4",
          "slaPolicyId": "662ad4a7-0f87-4713-b9eb-4eae7c7fb648",
          "fieldName": "{!Ticket.Status}",
          "operator": "is",
          "value": "resolved",
          "order": 1
      }
  ]
} 

Disable the SLA Policy

POST ticketing/slaPolicies/{id}:disable

  • Parameters:

No Parameters

  • Response:

SLA Policy

  • Example

Sample Request:

curl https://api11.comm100.io/v4/ticketing/slaPolicies/662ad4a7-0f87-4713-b9eb-4eae7c7fb648:disable \ 
    -X 'POST' \ 
    -H 'Authorization: Bearer {access_token}' \ 

Response:

HTTP/1.1 200 OK

{
  "id": "662ad4a7-0f87-4713-b9eb-4eae7c7fb648",
  "isEnabled": false,
  "order": 1,
  "firstResponse": 1,
  "nextResponse": 2,
  "resolution": 3,
  "operationalHours": "BusinessHour",
  "conditionMetType": "all",
  "logicalExpression": "",
  "name": "Sla example",
  "slaPolicyConditions": [
      {
          "id": "980cce41-58ae-43b2-8de8-37eea94da4a4",
          "slaPolicyId": "662ad4a7-0f87-4713-b9eb-4eae7c7fb648",
          "fieldName": "{!Ticket.Status}",
          "operator": "is",
          "value": "resolved",
          "order": 1
      }
  ]
} 

Enable the SLA Policy

POST ticketing/slaPolicies/{id}:enable

  • Parameters:

No Parameters

  • Response:

SLA Policy

  • Example

Sample Request:

curl https://api11.comm100.io/v4/ticketing/slaPolicies/662ad4a7-0f87-4713-b9eb-4eae7c7fb648:enable \ 
    -X 'POST' \ 
    -H 'Authorization: Bearer {access_token}' \ 

Response:

HTTP/1.1 200 OK

{
  "id": "662ad4a7-0f87-4713-b9eb-4eae7c7fb648",
  "isEnabled": true,
  "order": 1,
  "firstResponse": 1,
  "nextResponse": 2,
  "resolution": 3,
  "operationalHours": "BusinessHour",
  "conditionMetType": "all",
  "logicalExpression": "",
  "name": "Sla example",
  "slaPolicyConditions": [
      {
          "id": "980cce41-58ae-43b2-8de8-37eea94da4a4",
          "slaPolicyId": "662ad4a7-0f87-4713-b9eb-4eae7c7fb648",
          "fieldName": "{!Ticket.Status}",
          "operator": "is",
          "value": "resolved",
          "order": 1
      }
  ]
} 

Update the SLA Policy

PUT ticketing/slaPolicies/{id}

  • Parameters:

NameTypeinRequiredDescription
isEnabledboolbodyyesWhether SLA Policy is enabled or not.
orderintegerbodynoOrder of the SLA Policy.
firstResponseintegerbodyyesFirst response time of the SLA Policy.
nextResponseintegerbodyyesNext response time of the SLA Policy.
resolutionintegerbodyyesResolution time of the SLA Policy.
operationalHoursstringbodyyesOperating hours refer to the working hours of your company. Allowed values are "CalendarHour", "BusinessHour".
conditionMetTypestringbodyyesHow conditions are matched. Allowed values are "any", "all", "logicalExpression".
logicalExpressionstringbodynoLogical expression to match the conditions i.e., (1 or 2 or 3) and (4 and 5).
namestringbodyyesName of the SLA Policy.
slaPolicyConditionsslaPolicyConditions[]bodynoCondition of Sla policy.
  • Response:

SLA Policy

  • Example

Sample Request:

curl https://api11.comm100.io/v4/ticketing/slaPolicies/662ad4a7-0f87-4713-b9eb-4eae7c7fb648 \ 
    -X 'PUT' \ 
    -H 'Authorization: Bearer {access_token}' \ 
    -H 'Content-Type: application/json' \ 
    -D '{"isEnabled":true,"order":1,"firstResponse":1,"nextResponse":2,"resolution":3,"operationalHours":"BusinessHour","conditionMetType":"all","logicalExpression":"","name":"Sla example","slaPolicyConditions":[{"fieldName":"{!Ticket.Status}","operator":"is","value":"resolved","order":1}]}' 

Response:

HTTP/1.1 200 OK

{
  "id": "662ad4a7-0f87-4713-b9eb-4eae7c7fb648",
  "isEnabled": true,
  "order": 1,
  "firstResponse": 1,
  "nextResponse": 2,
  "resolution": 3,
  "operationalHours": "BusinessHour",
  "conditionMetType": "all",
  "logicalExpression": "",
  "name": "Sla example",
  "slaPolicyConditions": [
      {
          "id": "980cce41-58ae-43b2-8de8-37eea94da4a4",
          "slaPolicyId": "662ad4a7-0f87-4713-b9eb-4eae7c7fb648",
          "fieldName": "{!Ticket.Status}",
          "operator": "is",
          "value": "resolved",
          "order": 1
      }
  ]
} 

Remove the SLA Policy

DELETE ticketing/slaPolicies/{id}

  • Parameters:

No Parameters

  • Response:

No Content

  • Example

Sample Request:

curl https://api11.comm100.io/v4/ticketing/slaPolicies/662ad4a7-0f87-4713-b9eb-4eae7c7fb648 \ 
    -X 'DELETE' \ 
    -H 'Authorization: Bearer {access_token}' \ 

Response:

HTTP/1.1 204 No Content


Was this article helpful?

What's Next