Snapshot event schema
The snapshot event schema is used to synchronize Pega Call state with the CTI platform for an extension. This schema 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
Property | Description |
pyAgentId | The agent ID on the automatic call distributor (ACD) or queue. |
pyAgentState | The agent state, such as Ready, NotReady, and Logout. |
pyDeviceState | The device status, such as Opened and Closed. |
pyEventName | The name of the agent state event, such as Login and Unknown. |
pyEventType | The type of the event, for example, if this is an agent event, then the type is AgentState event. |
pyLinkState | This is a placeholder for the CTI link state. You can populate it by using a Connected property. |
pyMedia | Indicates the type of medium that sends the event, such as Phone. |
pyReasonCode | Indicates the reason for the status change. |
pyThisDN | The device number or extension that is used to receive an event. |
pyLines | Holds the information of pyCallId and pyLineState. pyLinestate holds the state of the monitoring device number or extension. |
Previous topic Agent event schema Next topic PartyInfo event schema