This method provides raw data about agent states changes.

If you have not done so yet, see the overview of this product.

Request

Method URL
GET https://{domain}/api/account/{accountID}/status-changes?source={source}

Request Query Parameters

Name Description Type Required? Default Notes
source This describes the originator of the call string Required    
from This filters the results to status changes occurred within the timeframe between from and to RFC 3339 date-time string Optional 24 hours prior to request time
  • If provided, `to` must also be provided
  • Minimum value: 13 months prior to request time
  • Maximum timeframe between `from` and `to`: 1 month
to This filters the results to status changes occurred within the timeframe between from and to RFC 3339 date-time string Optional request time
  • If provided, `from` must also be provided
  • Maximum timeframe between `from` and `to`: 1 month
agentId This filters the results to status changes of the agent with the specified LivePerson ID number Optional  
  • If provided, `empId` must not be provided
  • If neither `agentId` nor `empId` are provided, all agents will be returned
empId This filters the results to status changes of the employee with the specified employee ID string Optional  
  • If provided, `agentId` must not be provided
  • If neither `agentId` nor `empId` are provided, all agents will be returned
limit This limits the number of agents, for which status changes will be included in the results number Optional 50 Maximum value: 100
offset This allows to get more results in case you have more agents than limit number Optional 0  

Response

Property Name Description Type Notes
timeframe   object  
startTime The start of the requested time frame RFC 3339 date-time string  
endTime The end of the requested time frame RFC 3339 date-time string  
agentsInfo   array  
agentId Agent's LivePerson ID number  
employeeId Agent's employee ID string  
agentLoginName   string  
agentUserName   string  
agentGroupId The ID of the group the agent is assigned to number  
statusChangeHistory   array  
time Time of this status change RFC 3339 date-time string  
sessionId Identifier of the session during which this status change took place number  
sequenceNumber Sequential number of this status change within the session number  
statusType Type of status change number
  • 1 - status changed, see `statusSubType`
  • 3 - login
  • 4 - logout
statusSubType Subtype of status change with statusType=1 number
  • 1 - offline
  • 2 - online
  • 3 - occupied
  • 4 - away
statusReasonId Identifier of optional custom reason for the status change number -1 if no custom reason was provided by the agent
statusReasonText Optional custom reason for the status change string null if no custom reason was provided by the agent
prevStatusChangeTime Time of this agent’s previous status change RFC 3339 date-time string null if value is missing

Response Example

{
    "timeframe": {
        "startTime": "",
        "endTime": ""
    },
    "agentsInfo": [
        {
            "agentId": #,
            "employeeId": "",
            "agentLoginName": "",
            "agentUserName": "",
            "agentGroupId": #,
            "statusChangeHistory": [
                {
                  "time": "",
                  "sessionId": #,
                  "sequenceNumber": #,
                  "statusType": #,
                  "statusSubType": #,
                  "statusReasonId": #,
                  "statusReasonText": "",
                  "prevStatusChangeTime": "",
                },
                ...
            ]
        },
        ...
    ]
}

Error Codes

See Error Codes