Twilio:启动对话的自动驾驶仪 [英] Twilio: Autopilot to Initiate Conversation

查看:24
本文介绍了Twilio:启动对话的自动驾驶仪的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们是一家送货服务公司.下订单后,我们希望向我们的司机发送送货工作.职位先到先得.

We're a delivery service company. When an order is placed, we wish to send out a delivery job offer to our drivers. The jobs are first-come-first-serve.

订单在我们的 NodeJS 服务器上处理.在使用 Twilio Autopilot 处理对话(询问工作详细信息)时,向我们的每个司机发送短信 (SMS) 的有效方式是什么?

Orders are processed on our NodeJS server. What would be an efficient way to text (SMS) each of our drivers while using Twilio Autopilot to handle the conversation (asking for job details)?

我似乎找不到指示 Autopilot 为指定的出站电话号码发起对话的方法.我使用 twilio.messages.create() 从与 Autopilot 相同的号码发送短信给司机(有工作机会).但是当司机回答时,Autopilot 对原始问题没有任何背景.

I can't seem to find a way for instructing Autopilot to initiate the conversation for a specified outbound phone number. I've used twilio.messages.create() to send an SMS to a driver (with a job offer) from the same number as Autopilot. But when drivers reply, Autopilot has no context to the original question.

推荐答案

Twilio 开发人员布道者在这里.

Twilio developer evangelist here.

您可以使用 Twilio Studio 发起会话!您可以通过将触发器小部件的 Rest API 触发器事件连接到 拨打电话send message 来向用户发送消息,而无需用户向机器人打招呼小部件,如下所示.然后,如果接听电话或发送消息,您可以将这些操作连接到发送到 Autopilot 小部件.

You can initiate a session with Twilio Studio! You can message the user without the user greeting the bot by connecting the trigger widget's Rest API trigger event to either a make outgoing call or send message widget, as shown below. Then, if the call is answered or the message is sent, you can connect those actions to the Send to Autopilot widget.

最后,在发送到 Autopilot 小部件的配置部分下,放入当出站呼叫或消息由 Twilio 客户端而非用户发起时要运行的收集任务.

Lastly, under the config section of your Send to Autopilot widget, put in the Collection task you want to run when the outbound call or message is initiated by your Twilio client and not the user.

或者,您不需要 Twilio Studio:您也可以点击 REST API https://www.twilio.com/docs/autopilot/api 开始对话.

Alternatively, you don't need Twilio Studio: you can also hit the REST API https://www.twilio.com/docs/autopilot/api to kick-off a dialogue.

让我知道这是否有帮助:D

Let me know if this helps :D

这篇关于Twilio:启动对话的自动驾驶仪的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