Agent Info
API Specification
Description | Creates a task for WorkManager to execute exportEngine for Agent-Info exporter. |
Authentication
Required |
Yes |
URL | https://<domain or IP>/SMARTSync/services/rs/exporters/v1/agent-info |
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: true. Notes: is not case sensitive. |
dateFormat - String, possible values: mmddyy, ddmmyy, mmddyyyy, ddmmyyyy, yyyymmdd, yyyyddmm, yyddmm, yymmdd. If the dateFormat is not provided and outputFormat is set to JSON, all date fields will be converted to ISO date format. Required: Only for PIPE outputFormat. 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. |
muIds - Array of integers. Should be one or more IDs user has permission to use. Required: true. 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 only be set if outputFormat is PIPE. By default it is false. If set to true, headers will be excluded from PIPE output. |
excludePipeHeader - Boolean field. Required: false. Notes: This field can only be set if outputFormat is PIPE. By default it is false. If 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":"custID"}, {"name":"muID"}, {"name":"muName"}, {"name":"date"}, {"name":"TZ"}, {"name":"supervisorID"}, {"name":"supervisorName"}, {"name":"tvID"}, {"name":"ssn"}, {"name":"agentName"}, {"name":"modify"}, {"name":"externalID"}, {"name":"password"}," + Simple fields when outputFormat is JSON: {"name":"custID"}, {"name":"muID"}, {"name":"muName"}, {"name":"date"}, {"name":"TZ"}, {"name":"supervisorID"}, {"name":"supervisorName"}, {"name":"tvID"}, {"name":"personalID"}, {"name":"agentName"}, {"name":"modify"}, {"name":"externalID"}, {"name":"password"}," + Note:
Field with attribute and value: {"name": "acdID","attribute":"priority","value":"1"}, {"name": "acdID","attribute":"priority","value":"2"}, {"name": "logonID","attribute":"priority","value":"2"}, |
fields (cont.) Note: acdID and logonID fields can be duplicated for different values. acdID and logonID represent fields with a priority attribute (with possible values: 1 - 10). Field with multi value: {"name":"agentData","value":"value1"}, {"name":"agentData","value":"value2"} Note: agentData value should exist in DB. |
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 outputFormat value: 'wrongFormat'",
"Invalid dateFormat value: 'wrongDateFormat'",
"Invalid timeFormat value: 'wrongTimeFormat'",
"startDate must match the provided yyyy-MM-dd format",
"endDate must match the provided yyyy-MM-dd format",
"Insufficient permissions to view entities 'MU 8888'",
"Invalid entity: 'MU 1234567'",
"Invalid agentData value within fields element: wrongAgent",
"Duplicate fields with same attribute value within fields: logonID,acdID"
]
}
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/agent-info request body(request for all fields):
{
"outputFormat": "PIPE",
"startDate": "2022-12-19",
"endDate": "2022-12-20",
"dateFormat": "ddmmyyyy",
"timeFormat": "24",
"excludePipeHeader": false
"muIds": [
500
]
}
request body(request for specific fields): {
"outputFormat": "PIPE",
"startDate": "2022-12-19",
"endDate": "2022-12-20",
"dateFormat": "ddmmyyyy",
"timeFormat": "24",
"excludePipeHeader": false
"muIds": [
500
],
"fields":[{"name": "acdID","attribute":"priority","value":"2"}, {"name": "acdID","attribute":"priority","value":"1"}, {"name": "logonID","attribute":"priority","value":"2"},
{"name": "logonID","attribute":"priority","value":"1"}],
"sortOrder":[{"name": "acdID","attribute":"priority","value":"2"}, {"name": "logonID","attribute":"priority","value":"2"}]
}
|
Sample Call for JSON outputFormat |
https://localhost/SMARTSync/services/rs/exporters/v1/agent-info request body(request for all fields):
{
"outputFormat": "JSON",
"startDate": "2022-12-19",
"endDate": "2022-12-20",
"dateFormat": "ddmmyyyy",
"timeFormat": "24",
"keepEmptyJsonFields": false,
"muIds": [
500
]
}
request body(request for specific fields):
{
"outputFormat": "JSON",
"startDate": "2022-12-19",
"endDate": "2022-12-20",
"dateFormat": "ddmmyyyy",
"timeFormat": "24",
"keepEmptyJsonFields": false,
"muIds": [
500
],
"fields":[{"name": "acdID","attribute":"priority","value":"2"}, {"name": "acdID","attribute":"priority","value":"1"}, {"name": "logonID","attribute":"priority","value":"2"},
{"name": "logonID","attribute":"priority","value":"1"}],
"sortOrder":[{"name": "acdID","attribute":"priority","value":"2"}, {"name": "logonID","attribute":"priority","value":"2"}]
}
|
Output Field Descriptions
-
This export runs for each MU specified in the muIds list.
-
If the export is run for multiple MUs, the data is saved in the same output file.
-
For each date in the range specified, the Activity data is read for each agent that belongs to the MU being processed for the date being processed.
-
Data is exported for each date in the range specified.
-
Agent data group values assigned to the agent for the date being processed are exported. Agent data group values are stored by date range and are not dependent on the agent’s MU assignment.
The Agent Info output can include these fields:
Field |
Description |
Values |
---|---|---|
custID |
The customer ID. |
|
muID |
The ID of the agent’s MU assignment. |
|
muName |
The name of the agent’s MU assignment. |
|
date |
This date is based on the MU’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. Data is exported for each date in the specified range. |
|
TZ |
The time zone of the MU. |
|
supervisorID |
The ID of the agent’s supervisor. |
This field is blank. |
supervisorName |
The name of the agent’s supervisor. |
This field is blank. |
tvID |
The agent’s WFM ID. Data is exported for all agents that belong to the MU for the date being processed. |
|
acdID |
The ID of the agent’s assigned ACD or multimedia server. Multiple records may exist for a date if the agent is assigned to more than one ACD or multimedia server. |
If the agent is not assigned to an ACD with the specified priority for the date being processed, this field is blank. If no priority is specified, the agent’s priority 1 ACD is shown in this field. If a priority is specified, it must be an integer between 1 and 10, otherwise this field is not exported and a warning message is printed in the process report. The specified priority is printed in the first lines of the output file. |
logonID |
The agent’s logon ID for the ACD or multimedia server with the specified priority for the date being processed. The priority is specified using the priority attribute of logonID. |
If the agent is not assigned to an ACD with the specified priority for the date being processed, this field is blank. If no priority is specified, the logon ID for the agent’s priority 1 ACD is shown in this field. If a priority is specified, it must be an integer between 1 and 10, otherwise this field is not exported and a warning message is printed in the process report. It is possible for the agent to have no logon ID assigned for the specified ACD. In this case, the field is blank. The specified priority is printed in the first lines of the output file. |
ssn |
The agent’s personal ID number. For JSON output, personalId is used instead |
This field is blank if the agent does not have a personal ID number assigned. |
agentName |
The agent’s name, formatted as <last>, <first><suffix>. |
|
modify |
The server’s current date and time, formatted as a UNIX timestamp. This represents the last time the Agent Info was modified. |
|
agentData |
This multi-value field exports the value(s) assigned to the agent for each agent data group specified in the "value" attribute of the agentData field. You can include as many agentData elements as you want; one agent data group is printed in the output file for each agentData value defined. You can specify the same agent data group more than once. If you do not include an agentData element, this field is omitted. |
This field may be blank if the agent is not assigned a value for the specified agent data group for the date being processed. |
externalID |
The ID the agent uses to log in to Agent WebStation, if the WebStation is configured to use external IDs. |
If the agent’s externalID field is blank, this field is blank. |
password |
The agent’s password for WebStation. |
The password is blank. |
startDate |
The agent’s start date. The start date of the earliest AgentMap record that exists for the agent. |
|
senDate |
The agent’s seniority date. |
|
senExt |
The agent’s seniority extension. |
|
rank |
The agent’s rank. |
|
vacGroupID |
The ID of the time off group to which the agent is assigned on the date being processed. |
|
vacGroupName |
The name of the time off group.
|
|
biddingDate |
The agent’s alternate seniority date. |
|
biddingExt |
The agent’s alternate seniority extension. |
|
accrualDate |
The agent’s time off accrual date. |
|
|
The agent’s email address corresponding to their lowest numbered email address. |
|
Supported output formats:
- PIPE
- JSON
PIPE output with results and headers

