Question

Identify Pega chat ended by customer or agent

Hi,

Is there any attribute which will help identify if the chat was terminated by a customer or agent?

***Edited by Moderator: Lochan to update platform capability tags***

Comments

Keep up to date on this post and subscribe to comments

Pega
July 12, 2019 - 10:05am

As far as I know, if a customer closes a chat window, then a timer gets started and runs for 50 sec before deleting the chat. 
May be you can capture the triggering of such timer to check whether the chat window got closed by customer or agent.

July 31, 2019 - 1:41pm

Hi,

So I have to add some additional information. There are attributes in the chat logs pyMessageSource(Customer, representative) and pyOriginator( Customer Name, Representative name) for all the chats.

Property

Value

DecimalVal1
0.00
DisplayRole
Representative
pxObjClass
ChannelServices-Embed-LogEntry-Chat
pyDisplayName
XYZ
pyMessageBody
Hello
pyMessageID
3e5d6596b3b011e997abfb6e067e7af41564590525346
pyMessageSource
Representative
pyOriginator
XYZ
SuggestedItemDisposition
ignored
Timestamp
12:28PM
TimestampInt
1564590525346
 

Property

Value

DecimalVal1
0.00
DisplayRole
Customer
pxObjClass
ChannelServices-Embed-LogEntry-Chat
pyDisplayName
Mr. ABCD
pyMessageBody
fghjf
pyMessageID
3e5d6596b3b011e997abfb6e067e7af41564590527446
pyMessageSource
Customer
pyOriginator
Mr. ABCD
Timestamp
12:28PM
TimestampInt
1564590527446

However, when the chat is ended, this is what we see irrespective who ends the chat. It is always SYSTEM

 

Property

Value

pxObjClass
ChannelServices-Embed-LogEntry-Chat
pyMessageBody
The chat has ended.
pyMessageID
3e5d6596b3b011e997abfb6e067e7af41564591171616
pyMessageSource
SYSTEM
pyOriginator
SYSTEM
Timestamp
12:39PM
TimestampInt
1564591171687

Property

Value

pxObjClass
ChannelServices-Embed-LogEntry-Chat
pyMessageBody
undefined has disconnected.
pyMessageSource
SYSTEM
pyOriginator
SYSTEM
Timestamp
12:39PM
TimestampInt
1564591171688

 

 

 If you see Data transform SetLogEntryPage, pyMessageSource is set. However, when pyOriginator = System, pyMessageSource is set to pyOriginator.

All the end chat events have originator as SYSTEM and so the pyMessageSource is getting set to SYSTEM. Tried editing the pega_chat_chatEvenHandler file but no luck yet