CT Results
API Specification
Description | Creates a task for WorkManager to execute exportEngine for CT Results exporter. |
Authentication
Required |
Yes |
URL | https://<domain or IP>/SMARTSync/services/rs/exporters/v1/ct-results |
Method | POST |
Request Headers | Cookie: JSESSIONID={jsessionId} Content-Type: application/json |
Request Params | (See below) |
API Specification: Request Params
startDate - String, format: YYYY-MM-YY Required: true. Notes: cannot be after the endDate. |
endDate - String, format: YYYY-MM-YY Required: true. Notes: cannot be before the startDate. |
outputFormat - String, supported formats: PIPE, JSON Required: for PIPE - required, for JSON - optional. Notes: is not case sensitive. |
dateFormat - String, possible values: mmddyy, ddmmyy, mmddyyyy, ddmmyyyy, yyyymmdd, yyyyddmm, yyddmm, yymmdd. If dateformat is not provided and outputFormat is set to JSON, all date fields will be converted to ISO date format. Required: Only for PIPEoutputFormat. Notes: is not case sensitive. Determines format of output dates. |
timeFormat - String, possible values: 12, 24. Determines format of output times. Required: true. Notes: is not case sensitive. |
buIds - Array of integers. Should be one or more IDs user has permission to use. |
ctIds - Array of integers. Should be one or more IDs user has permission to use. Required: at least buIds or ctIds should be present in request. Notes: is not case sensitive. |
keepEmptyJsonFields - Boolean field. Required: false. Notes: This field can be set only if outputFormat is set to JSON. By default it is false. If set to true then JSON output will contain empty values ({},[],"") for fields. |
excludePipeHeader - Boolean field. Required: false. Notes: This field can be set only if outputFormat is PIPE. By default it is false. If it is set to true, headers will be excluded from PIPE output. |
fields - Array of objects. Represents the list of the supported field names, fields with attribute values, and fields with specified value. All field names, attributes, and values are not case sensitive. Required: false. Possible values: Simple fields when outputFormat is PIPE: {"name":"date"}, {"name":"period"}, {"name":"TZ"}, {"name":"custID"}, {"name":"saGroupID"}, {"name":"saGroupName"}, {"name":"ssGroupID"}, {"name":"ssGroupName"}, {"name":"buID"}, {"name":"buName"}, {"name":"ctID"}, {"name":"ctName"}, {"name":"acdID"}, {"name":"modify"}, {"name":"actContactsReceived"}, {"name":"actContactsHandled"}, {"name":"actAHT"}, {"name":"slPctObj"}, {"name":"actSLPct"}, {"name":"slTime"}, {"name":"asaObj"}, {"name":"actASA"}, {"name":"maxOcc"}, {"name":"actOcc"}, {"name":"actReq"}, {"name":"actContactsHandledSL"}, {"name":"actContactsAband"}, {"name":"actContactsAbandSL"}, {"name":"actOutContacts"}, {"name":"actIntContacts"}, {"name":"actBacklogNotExp"}, {"name":"actBacklogExp"}, {"name":"estStaff"}, {"name":"actLogin"}, {"name":"actTalkTime"}, {"name":"actWorkTime"}, {"name":"actOutTime"}, {"name":"actReadyTime"}, {"name":"actIdleTime"}, {"name":"actIntTime"}, {"name":"actHandledLong"}, {"name":"actAbandonLong"}, {"name":"actQueueDelay"}, {"name":"actHoldTime"}, {"name":"actATT"}, {"name":"actAWT"}, {"name":"actAOT"} Simple fields when outputFormat is set to JSON: {"name":"date"}, {"name":"period"}, {"name":"TZ"}, {"name":"custID"}, {"name":"egID"}, {"name":"egName"}, {"name":"buID"}, {"name":"buName"}, {"name":"ctID"}, {"name":"ctName"}, {"name":"acdID"}, {"name":"modify"}, {"name":"actContactsReceived"}, {"name":"actContactsHandled"}, {"name":"actAHT"}, {"name":"slPctObj"}, {"name":"actSLPct"}, {"name":"slTime"}, {"name":"asaObj"}, {"name":"actASA"}, {"name":"maxOcc"}, {"name":"actOcc"}, {"name":"actReq"}, {"name":"actContactsHandledSL"}, {"name":"actContactsAband"}, {"name":"actContactsAbandSL"}, {"name":"actOutContacts"}, {"name":"actBacklogNotExp"}, {"name":"actBacklogExp"}, {"name":"estStaff"}, {"name":"actLogin"}, {"name":"actTalkTime"}, {"name":"actWorkTime"}, {"name":"actOutTime"}, {"name":"actReadyTime"}, {"name":"actIdleTime"}, {"name":"actHandledLong"}, {"name":"actAbandonLong"}, {"name":"actQueueDelay"}, {"name":"actHoldTime"}, {"name":"actATT"}, {"name":"actAWT"}, {"name":"actAOT"} |
Note:
|
sortOrder - Array of objects. Represents the list of the supported field names, fields with attribute values, and fields with specified value. All field names, attributes, and values are not case sensitive. Required: false. Possible values: the same values as for fields. |
API Specification (cont)
Response
Data |
Response has a unique JobId: jobId is a 32 length string. Example {
"jobId":"9b2fe7bb8362429fb85a16c9373cf50c"
}
|
Response
Headers |
Content-Type: application/json |
Success
Response |
Code: 200 OK Content : [Response Data] |
Error
Response |
Code: 401 Unauthorized Error message: {
"message":"Unauthorized",
"status":401
}
Code: 400 Bad Request
All fields are invalid:
{
"message":"One or more request validations failed",
"status":400,
"details": [
"Invalid field: 'keepEmptyJsonFields'",
"Invalid field: 'excludePipeHeader'",
"Invalid outputFormat value: 'XML'",
"Invalid dateFormat value: 'ddmmcyyyy'",
"Invalid timeFormat value: '1c2'",
"startDate must match the provided yyyy-MM-dd format,
"endDate must match the provided yyyy-MM-dd format",
"Insufficient permissions to view entities 'BU -1'",
"Insufficient permissions to view entities 'CT -1'",
"Invalid entity: 'BU 1234567'",
"Invalid entity: 'CT 1234567'",
"Invalid values within fields element: wrongField2,wrongField1"
]
}
Start date>end date
{
"message":"One or more request validations failed",
"status":400,
"details": [
"endDate must be either equal to or after the startDate"
]
}
Code: 500 Internal server error
|
Sample Call for PIPE outputFormat |
https://localhost/SMARTSync/services/rs/exporters/v1/ct-results request body(request for all fields): {
"startDate":"2023-11-10",
"endDate":"2024-11-10",
"outputFormat":"PIPE",
"dateFormat":"ddmmyyyy",
"timeFormat":"12",
"buIds":[
500
],
"ctIds":[
500
]
}
request body(request for specific fields): {
"startDate":"2022-11-10",
"endDate":"2022-11-10",
"outputFormat":"PIPE",
"dateFormat":"ddmmyyyy",
"timeFormat":"12",
"buIds":[
500
],
"ctIds":[
500
],
"fields":[{"name":"custID"}, {"name":"TZ"}],
"sortOrder":[{"name":"custID"}, {"name":"TZ"}]
|
Sample Call for JSON outputFormat |
https://localhost/SMARTSync/services/rs/exporters/v1/ct-results request body(request for all fields): {
"startDate":"2023-11-10",
"endDate":"2024-11-10",
"outputFormat":"JSON",
"dateFormat":"ddmmyyyy",
"keepEmptyJsonFields":true,
"timeFormat":"12",
"buIds":[
500
],
"ctIds":[
500
]
}
request body(request for specific fields):
{
"startDate":"2022-11-10",
"endDate":"2022-11-10",
"outputFormat":"JSON",
"dateFormat":"ddmmyyyy",
"timeFormat":"12",
"keepEmptyJsonFields":true,
"buIds":[
500 ], "ctIds":[ 500 ], "fields":[{"name":"custID"}, {"name":"TZ"}],
"sortOrder":[{"name":"custID"}, {"name":"TZ"}]
}
}
|
Output Field Descriptions
-
This export runs for each BU specified in the buIds parameter. When run for a BU, the output includes the data for each CT that belongs to the BU during the specified date range, if you appropriately maintained the entity relationships and forecasts/plans.
-
In addition, this export runs for each CT specified in the ctIds parameter. If a CT specified in the ctIds element belongs to a BU that is also specified in the buIds element, the data for the CT is only included one time.
-
If the export is to run for multiple CTs or BUs, all data is saved in the same output file.
-
The output file contains one record for each CT, for each statistics period of each date in the selected date range. CT hours are not taken into account.
-
Data is read from the result table and is only included for past dates. If none of the dates in the specified range are in the past, the output file is empty.
This export uses the CT time zone setting. The export does not differentiate between the duplicate periods that occur on the Daylight Saving Time (DST) date. It does not show which of the duplicate periods occurred first on a DST date with multiple entries for the same period.
The CT Results output can contain these fields:
Field |
Description |
Values |
---|---|---|
date |
The date based on the CT’s time zone. The format of the date is specified in the dateFormat parameter. If no dateFormat is provided, then the format defaults to mmddyyyy if the outputFormat is PIPE. If the outputFormat is JSON, then dates default to ISO 8601 format. If the outputFormat is XML, the format is always a fixed XML structure. |
|
period |
The start time of the period, based on the CT’s time zone. The format of this time is specified in the timeFormat attribute. If no timeFormat attribute exists, 24-hour format is used. |
|
TZ |
The CT’s time zone. |
|
custID |
The customer ID. |
|
saGroupID |
The ID of the EG to which the CT belongs on the date being exported. |
This field is blank if the CT does not belong to an EG. |
saGroupName |
The EG name. |
This field is blank if the CT does not belong to an EG. |
ssGroupID |
The ID of the skill scheduling group to which the CT belongs on the date being exported. |
This field is blank. |
ssGroupName |
The skill scheduling group name. |
This field is blank. |
buID |
The ID of the BU to which the CT belongs on the date being exported. |
If the CT does not belong to a BU, or if the BU cannot be determined because the user did not appropriately maintain the entity relationships and forecast/plan, this field is blank. |
buName |
The BU name. |
This field is blank if the CT does not belong to a BU, or if the BU cannot be determined. |
ctID |
The ID of the CT. |
|
ctName |
The name of the CT. |
|
acdID |
The ID of the CT’s default ACD or multimedia server. |
|
modify |
The record’s modify timestamp. |
|
actContactsReceived |
The actual number of contacts received for the CT for the period. |
For workload-based CTs, the value is provided by an external system. For simulation-based and BErlangC-based CTs, the value is the sum of actContactsHandled + actContactsAband. |
actContactsHandled |
The CT’s actual number of contacts handled. |
The value is the sum of actHandledLong + actHandledShort. |
actAHT |
The CT’s actual average handle time. |
Formatted to 2 decimal places. |
slPctObj |
The service level percent objective. |
Formatted to 2 decimal places. |
actSLPct |
The CT’s actual service level percent. |
|
slTime |
The CT’s service level time objective, in seconds. |
|
asaObj |
The ASA objective. |
Formatted to 2 decimal places. |
actASA |
The actual ASA. |
Formatted to 2 decimal places. |
maxOcc |
The maximum occupancy objective. |
Formatted to 2 decimal places. |
actOcc |
The CT’s actual occupancy. |
0 - 100, formatted to 2 decimal places. |
actReq |
The CT’s actual requirement. |
Formatted to 2 decimal places. This field is blank for workload-based CTs. The value represents the requirements which meet or exceed all three forecast objectives, service level, ASA, and maximum occupancy, and includes adjustments for:
|
actContactsHandledSL |
The CT’s actual number of contacts handled before the time threshold defined on the ACD or multimedia server. This field is known as actHandledShort. |
|
actContactsAband |
The CT’s actual number of contacts abandoned. |
The value is the sum of actAbandonLong + actAbandonShort. |
actContactsAbandSL |
The CT’s actual number of contacts abandoned before the time threshold defined on the ACD or multimedia server. This value is known as actAbandonShort. |
The value in this field is one of these:
Note: If the derived value is not appropriate, you may contact NICE WFM Support to determine if your ACD or multimedia server is capable of providing the value directly from the ACD or multimedia server database. Professional service fees may apply to modify the ACD or multimedia server integration and interface. |
actOutContacts |
The CT’s actual number of outbound contacts. |
|
actIntContacts |
The CT’s actual number of internal contacts. |
This field is blank. |
actBacklogNotExp |
The number of contacts remaining to handle that have not yet exceeded the service time defined for the period in which they were received. |
This field is blank for simulation based and BerlangC. |
actBacklogExp |
The number of contacts remaining to handle that have already exceeded the service time defined for the period in which they were received. |
This field is blank for simulation based and BerlangC. |
estStaff |
The CT’s estimated staff. |
Formatted to 2 decimal places. |
actLogin |
The actual number of seconds agents spent logged in for the CT. |
|
actTalkTime |
The actual number of seconds agents spent handling incoming contacts for the CT. |
|
actWorkTime |
The actual number of seconds agents spent in after contact work for the CT. |
|
actOutTime |
The actual number of seconds agents spent on outgoing contacts for the CT. |
|
actReadyTime |
The actual number of seconds agents spent in a ready state for the CT. |
|
actNotReadyTime |
The actual number of seconds agents spent in an idle, AUX or not ready state for the CT. |
|
actIntTime |
The actual number of seconds agents spent on internal contacts for the CT for the period. |
This field is blank. |
actHandledLong |
The actual number of contacts handled after the time threshold defined on the ACD or multimedia server. |
The value in this field is one of these:
Note: If the derived value is not appropriate, you may contact NICE WFM Support to determine if your ACD or multimedia server is capable of providing the value directly from the ACD or multimedia server database. Professional service fees may apply to modify the ACD or multimedia server integration and interface. |
actAbandonLong |
The actual number of contacts abandoned after the time threshold defined on the ACD or multimedia server. |
The value in this field is one of these:
Note: If the derived value is not appropriate, you may contact NICE WFM Support to determine if your ACD or multimedia server is capable of providing the value directly from the ACD or multimedia server database. Professional service fees may apply to modify the ACD or multimedia server integration and interface. |
actQueueDelay |
The actual number of seconds contacts remained in queue. |
|
actHoldTime |
The actual number of seconds agents placed contacts in a hold state while handling the contact. |
|
actATT |
The actual average talk time, in seconds, for the queue. |
Formatted to 2 decimal places. |
actAWT |
The actual average work time, in seconds, for the queue. |
Formatted to 2 decimal places. |
actAOT |
The actual average outbound time, in seconds, for the queue. |
Formatted to 2 decimal places. |
Supported output formats:
- Pipe delimited
- JSON
JSON Results with non empty fields

