這是部署函式後,後端應用程式的 Cloud Run 網址。選取「Twilio Agent Assist Functions」選項。接著,您應該會看到類似 twilio-agent-assist-functions-####-dev.twil.io 的網址。
TWILIO_DEBUG
在控制台中顯示記錄:True、false 或未定義。
如要進一步瞭解如何設定環境變數,請參閱相關的 Twilio 說明文件。
部署作業
請使用下列指令碼,將解決方案部署至 Twilio 執行個體:
npm run deploy:functions #Deploys just the functions to the Twilio instance.
npm run deploy:plugin #Deploys just the plugin to the Twilio instance, run command produced in the output to activate.
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["難以理解","hardToUnderstand","thumb-down"],["資訊或程式碼範例有誤","incorrectInformationOrSampleCode","thumb-down"],["缺少我需要的資訊/範例","missingTheInformationSamplesINeed","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-09-04 (世界標準時間)。"],[[["\u003cp\u003eThe frontend of the Twilio integration uses Twilio functions to host HTML and API methods, eliminating the need for external hosting.\u003c/p\u003e\n"],["\u003cp\u003eA Twilio Flex plugin is employed to display the Agent Assist interface within the agent's desktop environment for a customized user experience.\u003c/p\u003e\n"],["\u003cp\u003eEnvironment variables, such as \u003ccode\u003eTWILIO_ACCOUNT_SID\u003c/code\u003e, \u003ccode\u003eACCOUNT_SID\u003c/code\u003e, and \u003ccode\u003eAUTH_TOKEN\u003c/code\u003e, must be set in \u003ccode\u003e.env\u003c/code\u003e or \u003ccode\u003e.env.dev\u003c/code\u003e files to enable plugin functionality after deployment.\u003c/p\u003e\n"],["\u003cp\u003eDeployment involves using \u003ccode\u003enpm\u003c/code\u003e scripts: \u003ccode\u003enpm run deploy:functions\u003c/code\u003e for deploying functions and \u003ccode\u003enpm run deploy:plugin\u003c/code\u003e for deploying the plugin.\u003c/p\u003e\n"]]],[],null,["# Deploy Twilio Flex\n\nThe frontend portion of the Twilio integration consists of two components: Twilio functions and plugins. Functions host the HTML document and API methods needed to use Agent Assist and replace the need for hosting elsewhere. A Twilio plugin is a way to present the Agent Assist interface to the agent desktop.\n\nTwilio functions\n----------------\n\nThe Twilio functions are serverless API endpoints that can perform work hosted by Twilio. They provide user verification, chat service tokens, and the Agent Assist interface.\n\nTwilio Flex plugin\n------------------\n\nUse the Flex plugin to customize user experiences and behaviors for the Flex agents and supervisors. You present the Agent Assist console to the agent within the Flex application.\n\nEnvironment variables\n---------------------\n\n1. Create a file named `.env` in the `agent-assist-functions` directory or\n2. Create a file named `.env.dev` in the `agent-assist-plugins` directory.\n3. Set the following environment variables for the plugin to function after deployment:\n\nFor more information regarding environment variable setup, refer to the relevant Twilio documentation.\n\nDeployment\n----------\n\nUse the following script to deploy the solution to your Twilio instance: \n\n```\nnpm run deploy:functions #Deploys just the functions to the Twilio instance.\nnpm run deploy:plugin #Deploys just the plugin to the Twilio instance, run command produced in the output to activate.\n```"]]