メニュー

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?

フィールド

A Field is an attribute that you expect will give specific details about the intent expressed by the end-user, such as a time, date, or number.

Each Task may have a distinct set of Fields associated with it.

Every Field has a Field Type associated with it. For example: for the task orderStatus, a relevant Field for might be orderStatus_orderNumber with a Field Type of orderNumber.

Fields are then used in Samples to train the Assistant model on where to look for the given attributes. For example, I want to know if my order {orderStatus_orderNumber} shipped.

All Autopilot REST API resources use the following base URL.

https://autopilot.twilio.com/v1/

Field properties

Names in PHP format
accountSid
sid<AC> Not PII

The SID of the Account that created the Field resource.

dateCreated
date_time<iso8601> Not PII

The date and time in GMT when the resource was created specified in RFC 2822 format.

dateUpdated
date_time<iso8601> Not PII

The date and time in GMT when the resource was last updated specified in RFC 2822 format.

fieldType
文字列 Not PII

The Field Type of the field. Can be: a Built-in Field Type, the unique_name, or the SID of a custom Field Type.

taskSid
sid<UD> Not PII

The SID of the Task resource associated with this Field.

assistantSid
sid<UA> Not PII

The SID of the Assistant that is the parent of the Task associated with the resource.

sid
sid<UE> Not PII

The unique string that we created to identify the Field resource.

uniqueName
文字列 Not PII

An application-defined string that uniquely identifies the resource. It can be used in place of the resource's sid in the URL to address the resource.

url
url Not PII

The absolute URL of the Field resource.

Create a Field resource

post
https://autopilot.twilio.com/v1/Assistants/{AssistantSid}/Tasks/{TaskSid}/Fields

Creates a new Field subresource for the Task. Make sure to use Built-in Field Types when possible.

パラメーター
Names in None format
assistant_sid
必須
post sid_like<UA> Not PII

The SID of the Assistant that is the parent of the Task associated with the new resource.

task_sid
必須
post sid_like<UD> Not PII

The SID of the Task resource associated with the new Field resource.

field_type
必須
post 文字列 Not PII

The Field Type of the new field. Can be: a Built-in Field Type, the unique_name, or the sid of a custom Field Type.

unique_name
必須
post 文字列 Not PII

An application-defined string that uniquely identifies the new resource. This value must be a unique string of no more than 64 characters. It can be used as an alternative to the sid in the URL path to address the resource.

例 1
        
        
        
        

        Fetch a Field resource

        GET
        https://autopilot.twilio.com/v1/Assistants/{AssistantSid}/Tasks/{TaskSid}/Fields/{Sid}

        Returns the Task Field instance identified by {FieldSid}.

        パラメーター
        Names in None format
        assistant_sid
        必須
        GET sid_like<UA> Not PII

        The SID of the Assistant that is the parent of the Task associated with the resource to fetch.

        task_sid
        必須
        GET sid_like<UD> Not PII

        The SID of the Task resource associated with the Field resource to fetch.

        sid
        必須
        GET sid_like<UE> Not PII

        The Twilio-provided string that uniquely identifies the Field resource to fetch.

        例 1
              
              
              
              

              Read multiple Field resources

              GET
              https://autopilot.twilio.com/v1/Assistants/{AssistantSid}/Tasks/{TaskSid}/Fields

              Returns a list of Fields for the specified Task. The list includes paging information.

              パラメーター
              Names in None format
              assistant_sid
              必須
              GET sid_like<UA> Not PII

              The SID of the Assistant that is the parent of the Task associated with the resources to read.

              task_sid
              必須
              GET sid_like<UD> Not PII

              The SID of the Task resource associated with the Field resources to read.

              例 1
                    
                    
                    
                    

                    Delete a Field resource

                    削除する
                    https://autopilot.twilio.com/v1/Assistants/{AssistantSid}/Tasks/{TaskSid}/Fields/{Sid}

                    Deletes a Field.

                    Fields cannot be associated with any Samples if they are to be successfully deleted.

                    パラメーター
                    Names in None format
                    assistant_sid
                    必須
                    削除する sid_like<UA> Not PII

                    The SID of the Assistant that is the parent of the Task associated with the resources to delete.

                    task_sid
                    必須
                    削除する sid_like<UD> Not PII

                    The SID of the Task resource associated with the Field resource to delete.

                    sid
                    必須
                    削除する sid_like<UE> Not PII

                    The Twilio-provided string that uniquely identifies the Field resource to delete.

                    例 1
                          
                          
                          
                          
                          Rate this page:

                          ヘルプが必要ですか?

                          We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd browsing the Twilio tag on Stack Overflow.