Level up your Twilio API skills in TwilioQuest, an educational game for Mac, Windows, and Linux. Download Now

メニュー

Expand
Rate this page:

Thanks for rating this page!

We are always striving to improve our documentation quality, and your feedback is valuable to us. How could this documentation serve you better?

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.

"twilio":{
"collected_data": {
"get_insurance": {
"answers": {
"car_model": {
"answer": "3 Series",
"filled": true,
"confirmed": false,
"attempts": 1
},
"car_year": {
"answer": "2016",
"filled": true,
"type": "Twilio.NUMBER",
"confirmed": false,
"attempts": 1
},
"car_make": {
"answer": "It's a BMW",
"filled": true,
"confirmed": false,
"attempts": 1
},
"car_state": {
"answer": "California",
"type": "Twilio.US_STATE",
"filled": true,
"attempts": 3,
"confirmed": false
}
},
"date_completed": "",
"date_started": "2019-08-03T00:13:18Z",
"status": "in-progress"
}
}
}

Channel

The channel the interaction is taking place.

SMS

Rate this page:

ヘルプが必要ですか?

誰しもが一度は考える「コーディングって難しい」。そんな時は、お問い合わせフォームから質問してください。 または、Stack Overflow でTwilioタグのついた情報から欲しいものを探してみましょう。