The Autopilot Request
When a Task is triggered, Autopilot makes a request to the URL configured on the Task that will always include the parameters listed below. Autopilot also makes the same request if the dialogue is redirected to another Task using the Redirect Action or sent to a human using the Handoff Action.
For each request, Autopilot expects a valid Actions JSON in your response.
Autopilot will send these parameters either as POST parameters, in the format application/x-www-form-urlencoded
, or URL query parameters, depending on which HTTP method you've configured.
パラメーター | 概要 | 例 |
AccountSid | あなたのTwilio Account ID。ACから始まる34文字の文字列です。 | ACXXXXX |
AssistantSid | The Autopilot assistant ID. It is 34 characters long, and always starts with UA. | UAXXXXX |
DialogueSid | The session identifier. It is 34 characters long, and always starts with the letters UK. | UKXXXXX |
UserIdentifier | The unique user identifier coming from the channel. For Voice and SMS it will be the user's phone number. | +18304765664 |
CurrentInput | The last thing the user said. | "I want to change my appointment" |
CurrentTask | The user's current task. | change_appointments |
Field_{field-name}_Value | The key-value pair of the field value recognized. A different key-value pair will be sent for each field value. | Field_CLAIM_NUMBER_Value |
Field_{field-name}_Type | The key-value pair of the field type recognized. A different key-value pair will be sent for each field type. | Twilio.ALPHANUMERIC |
DialoguePayloadUrl | A URL to the Dialogue JSON payload that contains the context and data collected during the Autopilot session. | https://autopilot.twilio.com/v1/Assistants/UAXXXX/Dialogues/UKXXXX |
Memory |
A JSON Payload that contains all the Autopilot memory values. NOTE: Memory is only sent in POST requests to prevent query params from getting truncated. |
|
Channel |
The channel the interaction is taking place. |
SMS |
CurrentTaskConfidence | The confidence score for the task detected | 0.7 |
NextBestTask | The task with the next highest confidence score | cancel_appointment |
ヘルプが必要ですか?
誰しもが一度は考える「コーディングって難しい」。そんな時は、お問い合わせフォームから質問してください。 または、Stack Overflow でTwilioタグのついた情報から欲しいものを探してみましょう。