[英]How do I redirect to a studio flow from inside a Twilio Function?
[英]Redirect studio flow to Frontline
我相信您需要創建一個函數來將此對話發送給特定的 Frontline 代理,請遵循可用於使用 Twilio Function 將隨機代理添加到對話的代碼示例
const users = await twilioClient.conversations.users.list();
const randomWorkerIndex = Math.floor(Math.random() * users.length);
//adding the agent to conversation
const agent = await conversation.participants().create({
identity: users[randomWorkerIndex].identity,
});
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.