[
{
"date": "05022023",
"period": "12:00AM",
"TZ": "Europe/Kiev",
"custID": "1",
"egID": "500",
"egName": "EG_500",
"buID": "500",
"buName": "BU_500",
"ctID": "500",
"ctName": "BU_500",
"acdID": "1",
"modify": "2022-10-07T09:50:01Z",
"actContactsReceived": "50",
"actContactsHandled": "44",
"actAHT": "300.00",
"slPctObj": "80.00",
"actSLPct": "80.00",
"slTime": "20",
"actASA": "6.82",
"actOcc": "100.00",
"actReq": "20.69",
"actContactsHandledSL": "40",
"actContactsAband": "6",
"actContactsAbandSL": "1",
"actOutContacts": "0",
"actBacklogNotExp": "0",
"actBacklogExp": "0",
"estStaff": "14.67",
"actLogin": "0",
"actTalkTime": "13200",
"actWorkTime": "0",
"actOutTime": "0",
"actReadyTime": "0",
"actIdleTime": "0",
"actHandledLong": "4",
"actAbandonLong": "5",
"actQueueDelay": "300",
"actHoldTime": "0",
"actATT": "300.00",
"actAWT": "0.00",
"actAOT": "0.00"
}
]
JSON Results with empty fields

[
{
"date": "05022023",
"period": "12:00AM",
"TZ": "Europe/Kiev",
"custID": "1",
"egID": "500",
"egName": "EG_500",
"buID": "500",
"buName": "BU_500",
"ctID": "500",
"ctName": "BU_500",
"acdID": "1",
"modify": "2022-10-07T09:50:01Z",
"actContactsReceived": "50",
"actContactsHandled": "44",
"actAHT": "300.00",
"slPctObj": "80.00",
"actSLPct": "80.00",
"slTime": "20",
"asaObj": "",
"actASA": "6.82",
"maxOcc": "",
"actOcc": "100.00",
"actReq": "20.69",
"actContactsHandledSL": "40",
"actContactsAband": "6",
"actContactsAbandSL": "1",
"actOutContacts": "0",
"actBacklogNotExp": "0",
"actBacklogExp": "0",
"estStaff": "14.67",
"actLogin": "0",
"actTalkTime": "13200",
"actWorkTime": "0",
"actOutTime": "0",
"actReadyTime": "0",
"actIdleTime": "0",
"actHandledLong": "4",
"actAbandonLong": "5",
"actQueueDelay": "300",
"actHoldTime": "0",
"actATT": "300.00",
"actAWT": "0.00",
"actAOT": "0.00"
}
]
PIPE results with enabled headers

