Resumes a conversation.
The paused conversation object obtained from GetPausedConversations action, containing interactionSid and sid.
GetPausedConversations
interactionSid
sid
A promise that resolves to an object containing the task and the conversation.
FlexSdkError with the following error code(s):
import { createClient } from "@twilio/flex-sdk";import { ResumeConversation, GetPausedConversations } from "@twilio/flex-sdk/actions/Conversation";async function resumeConversation() { const client = await createClient("SDK_TOKEN"); // Retrieves paused conversations const getPausedConversations = new GetPausedConversations(); const pausedConversations = await client.execute(getPausedConversations); // Select the paused conversation const pausedConversation = pausedConversations.items[0]; // Resume the conversation const resumeConversation = new ResumeConversation(pausedConversation); const { task, conversation } = await client.execute(resumeConversation); return { task, conversation };} Copy
import { createClient } from "@twilio/flex-sdk";import { ResumeConversation, GetPausedConversations } from "@twilio/flex-sdk/actions/Conversation";async function resumeConversation() { const client = await createClient("SDK_TOKEN"); // Retrieves paused conversations const getPausedConversations = new GetPausedConversations(); const pausedConversations = await client.execute(getPausedConversations); // Select the paused conversation const pausedConversation = pausedConversations.items[0]; // Resume the conversation const resumeConversation = new ResumeConversation(pausedConversation); const { task, conversation } = await client.execute(resumeConversation); return { task, conversation };}
Resumes a conversation.
Param: pausedConversation
The paused conversation object obtained from
GetPausedConversationsaction, containinginteractionSidandsid.Returns
A promise that resolves to an object containing the task and the conversation.
Throws
FlexSdkError with the following error code(s):
Example