#fields:custID|muID|muName|date|TZ|supervisorID|acdID1|acdID |supervisorName|tvID|acdID|logonID|ssn|agentName|modify|externalID|password|startDate|senDate|senExt|rank|vacGroupID|vacGroupName|biddingDate|biddingExt|accrualDate|email
#sort:custID,muID,muName,date,TZ,supervisorID,supervisorName,tvID,acdID,logonID,ssn,agentName,modify,externalID,password,startDate,senDate,senExt,rank,vacGroupID,vacGroupName,biddingDate,biddingExt,accrualDate,email
1|500|MU_500|01012023|US/Central|||501|1|501||Parker, Robert|1663689013|||01062019|20082019|2|2|||02092019|2|30082019|robert.parker@abc.com
1|500|MU_500|01012023|US/Central|||513|1|513||Ryker, Mason|1666798799|||01062019|10102022|5||500|YB_group_HH:MM|14122018|6||
PIPE output with results and no headers

1|500|MU_500|01012023|US/Central|||501|1|501||Parker, Robert|1663689013|||01062019|20082019|2|2|||02092019|2|30082019|robert.parker@abc.com
1|500|MU_500|01012023|US/Central|||513|1|513||Ryker, Mason|1666798799|||01062019|10102022|5||500|YB_group_HH:MM|14122018|6||
PIPE with empty results

