How to load previous chats?

Hi,
We have integrated our bot in web-widget in which we pass the information to bot with (https://app.yellowmessenger.com/pwa/live/?ym.payload={“patient_id”:“”,“phone_number”:“”}&fullScreen=true) url parameters. If a user closes the widget and re-opens it, bot clears all the previous chats.

Is there any way to reload the previous chats?

Hi @Asutosh
You need to pass ymAuthenticationToken in the payload.
Please refer this document: Widget Functions and Events | yellow.ai

Thanks for help. I have some doubts

Is there any specific process to generate the auth_token? and do I need to change anything in the bot platform to do so?

Do I need to map the token with our User at yellow platform end? if so, what will be the process.

Hey @Asutosh,

Before you use ymAuthenticationToken, try enabling chat history on the settings page. If it works fine, you don’t have to use ymAuthenticationToken. But if you want to share the same user session across different devices, you’ll need to use ymAuthenticationToken. This token should be unique for each user, and you’ll have to generate this yourself and pass it in the ymConfig or the URL (as a query parameter)

Dashboard → Channels → Chat Widget → Settings → “Show history of the conversation” → enable it.

2 Likes