メニュー

Expand
ページを評価:

フィールド

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

Resource Properties in REST API format
account_sid
sid<AC> Not PII

The SID of the Account that created the Field resource.

date_created
date_time<iso8601> Not PII

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

date_updated
date_time<iso8601> Not PII

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

field_type
文字列 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.

task_sid
sid<UD> Not PII

The SID of the Task resource associated with this Field.

assistant_sid
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.

unique_name
文字列 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.

パラメーター
Parameters in REST API format
assistant_sid
Path
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
Path
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}.

        パラメーター
        Parameters in REST API format
        assistant_sid
        Path
        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
        Path
        GET sid_like<UD> Not PII

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

        sid
        Path
        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.

              パラメーター
              Parameters in REST API format
              assistant_sid
              Path
              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
              Path
              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.

                    パラメーター
                    Parameters in REST API format
                    assistant_sid
                    Path
                    削除する 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
                    Path
                    削除する sid_like<UD> Not PII

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

                    sid
                    Path
                    削除する sid_like<UE> Not PII

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

                    例 1
                          
                          
                          
                          
                          ページを評価:

                          ヘルプが必要ですか?

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

                                
                                
                                

                                フィードバックくださりありがとうございます!

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

                                Sending your feedback...
                                🎉 Thank you for your feedback!
                                Something went wrong. Please try again.

                                Thanks for your feedback!

                                Refer us and get $10 in 3 simple steps!

                                ステップ1

                                Get link

                                Get a free personal referral link here

                                ステップ2:

                                Give $10

                                Your user signs up and upgrade using link

                                ステップ3

                                Get $10

                                1,250 free SMSes
                                OR 1,000 free voice mins
                                OR 12,000 chats
                                OR more