#fields:custID|muID|muName|date|TZ|supervisorID|acdID1|acdID |supervisorName|tvID|acdID|logonID|ssn|agentName|modify|externalID|password|startDate|senDate|senExt|rank|vacGroupID|vacGroupName|biddingDate|biddingExt|accrualDate|email
#sort:custID,muID,muName,date,TZ,supervisorID,supervisorName,tvID,acdID,logonID,ssn,agentName,modify,externalID,password,startDate,senDate,senExt,rank,vacGroupID,vacGroupName,biddingDate,biddingExt,accrualDate,email
JSON output with results

[
{
"custID": "1",
"muID": "500",
"muName": "MU_500",
"date": "2023-07-12",
"TZ": "US/Central",
"tvID": "501",
"acdID": "1",
"logonID": "501",
"agentName": "Parker, Robert",
"modify": "1663689013",
"startDate": "2019-06-01",
"senDate": "2019-08-20",
"senExt": "2",
"rank": "2",
"biddingDate": "2019-09-02",
"biddingExt": "2",
"accrualDate": "2019-08-30",
"email": "robert.parker@abc.com"
},
{
"custID": "1",
"muID": "500",
"muName": "MU_500",
"date": "2023-07-12",
"TZ": "US/Central",
"tvID": "502",
"acdID": "1",
"logonID": "502",
"agentName": "502, 502",
"modify": "1613645538",
"startDate": "2019-06-01",
"senDate": "2019-12-01",
"senExt": "1",
"rank": "1",
"timeOffGroupId": "510",
"timeOffGroupName": "AWL_Group",
"biddingDate": "2019-12-10",
"biddingExt": "1",
"accrualDate": "2019-12-02"
},
{
"custID": "1",
"muID": "500",
"muName": "MU_500",
"date": "2023-07-12",
"TZ": "US/Central",
"tvID": "503",
"acdID": "1",
"logonID": "503",
"agentName": "503, 503",
"modify": "1613645539",
"startDate": "2019-06-01",
"senDate": "2020-12-01",
"senExt": "2",
"rank": "2",
"timeOffGroupId": "510",
"timeOffGroupName": "AWL_Group",
"biddingDate": "2019-12-10",
"biddingExt": "2",
"accrualDate": "2019-12-02"
}
]
JSON output with empty results
Agent info DTD

<?xml version="1.0"?>
<!ELEMENT agentInfo ((allFields | fieldList), sortOrder?)>
<!ELEMENT fieldList (fields)>
<!ELEMENT sortOrder (fields)>
<!ELEMENT fields (custID | muID | muName | date | TZ | supervisorID |
supervisorName | tvID | acdID | logonID | ssn | agentName | modify | agentData |
externalID | password | startDate | senDate | senExt | rank | vacGroupID |
vacGroupName | biddingDate | biddingExt | accrualDate| email)+>
<!ELEMENT allFields EMPTY>
<!ELEMENT custID EMPTY>
<!ELEMENT muID EMPTY>
<!ELEMENT muName EMPTY>
<!ELEMENT date EMPTY>
<!ELEMENT TZ EMPTY>
<!ELEMENT supervisorID EMPTY>
<!ELEMENT supervisorName EMPTY>
<!ELEMENT tvID EMPTY>
<!ELEMENT acdID EMPTY>
<!ELEMENT logonID EMPTY>
<!ELEMENT ssn EMPTY>
<!ELEMENT agentName EMPTY><!ELEMENT modify EMPTY>
<!ELEMENT agentData (#PCDATA)>
<!ELEMENT externalID EMPTY>
<!ELEMENT password EMPTY>
<!ELEMENT startDate EMPTY>
<!ELEMENT senDate EMPTY>
<!ELEMENT senExt EMPTY>
<!ELEMENT rank EMPTY>
<!ELEMENT vacGroupID EMPTY>
<!ELEMENT vacGroupName EMPTY>
<!ELEMENT biddingDate EMPTY>
<!ELEMENT biddingExt EMPTY>
<!ELEMENT accrualDate EMPTY>
<!ELEMENT email EMPTY>
<!ATTLIST acdID priority CDATA “1”>
<!ATTLIST logonID priority CDATA “1”>