Each event contains three parameters: id, type and data. They appear as follows:
{
"id": "<string>",
"type": lpTag.LPWidgetSDK.API.events.[key],
"data": "<object>"
}
Event types
type: lpTag.LPWidgetSDK.API.events.[key] | Type |
---|---|
"conversationInfo" | object |
"messages" | object |
"participants" | array |
"uiWindow" | object |
"uiWidget" | object |
Data examples
"conversationInfo"
{
"conversationId": ""<string>"",
"sessionId": "<string>",
"*dialogId": "<string>",
"startTime": "<string>",
"state": lpTag.LPWidgetSDK.API.states,
"*dialogType": "<string>",
"channelType": "<string>" // ("chat"/"messaging")
}
"engagementInfo"
{
"allowUnauthMsg": "<boolean>",
"async": "<boolean>",
"availabilityPolicy": 0,
"cid": 1231231312,
"connector": "<object>",
"eid": 1231231312,
"env": "<string>",
"ename": "<string>",
"eventName": "<string>",
"isPopOut": "<boolean>",
"lang": "<string>",
"lewid": 1231231312,
"params": "<string>",
"scid": "<string>",
"sessionKey": "<string>",
"site": "<string>",
"ssid": "<string>",
"ssuid": "<string>",
"svid": "<string>",
"target": "<string>"
}
"messages"
{
"id": "<string>",
"ts": 1231231312,
"type": "<string>"
"content": "<string>",
"originator": {
"type": "<string>" // ("visitor"/"agent"/"system"),
"name": "<string>"
}
}
"participants"
{
{
"id": "<string>",
"name": "<string>",
"type": "visitor"
},
{
"id": "<string>",
"name": "<string>",
"type": "agent",
"imgPath": "<string>",
"description": "<string>"
}
}
"uiWindow"
{
"isMaximized": "<boolean>"
}
"uiWidget"
{
"isShown": "<boolean>"
}