Skip to main content
Skip table of contents

agentPresence _

Event NameagentPresence
Event DescriptionEvent triggered to update agent state information.
Emitter Agent Manager
Action

Possible values are:

  • AGENT_STATE_UNCHANGED - when the event is received without any change in state.
  • AGENT_STATE_CHANGED - when the event is received with change in state.


NameDescriptionPayload Properties
agentPresenceThe AgentPresence object
agent 

type: Object

Desc: Defines the properties of the CC agent

  1. participantType - String - describes the type of user - agent or user
  2. id - String - system generated id of user
  3. keycloakUser - Object - contains properties of the agent as authenticated by keyCloack

  4. associatedRoutingAttributes - Array - for routing conversation to the agent

state

type: Object

Desc: State of the agent (READY, NOT_READY) and the reason

  1. name - String - name of the state
  2. reasonCode - String - reason for change in state

stateChangeTime

type: Date Object

Desc:  time since change of state

-
agentMrdStates

type: Object

Desc: retains properties of state changes of the agent

  1. mrd - Array - contains details of the change of state of the agent such as id, name, description, interruptible, maxRequests
action

type: Object

Desc: describes if event is fired without state change or not

-
CODE
{
        "agent": {
            "participantType": "CCUser",
            "id": "1fd5b05a-7c12-4955-bd59-8567f3e74445",
            "keycloakUser": {
                "id": "1fd5b05a-7c12-4955-bd59-8567f3e74445",
                "firstName": "admin",
                "lastName": null,
                "roles": [
                    "offline_access",
                    "default-roles-university",
                    "admin",
                    "uma_authorization"
                ],
                "username": "admin",
                "permittedResources": {
                    "Resources": [
                        {
                            "rsid": "972e9078-ebb8-4fe2-9fc4-942a6914abf7",
                            "rsname": "routing-engine",
                            "scopes": [
                                "view",
                                "manage"
                            ]
                        },
                        {
                            "rsid": "38e46d28-31bb-4e5f-8f56-13f10f5879d8",
                            "rsname": "business-calendar",
                            "scopes": [
                                "view",
                                "manage"
                            ]
                        },
                        {
                            "rsid": "1365a664-afd1-4c1d-a21c-e9a4ccf0e332",
                            "rsname": "general-settings",
                            "scopes": [
                                "view",
                                "manage"
                            ]
                        },
                        {
                            "rsid": "24c037dc-4792-4cf4-8f71-66a0d0ddd618",
                            "rsname": "pull-mode-list",
                            "scopes": [
                                "view",
                                "manage"
                            ]
                        },
                        {
                            "rsid": "8f226171-1a57-4f79-b553-82c7344e66da",
                            "rsname": "forms",
                            "scopes": [
                                "view",
                                "manage"
                            ]
                        },
                        {
                            "rsid": "35fa435d-b456-4faa-aab4-99064ae57987",
                            "rsname": "reason-code",
                            "scopes": [
                                "view",
                                "manage"
                            ]
                        },
                        {
                            "rsid": "fe0f4e8c-47bb-487b-b8b9-c2726926217d",
                            "rsname": "bot-settings",
                            "scopes": [
                                "view",
                                "manage"
                            ]
                        },
                        {
                            "rsid": "0c0e9f33-cc46-4cde-b88c-68d93a643b20",
                            "rsname": "web-widget",
                            "scopes": [
                                "view",
                                "manage"
                            ]
                        },
                        {
                            "rsid": "a61043f6-9980-4e31-a57b-e2c866f101ee",
                            "rsname": "channel-manager",
                            "scopes": [
                                "view",
                                "manage"
                            ]
                        }
                    ]
                },
                "realm": "university"
            },
            "associatedRoutingAttributes": []
        },
        "state": {
            "name": "NOT_READY",
            "reasonCode": null
        },
        "stateChangeTime": 1651434965139,
        "agentMrdStates": [
            {
                "mrd": {
                    "id": "6232cc5d44a4093550fea233",
                    "name": "VOICE",
                    "description": null,
                    "interruptible": true,
                    "maxRequests": 5
                },
                "state": "NOT_READY",
                "stateChangeTime": 1651434965138,
                "lastReadyStateChangeTime": 639057660000
            },
            {
                "mrd": {
                    "id": "62302def6b1fba2525db2713",
                    "name": "whatsapp-chat",
                    "description": "This MRD is to be used for twilio-connector testing by WAQAS\t",
                    "interruptible": true,
                    "maxRequests": 10
                },
                "state": "NOT_READY",
                "stateChangeTime": 1651434965138,
                "lastReadyStateChangeTime": 639057660000
            },
            {
                "mrd": {
                    "id": "6223b491ef484b28639e9ca4",
                    "name": "chat",
                    "description": null,
                    "interruptible": true,
                    "maxRequests": 5
                },
                "state": "NOT_READY",
                "stateChangeTime": 1651434965138,
                "lastReadyStateChangeTime": 639057660000
            },
            {
                "mrd": {
                    "id": "6233dde8c004592808ad3c0d",
                    "name": "Ahmad's Mrd",
                    "description": "This MRD is to be used for dev testing by Ahmad",
                    "interruptible": true,
                    "maxRequests": 5
                },
                "state": "NOT_READY",
                "stateChangeTime": 1651434965138,
                "lastReadyStateChangeTime": 639057660000
            }
        ]
    }
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.