[BETA] Feature Explained: Shared history
Part of the customer journey is leading your customers to your desired page and share the history between your floating and inline web chat. For e.g. you have your floating web conversations widget on the home page and the inline on the customer service page and you want to make sure that the chat continues on the customer service page (inline).
If you want to make sure that the history gets shared between configurations you'll need to use the following script instead of the default script (retrieved from the Web Conversations builder):
<script type="module" crossorigin="anonymous" src='https://webchat.digitalcx.com/webchat.js' onload="cmwc.add('Chat1',).addShared({ config: 'Chat1', style: 'Chat2' }).install();">
In the script provided above, one configuration always takes the lead, which in this case is 'Chat1'. The other chat 'Chat2' functions as a duplicate of 'Chat1', but with the styling of the second Web Conversation, 'Chat2'. Essentially, this means that both chats share the same history, with 'Chat1' driving the content and 'Chat2' inheriting it.
Example: 'Chat1' could be the inline version and 'Chat2' the floating version sharing the history.
If you want to load only one configuration on a specific page but still share the history with a configuration from a previous page, you can use the following script:
<script type="module" crossorigin="anonymous" src='https://webchat.digitalcx.com/webchat.js' onload="cmwc.addShared({ config: 'Chat1', style: 'Chat2' }).install();">
In this scenario, 'Chat1' (from the previous page) remains the leading configuration, while 'Chat2' is the configuration on the current page that retrieves and continues the shared chat history.
Updated 3 months ago