Mutation
mutation CreateServiceLevelAgreementPolicy($input: CreateServiceLevelAgreementPolicyInput!) {
createServiceLevelAgreementPolicy(input: $input) {
serviceLevelAgreementPolicy {
id
name
description
targets {
id
type
minutes
warnBefore {
__typename
}
pauseOnStatusDetailTypes
businessHoursSchedules {
__typename
}
}
createdAt {
unixTimestamp
iso8601
}
createdBy {
__typename
... on UserActor {
__typename
}
}
}
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"
}
]
}
],
"createdAt": {
"unixTimestamp": "string",
"iso8601": "string"
},
"createdBy": {
"__typename": "UserActor"
}
},
"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 are configured on the policy and apply to every target in it. 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
}
}
createdAt {
unixTimestamp
iso8601
}
createdBy {
__typename
... on UserActor {
__typename
}
}
}
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"
}
]
}
],
"createdAt": {
"unixTimestamp": "string",
"iso8601": "string"
},
"createdBy": {
"__typename": "UserActor"
}
},
"error": {
"message": "string",
"type": "VALIDATION",
"code": "string",
"fields": [
{
"field": "string",
"message": "string",
"type": "VALIDATION"
}
]
}
}
}
}Was this page helpful?

