Mutation
mutation CreateServiceLevelAgreementPolicy($input: CreateServiceLevelAgreementPolicyInput!) {
createServiceLevelAgreementPolicy(input: $input) {
serviceLevelAgreementPolicy {
id
name
description
targets {
id
type
minutes
warnBefore {
__typename
}
pauseOnStatusDetailTypes
businessHoursSchedules {
__typename
}
}
isArchived
archivedAt {
unixTimestamp
iso8601
}
}
error {
message
type
code
fields {
field
message
type
}
}
}
}Variables
{
"input": {
"name": "string",
"targets": [
{
"type": "FIRST_RESPONSE_TIME",
"minutes": 1,
"warnBefore": {
"minutes": 1
}
}
]
}
}Response
{
"data": {
"createServiceLevelAgreementPolicy": {
"serviceLevelAgreementPolicy": {
"id": "id",
"name": "string",
"description": "string",
"targets": [
{
"id": "id",
"type": "FIRST_RESPONSE_TIME",
"minutes": 1,
"warnBefore": {
"__typename": "ServiceLevelAgreementWarnBefore"
},
"pauseOnStatusDetailTypes": [
"WAITING_FOR_CUSTOMER"
],
"businessHoursSchedules": [
{
"__typename": "BusinessHoursSchedule"
}
]
}
],
"isArchived": true,
"archivedAt": {
"unixTimestamp": "string",
"iso8601": "string"
}
},
"error": {
"message": "string",
"type": "VALIDATION",
"code": "string",
"fields": [
{
"field": "string",
"message": "string",
"type": "VALIDATION"
}
]
}
}
}
}Mutations
createServiceLevelAgreementPolicy
Create an SLA policy together with its targets. A policy holds at most one target per type, and any combination of types is valid. Business hours schedules are chosen once per policy: every target that uses business hours must reference the same schedules, and a target with none is tracked 24/7. A policy only starts tracking once it is applied to a thread. Requires the serviceLevelAgreement:create permission.
MUTATION
createServiceLevelAgreementPolicy(input: CreateServiceLevelAgreementPolicyInput!): CreateServiceLevelAgreementPolicyOutput!Arguments
input
serviceLevelAgreementPolicy
error
Mutation
mutation CreateServiceLevelAgreementPolicy($input: CreateServiceLevelAgreementPolicyInput!) {
createServiceLevelAgreementPolicy(input: $input) {
serviceLevelAgreementPolicy {
id
name
description
targets {
id
type
minutes
warnBefore {
__typename
}
pauseOnStatusDetailTypes
businessHoursSchedules {
__typename
}
}
isArchived
archivedAt {
unixTimestamp
iso8601
}
}
error {
message
type
code
fields {
field
message
type
}
}
}
}Variables
{
"input": {
"name": "string",
"targets": [
{
"type": "FIRST_RESPONSE_TIME",
"minutes": 1,
"warnBefore": {
"minutes": 1
}
}
]
}
}Response
{
"data": {
"createServiceLevelAgreementPolicy": {
"serviceLevelAgreementPolicy": {
"id": "id",
"name": "string",
"description": "string",
"targets": [
{
"id": "id",
"type": "FIRST_RESPONSE_TIME",
"minutes": 1,
"warnBefore": {
"__typename": "ServiceLevelAgreementWarnBefore"
},
"pauseOnStatusDetailTypes": [
"WAITING_FOR_CUSTOMER"
],
"businessHoursSchedules": [
{
"__typename": "BusinessHoursSchedule"
}
]
}
],
"isArchived": true,
"archivedAt": {
"unixTimestamp": "string",
"iso8601": "string"
}
},
"error": {
"message": "string",
"type": "VALIDATION",
"code": "string",
"fields": [
{
"field": "string",
"message": "string",
"type": "VALIDATION"
}
]
}
}
}
}Was this page helpful?

