Overview
The WFM Community API provides two endpoints for integrating Sharpen queue and agent data with external workforce management tools:
Historical — Returns interval-based queue interaction data for reporting and scheduling purposes.
Real-Time — Returns current agent status data for live workforce visibility.
All inputs and outputs use UTC. The API does not perform timezone conversions. If you are comparing results to Insights, note that the Insights UI converts timestamps from local time to UTC.
cKey1 and cKey2 authentication values are available in your organization's developer portal. Contact your CSM if you are unsure which environment your organization is on.
Endpoints
Historical
Environment |
URL |
|---|---|
IZ0 (Production) |
|
IZ1 (Production) |
|
Real-Time
Environment |
URL |
|---|---|
IZ0 (Production) |
|
IZ1 (Production) |
|
Historical Endpoint
The historical endpoint returns interval-based queue interaction data. It is scheduled to run automatically every 15 minutes (covering the last 2 hours and 15 minutes of data) and can also be called on demand.
Inputs
Parameter |
Description |
|---|---|
cKey1, cKey2 |
Organization authentication keys |
startTime |
Start of the query window (UTC) |
endTime |
End of the query window (UTC) |
queueIDs |
Array of queue IDs to include |
Outputs
Field |
Description |
|---|---|
interval |
The 15-minute interval the data represents |
queueID |
The queue the data belongs to |
sumHandleTime |
Total handle time in seconds across all interactions in the interval |
enteredCount |
Number of interactions that entered the queue (equivalent to Q Offered in Insights Derived Fields) |
abandonedCount |
Number of interactions abandoned before being answered |
Example
Request:
{
"cKey1": "",
"cKey2": "",
"startTime": "5/8/2020 6:30:00 PM",
"endTime": "5/8/2020 8:45:00 PM",
"queueIDs": [6255, 6309]
}Response:
[
{
"interval": "2020-05-08 18:30:00",
"queueID": 6255,
"sumHandleTime": 1104,
"enteredCount": 2,
"abandonedCount": 0
},
{
"interval": "2020-05-08 18:30:00",
"queueID": 6309,
"sumHandleTime": 198,
"enteredCount": 1,
"abandonedCount": 0
}
]Notes
The maximum query window is 6 hours. Requests exceeding this will return an error: "The difference between startTime and endTime must be less than or equal to 6 hours."
enteredCountuses the same formula as the Q Offered system-derived field in Insights. If the Q Offered derived field has been customized by your organization, the API will continue to use the original system formula and will not reflect those changes.
Real-Time Endpoint
The real-time endpoint returns current agent status data. It is called on demand and returns the status of any agent whose status has changed since the provided lastRanTime.
Inputs
Parameter |
Description |
|---|---|
cKey1, cKey2 |
Organization authentication keys |
lastRanTime |
Timestamp of the last successful request (UTC). Returns only agents whose status changed after this time. |
Outputs
Field |
Description |
|---|---|
uKey |
Unique identifier for the agent |
fullName |
Agent's full name |
statusCode |
Agent's current status — for example, |
lastStatusChange |
Timestamp of the agent's most recent status change (UTC) |
Example
Request:
{
"cKey1": "",
"cKey2": "",
"lastRanTime": "5/8/2020 8:47:58 PM"
}Response:
{
"uKey": "0315939E8A6EB667735FF60FCA",
"fullName": "Tom Jones",
"statusCode": "offline",
"lastStatusChange": "2020-01-21 05:25:31"
}An agent's status will not appear in the response if their state mapping is set to Ignore within the CommunityWFM interface.