Prevent Multiple Conversations

A new feature in Pingstreams widget settings will prevent your customers from starting a new conversation if they already have one open. This change makes conversations more of a continuous thread, preventing customers from reaching out to your team multiple times, which saves your team time and effort. This feature is named as Single Conversation
Overview
Section titled “Overview”Pingstreams Widget can handle only one conversation at a time by properly setting the singleConversation property. In fact, just set singleConversation to true (see how to do this here) to be able to show the widget user only one conversation at a time. This option disables the possibility of viewing the home with the list of open conversations and those already archived as image below highlight.

Once the user has been authenticated, the widget proceeds with the normal initialization flow of a new conversation only if the user has no active conversation previously, otherwise, the widget will load the most recent active conversation
How to set singleConversation mode
Section titled “How to set singleConversation mode”As with the other widget setting parameters, singleConversation mode can be enabled in various ways: as a url parameter or as a property of pingstreamsSettings.
Set property from pingstreamsSettings
Section titled “Set property from pingstreamsSettings”You can pass the parameters to window.pingstreamsSettings object as shown in the example below
<script type="application/javascript">
window.pingstreamsSettings =
{
projectid: "<YOUR_PROJECT_ID>",
singleConversation: true
};
(function(d, s, id) {
var w=window; var d=document; var i=function(){i.c(arguments);};
i.q=[]; i.c=function(args){i.q.push(args);}; w.Pingstreams=i;
var js, fjs=d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js=d.createElement(s);
js.id=id; js.async=true; js.src="https://widget.pingstreams.com/v6/launch.js";
fjs.parentNode.insertBefore(js, fjs);
}(document,'script','pingstreams-jssdk'));
</script>The above script can start widget with the single conversation mode, immediately
Set property from URL
Section titled “Set property from URL”You can pass the a Pingstreams widget property as a Url parameter with the pingstreams_ prefix. For example, in this case:
https://widget.pingstreams.com/6/assets/twp/index.html?pingstreams_projectid=<YOUR_PROJECT_ID>&pingstreams_singleConversation=trueMake a Sign Out
Section titled “Make a Sign Out”In this mode, the user can still logout from the system by using the menu at the top right corner in the conversation header, as shown in the figure below.

Once you have make a sign out, widget restarts itself and create a new user. New initialization flow of a new conversation starts and new user can starts to chat again!!