function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Sapana JSapana J 

Embedded Chat - How to get unread message count

In embedded chat, after chat window get minimized I want to show only number count of unread messages like only 2, not like "2 messages" (which is currently displayed). How can I customize chat button when minimized. Is there and event or javascript function I can use to get count of unread chat messages.
Best Answer chosen by Sapana J
ANUTEJANUTEJ (Salesforce Developers) 
So I found this custom implementation that has the above method usage, can you check it:

https://developer.salesforce.com/docs/atlas.en-us.snapins_web_dev.meta/snapins_web_dev/snapins_web_lightning_components_minimized_samples.htm

All Answers

ANUTEJANUTEJ (Salesforce Developers) 
Hi Sapana,

I see that in the documentation of embedded services I see that there is already a built in way to access chatUnreadMessage can you try checking the below documentation once:

>> https://developer.salesforce.com/docs/atlas.en-us.snapins_web_dev.meta/snapins_web_dev/snapins_web_minimized_events.htm

Let me know if it helps you and close your query by marking it as solved so that it can help others in the future.  

Thanks.
Sapana JSapana J
HI ANUTEJ,

Thank you for your reply.

I actually went through this document, but I didn't get how to call/use this event in javascript. Could you please help me in this.

Thanks & Regards,
Sapana
ANUTEJANUTEJ (Salesforce Developers) 
So I found this custom implementation that has the above method usage, can you check it:

https://developer.salesforce.com/docs/atlas.en-us.snapins_web_dev.meta/snapins_web_dev/snapins_web_lightning_components_minimized_samples.htm
This was selected as the best answer
Sapana JSapana J
Thank you ANUTEJ for your help.