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"}," +
{"name":"startDate"}, {"name":"senDate"}, {"name":"senExt"}, {"name":"rank"}, {"name":"vacGroupID"}, {"name":"vacGroupName"}, {"name":"biddingDate"}, {"name":"biddingExt"}, {"name":"accrualDate"},
{"name":"email"}

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"}," +
{"name":"startDate"}, {"name":"senDate"}, {"name":"senExt"}, {"name":"rank"}, {"name":"timeOffGroupID"}, {"name":"timeOffGroupName"}, {"name":"biddingDate"}, {"name":"biddingExt"}, {"name":"accrualDate"},
{"name":"email"}

Note: 

  • In the fields array parameter, the output fields ssn, vacGroupID, and vacGroupName may be used for PIPE output. But these must be replaced with personalID, timeOffGroupID, and timeOffGroupName respectively if JSON output is used.
  • Only one field with the same name can be present in the fields array.

Field with attribute and value: 

{"name": "acdID","attribute":"priority","value":"1"}, {"name": "acdID","attribute":"priority","value":"2"}, {"name": "logonID","attribute":"priority","value":"2"},
{"name": "logonID","attribute":"priority","value":"3"}

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.

 

email

The agent’s email address corresponding to their lowest numbered email address.

 

 


Supported output formats:

  • PIPE
  • JSON

PIPE output with results and headers

PIPE output with results and no headers

PIPE with empty results

JSON output with results

JSON output with empty results

Agent info DTD