Skip to main content
Restarts the current chat conversation, resetting all related state and starting a new conversation thread.

Syntax

await instance.restartConversation();

Parameters

None

Returns

Promise<void>
A promise that resolves when the conversation is restarted.

Examples

The following example restarts the conversation:
// Restart the conversation
await instance.restartConversation();

// Restart and send a new message
instance.on('restartConversation', async (event, instance) => {
    await instance.send('Starting fresh conversation');
});

Do you need practical examples?

Learn how to apply the features available for embedded chat into your implementation with guidance and examples.