Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

Snapshot event schema

Updated on October 6, 2021

The snapshot event schema is used to synchronize Pega Call's state with the CTI platform for an extension. This also synchronizes the agent state and provides information regarding the CTI server status and the subscription status of the extension.

{
    "definitions": {},
    "$schema": "http://json-schema.org/draft-06/schema#",
    "type": "object",
    "$id": "http://pega.com/OpenCTI/Events/Snapshot.json",
    "properties": {
            "pyAgentId": {
"description": "The Agent's ID at the ACD.",
                "title": "The pyAgentId Schema.",
                "$id": "/properties/pyAgentId",
                "default": "",
                "examples": [
                    "5501"
                ],
                "type": "string"
        },
        "pyAgentState": {
            "description": "The Agent's state at the ACD.",
            "title": "The pyAgentState Schema.",
            "$id": "/properties/pyAgentState",
            "default": "",
            "examples": [
                "Ready"
            ],
            "enum": ["Ready", "NotReady", "Login",
                "Logout",
                "Busy", "Unknown"],
        },
        "pyDeviceState": {
            "description": "The device's monitoring state.",
            "title": "The pyDeviceState Schema.",
            "$id": "/properties/pyDeviceState",
            "default": "",
            "examples": [
                "OPENED"
            ],
            "enum": ["OPENED", "CLOSED"],
        },
        "pyEventName": {
            "description": "The name of the event.",
            "title": "The pyEventName Schema.",
            "$id": "/properties/pyEventName",
            "default": "",
            "examples": [
                "Snapshot"
            ],
            "type": "string"
        },
        "pyEventType": {
            "description": "The type of event.",
            "title": "The pyEventType Schema.",
            "$id": "/properties/pyEventType",
            "default": "",
            "examples": [
                "SnapshotEvent"
            ],
            "enum": ["SnapshotEvent", "AgentStateEvent",
            "CallStateEvent", "PartyInfoEvent", "CallInfoEvent"]
        },
        "pyLinkState": {
            "description": "The state of the connection
            to the CTI Server.",
            "title": "The pyLinkState Schema.",
            "$id": "/properties/pyLinkState",
            "default": "",
            "examples": [
                "CONNECTED"
            ],
            "enum" : ["CONNECTED", "DISCONNECTED"],
        },
        "pyMedia": {
 "description": "The media type.",
            "title": "The pyMedia Schema.",
            "$id": "/properties/pyMedia",
            "default": "",
            "examples": [
                "Phone"
            ],
            "type": "string"
        },
        "pyReasonCode": {
            "description": "The NotReady or Logout
            Reason Code.",
            "title": "The pyReasonCode Schema.",
            "$id": "/properties/pyReasonCode",
            "default": "",
            "examples": [
                "0"
            ],
            "type": "string"
        },
        "pyThisDN": {
            "description": "The directory number
            of the subscribed (open) device.",
            "title": "The pyThisDN Schema.",
            "$id": "/properties/pyThisDN",
            "default": "",
            "examples": [
                "8808"
            ],
            "type": "string"
        },
        "pyLines": {
            "$id": "/properties/pyLines",
            "items": {
            "$id": "/properties/pyLines/items",
            "type": "object",
            "properties": {
                "pyCallId": {
                "description": "The Call Identifier.",
                "title": "The pyCallId Schema.",
                "$id": "/properties/pyLines/items
                /properties/pyCallId",
                "default": "",
                "examples": [
                    "0"
                    ],
                    "type": "string"
                },
               "pyLineState": {
                "description": "The Line State from
                the perspective of the monitored DN.",
                "title": "The pyLineState Schema.",
                "$id": "/properties/pyLines/items
                /properties/pyLineState",
                "default": "",
                "examples": [
                    "NONE"
                    ],
                "enum": ["None", "Alerting",
                    "Connected", "Holding",
                    "Retrieved", "Initiate"],
                    },
                }
                }, 
                "type": "array"
            }
        }
    }          

The following table describes the properties that are used in this schema:

Properties in the snapshot event schema

PropertyDescription
pyAgentIdThe agent ID on the automatic call distributor (ACD) or queue.
pyAgentStateThe agent state, such as Ready, NotReady, and Logout.
pyDeviceStateThe device status, such as Opened and Closed.
pyEventNameThe name of the agent state event, such as Login and Unknown.
pyEventTypeThe type of the event, for example, if this is an agent event, then the type is AgentState event.
pyLinkStateThis is a placeholder for the CTI link state. You can populate it by using a Connected property.
pyMediaIndicates the type of medium that sends the event, such as Phone.
pyReasonCodeIndicates the reason for the status change.
pyThisDNThe device number or extension that is used to receive an event.
pyLinesHolds the information of pyCallId and pyLineState. pyLinestate holds the state of the monitoring device number or extension.

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us