Priorities and SLAs
A priority is a level your team defines in Replyco, such as “Urgent” or “Standard”, with two service-level targets: how soon a ticket must get an answer, and how soon it must be resolved. When a ticket gets a priority, Replyco turns the targets into due times on that ticket, and agents and filters can then find the tickets that are due or overdue. Through the API you read the priorities and give tickets one; the levels themselves are set up in Replyco.
Fields that matter
Section titled “Fields that matter”| Field | Meaning |
|---|---|
id |
The priority’s id. Pass it to GET /openapi/thread/assignpriority/{threadId}/{id}. |
priority |
The level’s name, as your team sees it. |
respondWithin |
Minutes within which a ticket must get an answer. Empty or 0 means no response target. |
resolveWithin |
Minutes within which a ticket must be resolved. Empty or 0 means no resolution target. |
operationalHours |
How the minutes are counted: 0 business hours, 1 calendar time. |
Business hours count only the working days and hours your company has set in Replyco; calendar time counts every minute. The response clock starts at the first customer message after your team’s last reply, or when the ticket was created if nobody has replied yet. The resolution clock starts at the ticket’s first message.
Giving a ticket a priority
Section titled “Giving a ticket a priority”GET /openapi/thread/assignpriority/{threadId}/{id} sets the ticket’s priority and works out its due times, which
appear as respondWithin and resolveWithin dates on the ticket in the ticket list. Pass the empty id
00000000-0000-0000-0000-000000000000 as id to remove the priority and its due times.
curl "https://open-api.replyco.com/openapi/thread/assignpriority/7d2e4f6a-8b1c-4d3e-9f5a-6b7c8d9e0f1a/2a4c6e8f-0b1d-4f3a-8c5e-7d9f1b3a5c7e" \ -H "Authorization: Bearer $ACCESS_TOKEN"The ticket list can then filter on the targets (slaTypes, for example respond overdue) and sort by respondWithin or
resolveWithin; see Tickets.
Listing and filtering
Section titled “Listing and filtering”GET /openapi/prioritysla/paged returns your company’s priorities.
| Parameter | What it does | Default | Limits |
|---|---|---|---|
page |
The page to return. | 1 | Stop at the response’s pagesCount. |
count |
Priorities per page. | 10 | At most 100; a larger value is rejected with 400 “Max page size is 100.” |
sort |
respondWithin or resolveWithin. Another name is rejected with 400. |
by id | — |
asc |
true for ascending, false for descending. |
true |
— |
A company has few priorities, so one request with count=100 returns them all.
curl "https://open-api.replyco.com/openapi/prioritysla/paged?count=100&sort=respondWithin" \ -H "Authorization: Bearer $ACCESS_TOKEN"{ "totalRecords": 2, "pageSize": 100, "pagesCount": 1, "currentPage": 1, "data": [ { "id": "2a4c6e8f-0b1d-4f3a-8c5e-7d9f1b3a5c7e", "priority": "Urgent", "respondWithin": 60, "resolveWithin": 480 }, { "id": "9e8d7c6b-5a4f-4e3d-8c2b-1a0f9e8d7c6b", "priority": "Standard", "respondWithin": 480, "resolveWithin": 2880 } ]}Operations
Section titled “Operations”| Method | Path | Summary | Scopes |
|---|---|---|---|
| GET | /openapi/prioritysla/paged |
Get all records with paging | — |
| GET | /openapi/prioritysla/{id} |
Get element by id | — |
Errors
Section titled “Errors”| Status | Meaning | Returned by |
|---|---|---|
| 401 | Unauthorized | GET /openapi/prioritysla/paged, GET /openapi/prioritysla/{id} |
Related
Section titled “Related”- Tickets: due times on tickets, and the
slaTypesfilter. - Route and organise tickets: assign, label and snooze tickets.
- API reference.