#fields:date|period|TZ|custID|saGroupID|saGroupName|ssGroupID|ssGroupName|buID|buName|ctID|ctName|acdID|modify|actContactsReceived|actContactsHandled|actAHT|slPctObj|actSLPct|slTime|asaObj|actASA|maxOcc|actOcc|actReq|actContactsHandledSL|actContactsAband|actContactsAbandSL|actOutContacts|actIntContacts|actBacklogNotExp|actBacklogExp|estStaff|actLogin|actTalkTime|actWorkTime|actOutTime|actReadyTime|actIdleTime|actIntTime|actHandledLong|actAbandonLong|actQueueDelay|actHoldTime|actATT|actAWT|actAOT
#sort:date,period,TZ,custID,saGroupID,saGroupName,ssGroupID,ssGroupName,buID,buName,ctID,ctName,acdID,modify,actContactsReceived,actContactsHandled,actAHT,slPctObj,actSLPct,slTime,asaObj,actASA,maxOcc,actOcc,actReq,actContactsHandledSL,actContactsAband,actContactsAbandSL,actOutContacts,actIntContacts,actBacklogNotExp,actBacklogExp,estStaff,actLogin,actTalkTime,actWorkTime,actOutTime,actReadyTime,actIdleTime,actIntTime,actHandledLong,actAbandonLong,actQueueDelay,actHoldTime,actATT,actAWT,actAOT
05022023|12:00AM|Europe/Kiev|1|500|EG_500|||500|BU_500|500|BU_500|1|1665136201|50|44|300.00|80.00|80.00|20||6.82||100.00|20.69|40|6|1|0|0|0|0|14.67|0|13200|0|0|0|0|0|4|5|300|0|300.00|0.00|0.00
05022023|12:15AM|Europe/Kiev|1|500|EG_500|||500|BU_500|500|BU_500|1|1665136201|50|44|300.00|80.00|80.00|20||6.82||100.00|20.69|40|6|1|0|0|0|0|14.67|0|13200|0|0|0|0|0|4|5|300|0|300.00|0.00|0.00
PIPE Results with disabled headers

