Skip to contentSkip to navigationSkip to topbar
On this pageProducts used

Transition to Twilio Studio


(warning)

Twilio Alpha - Developer Preview

AI Assistants is a Twilio Alpha(link takes you to an external page) project that's in Developer Preview.

View the current limitations for details about feature limits during developer preview.

There might be situations in which you no longer want your AI Assistant to handle a conversation and instead want it to rely on a more deterministic path using a Twilio Studio Flow. In this guide, you will learn how to have your AI Assistant transition a conversation to Studio.


Prerequisites

prerequisites page anchor

This Assistant handoff requires your conversation to flow through Twilio Conversations. Follow the guide for using AI Assistants with Twilio Conversations before moving on here.


You will need a Studio Flow that is configured for the Incoming Conversation trigger(link takes you to an external page). From here, you can use any Studio Widget that is compatible with Conversations.

Beginning of a Studio flow where the Incoming Conversation trigger flows into a welcome widget

Make sure to deploy your Studio Flow and copy the Flow SID.


Configure your handoff Tool in your AI Assistant

configure-your-handoff-tool-in-your-ai-assistant page anchor

If you followed the AI Assistants with Twilio Conversations guide, one of the Twilio Functions that you deployed was a Studio Handover tool.

To use this webhook as an Assistant Tool, you will need your Functions domain from the deployment. If you can't find your Functions domain, head to the Twilio Console(link takes you to an external page) and click on Service Details next to your ai-assistants-samples service. You can find the domain in the Environments section.

Once you have both your Flow SID and your Functions domain, you can go into your AI Assistant in the Twilio Console(link takes you to an external page) and create a new Tool with the following configuration:

FieldExample ConfigurationNotes
NameStudio HandoverYou can modify this if you have multiple handovers.
DescriptionYou MUST use this if a customer is asking for a refund.Use this description to tell the AI Assistant when to use the tool.
Input
{}
MethodPOST
URLhttps://<your-functions-domain>.twil.io/tools/studio-handover?flowSid=<your-studio-flow-sid>Make sure to replace <your-functions-domain> and <your-studio-flow-sid> with your own values.

This Tool reroutes the conversation from your Assistant to Studio, but does not forward the last message from the Assistant to the Studio Flow. Instead, the Tool responds with Conversation handed over, which might prompt the Assistant to say something like "I handed this conversation over". If you want to manipulate this message, you can pass a different message into the URL configuration using the successMessage query parameter.


You've now learned how to configure an Assistant to hand off a conversation to a Twilio Studio Flow. See more tutorials below:

Need some help?

Terms of service

Copyright © 2024 Twilio Inc.