query ServiceLevelAgreementPolicy($serviceLevelAgreementPolicyId: ID!) {
serviceLevelAgreementPolicy(serviceLevelAgreementPolicyId: $serviceLevelAgreementPolicyId) {
id
name
description
targets {
id
type
minutes
warnBefore {
minutes
}
pauseOnStatusDetailTypes
businessHoursSchedules {
id
name
timezone {
__typename
}
slots {
__typename
}
overrides {
__typename
}
createdAt {
__typename
}
}
}
isArchived
archivedAt {
unixTimestamp
iso8601
}
}
}{
"serviceLevelAgreementPolicyId": "id"
}{
"data": {
"serviceLevelAgreementPolicy": {
"id": "id",
"name": "string",
"description": "string",
"targets": [
{
"id": "id",
"type": "FIRST_RESPONSE_TIME",
"minutes": 1,
"warnBefore": {
"minutes": 1
},
"pauseOnStatusDetailTypes": [
"WAITING_FOR_CUSTOMER"
],
"businessHoursSchedules": [
{
"id": "id",
"name": "string",
"timezone": {
"__typename": "Timezone"
},
"slots": [
{
"__typename": "BusinessHoursSlot"
}
],
"overrides": {
"__typename": "BusinessHoursOverrideConnection"
},
"createdAt": {
"__typename": "DateTime"
}
}
]
}
],
"isArchived": true,
"archivedAt": {
"unixTimestamp": "string",
"iso8601": "string"
}
}
}
}serviceLevelAgreementPolicy
Returns a single SLA policy by its Plain ID. Returns null if no policy with that ID exists. Requires the serviceLevelAgreement:read permission. An archived policy cannot be assigned to new threads; existing threads retain their SLAs. Deleting a policy is done by the user in the Plain app. The Plain app page is https://app.plain.com/workspace/w_…/settings/slas/<policy id>.
serviceLevelAgreementPolicy(serviceLevelAgreementPolicyId: ID!): ServiceLevelAgreementPolicyArguments
Returns
The SLA targets this policy applies. At most one per type.
Whether this policy has been archived. An archived policy keeps serving the threads already on it but can no longer be assigned to other threads.
When this policy was archived. Null if the policy is not archived.
The user or machine user who archived this policy. Null if the policy is not archived.
How many threads currently on this policy are open, meaning their status is not DONE. Snoozed threads count, since their resolution clocks still run.
query ServiceLevelAgreementPolicy($serviceLevelAgreementPolicyId: ID!) {
serviceLevelAgreementPolicy(serviceLevelAgreementPolicyId: $serviceLevelAgreementPolicyId) {
id
name
description
targets {
id
type
minutes
warnBefore {
minutes
}
pauseOnStatusDetailTypes
businessHoursSchedules {
id
name
timezone {
__typename
}
slots {
__typename
}
overrides {
__typename
}
createdAt {
__typename
}
}
}
isArchived
archivedAt {
unixTimestamp
iso8601
}
}
}{
"serviceLevelAgreementPolicyId": "id"
}{
"data": {
"serviceLevelAgreementPolicy": {
"id": "id",
"name": "string",
"description": "string",
"targets": [
{
"id": "id",
"type": "FIRST_RESPONSE_TIME",
"minutes": 1,
"warnBefore": {
"minutes": 1
},
"pauseOnStatusDetailTypes": [
"WAITING_FOR_CUSTOMER"
],
"businessHoursSchedules": [
{
"id": "id",
"name": "string",
"timezone": {
"__typename": "Timezone"
},
"slots": [
{
"__typename": "BusinessHoursSlot"
}
],
"overrides": {
"__typename": "BusinessHoursOverrideConnection"
},
"createdAt": {
"__typename": "DateTime"
}
}
]
}
],
"isArchived": true,
"archivedAt": {
"unixTimestamp": "string",
"iso8601": "string"
}
}
}
}Was this page helpful?