05022023|12:00AM|Europe/Kiev|1|500|EG_500|||500|BU_500|500|BU_500|1|1665136201|50|44|300.00|80.00|80.00|20||6.82||100.00|20.69|40|6|1|0|0|0|0|14.67|0|13200|0|0|0|0|0|4|5|300|0|300.00|0.00|0.00
05022023|12:15AM|Europe/Kiev|1|500|EG_500|||500|BU_500|500|BU_500|1|1665136201|50|44|300.00|80.00|80.00|20||6.82||100.00|20.69|40|6|1|0|0|0|0|14.67|0|13200|0|0|0|0|0|4|5|300|0|300.00|0.00|0.00
DTD example

<?xml version="1.0"?>
<!ELEMENT ctResults ((allFields | fieldList), sortOrder?)>
<!ELEMENT fieldList (fields)>
<!ELEMENT sortOrder (fields)>
<!ELEMENT fields (date | period | TZ | custID | saGroupID | saGroupName | ssGroupID | ssGroupName | buID
| buName | ctID | ctName | acdID | modify | actContactsReceived | actContactsHandled | actAHT | slPctObj
| actSLPct | slTime | asaObj | actASA | maxOcc | actOcc | actReq | actContactsHandledSL |
actContactsAband | actContactsAbandSL | actOutContacts | actIntContacts | actBacklogNotExp |
actBacklogExp | estStaff | actLogin | actTalkTime | actWorkTime | actOutTime | actReadyTime |
actIdleTime | actIntTime | actHandledLong | actAbandonLong | actQueueDelay | actHoldTime | actATT |
actAWT | actAOT )+>
<!ELEMENT allFields EMPTY>
<!ELEMENT date EMPTY>
<!ELEMENT period EMPTY>
<!ELEMENT TZ EMPTY>
<!ELEMENT custID EMPTY>
<!ELEMENT saGroupID EMPTY>
<!ELEMENT saGroupName EMPTY>
<!ELEMENT ssGroupID EMPTY>
<!ELEMENT ssGroupName EMPTY>
<!ELEMENT buID EMPTY>
<!ELEMENT buName EMPTY>
<!ELEMENT ctID EMPTY>
<!ELEMENT ctName EMPTY>
<!ELEMENT acdID EMPTY>
<!ELEMENT modify EMPTY>
<!ELEMENT actContactsReceived EMPTY>
<!ELEMENT actContactsHandled EMPTY>
<!ELEMENT actAHT EMPTY>
<!ELEMENT slPctObj EMPTY>
<!ELEMENT actSLPct EMPTY>
<!ELEMENT slTime EMPTY>
<!ELEMENT asaObj EMPTY>
<!ELEMENT actASA EMPTY>
<!ELEMENT maxOcc EMPTY>
<!ELEMENT actOcc EMPTY>
<!ELEMENT actReq EMPTY>
<!ELEMENT actContactsHandledSL EMPTY>
<!ELEMENT actContactsAband EMPTY>
<!ELEMENT actContactsAbandSL EMPTY>
<!ELEMENT actOutContacts EMPTY>
<!ELEMENT actIntContacts EMPTY>
<!ELEMENT actBacklogNotExp EMPTY>
<!ELEMENT actBacklogExp EMPTY>
<!ELEMENT estStaff EMPTY>
<!ELEMENT actLogin EMPTY>
<!ELEMENT actTalkTime EMPTY>
<!ELEMENT actWorkTime EMPTY>
<!ELEMENT actOutTime EMPTY>
<!ELEMENT actReadyTime EMPTY>
<!ELEMENT actIdleTime EMPTY>
<!ELEMENT actIntTime EMPTY>
<!ELEMENT actHandledLong EMPTY>
<!ELEMENT actAbandonLong EMPTY>
<!ELEMENT actQueueDelay EMPTY>
<!ELEMENT actHoldTime EMPTY>
<!ELEMENT actATT EMPTY>
<!ELEMENT actAWT EMPTY>
<!ELEMENT actAOT EMPTY>