---
title: "Get analytics on a work order"
method: GET
path: "/workorders/{workOrderId}/analytics"
tags: ["WorkOrders"]
---

# Get analytics on a work order

`GET /workorders/{workOrderId}/analytics`

## Request

- Base URL: `https://sb2api.servicechannel.com/v3`
- URL: `https://sb2api.servicechannel.com/v3/workorders/{workOrderId}/analytics`
- Auth: OAuth 2
  - Authorization code: `https://sb2login.servicechannel.com/oauth/authorize`
  - Token URL: `https://sb2login.servicechannel.com/oauth/token`
- TypeScript: <https://skmtc.dev/servicechannel/apis/servicechannel-api-v-3/docs/workorders/:workOrderId/analytics/get.ts> (a function with typed inputs; its response is checked against the schema)

Retrieves analytics on the specified work order. 
            <br />Analytics are based on the following flags: 
             • **IVR**. Tracks the proper Check-In/Out process and indicates whether the work order has both Check-In and Check-Out records and completes with a Check-Out. 
             • **SLA**. Tracks estimated time of arrival (ETA) and indicates whether the work order met the original ETA. 
             • **FirstTimeCompletionFlag**. Indicates whether the work order was completed on the first visit (the work order has only one Check-In and one Check-Out records within 24 hours). 
            <br />***Note***: You can get analytics from any work order. However, the analytics are mostly relevant for the work orders in the **Completed** status, as these flags rest on the Check-In/Out information.

## Path parameters

- `workOrderId` integer, required

## Response `200`

Analytics on the specified work order are in the response.

- ServiceChannelServicesMessagingWorkordersWorkOrderAnalyticsResponse
  - `IVR` boolean: Indicates whether the work order has both Check-In and Check-Out records and completes with a Check-Out. **Possible values**: *true*, *false*.
  - `SLA` boolean: Indicates whether the work order met the original ETA. **Possible values**: *true*, *false*, or *null* (if the `Original ETA` or `CheckInTime` is not populated in source data).
  - `FirstTimeCompletionFlag` integer: Indicates whether the work order was completed on the first visit. **Possible values**: `1` - *Yes*, `0` - *No*.

## Other responses

- `401`: The request is not authorized. <br/>Error codes: 504 — API call rejected by security permissions
- `404`: The request URI is incorrect, or the resource does not exist. <br/>Error codes: 502 — Data not found The resource you are looking for has been removed, had its name changed, or is temporarily unavailable
- `500`: Something went wrong, and the server was unable to complete your request. <br/>Error codes: 501 — Internal Error

---

[API](https://skmtc.dev/servicechannel/apis/servicechannel-api-v-3.md) - [All operations](https://skmtc.dev/servicechannel/apis/servicechannel-api-v-3/llms.txt) - [OpenAPI document](https://skmtc.dev/servicechannel/apis/servicechannel-api-v-3/revisions/d490d6596809?raw)
