交易 API 將於 2023 年 5 月 3 日淘汰,並將於 2023 年 6 月 13 日淘汰。詳情請參閱「
對話動作已淘汰」。
OrderOptions
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
JSON 表示法 |
{
"requestDeliveryAddress": boolean,
"userInfoOptions": {
object (UserInfoOptions )
}
} |
欄位 |
requestDeliveryAddress |
boolean
如果為 true,就必須提供相關訂單的寄送地址。
|
userInfoOptions |
object (UserInfoOptions )
應用程式可以設定這個欄位來要求使用者資訊。設定後,相應的欄位會顯示在 ProposedOrderCard 中,以便使用者確認。
|
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-07-26 (世界標準時間)。
[null,null,["上次更新時間:2025-07-26 (世界標準時間)。"],[[["\u003cp\u003eOrderOptions allows specifying if a delivery address is required and what user information to request.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003erequestDeliveryAddress\u003c/code\u003e is a boolean indicating if the order needs a delivery address.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003euserInfoOptions\u003c/code\u003e enables requesting specific user information, like email or phone number, for the order.\u003c/p\u003e\n"],["\u003cp\u003eThis information is displayed in the ProposedOrderCard for user confirmation.\u003c/p\u003e\n"]]],["The provided content outlines the structure for defining order options and user information requests. `requestDeliveryAddress` (boolean) determines if a delivery address is mandatory for an order. `userInfoOptions` (object) allows apps to request user data; if set, these fields appear in the ProposedOrderCard. `userInfoOptions` contains `userInfoProperties`, which lists the specific user information properties being requested as an array of enum. Each element can be a field of the `UserInfoProperty`.\n"],null,["# OrderOptions\n\n- [JSON representation](#SCHEMA_REPRESENTATION)\n- [UserInfoOptions](#UserInfoOptions)\n - [JSON representation](#UserInfoOptions.SCHEMA_REPRESENTATION)\n\nOptions associated with an order.\n\n| JSON representation ||\n|------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| ``` { \"requestDeliveryAddress\": boolean, \"userInfoOptions\": { object (/assistant/df-asdk/transactions/reference/physical/rest/v3/OrderOptions#UserInfoOptions) } } ``` |\n\n| Fields ||\n|--------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `requestDeliveryAddress` | `boolean` If true, delivery address is required for the associated order. |\n| `userInfoOptions` | `object (`[UserInfoOptions](/assistant/df-asdk/transactions/reference/physical/rest/v3/OrderOptions#UserInfoOptions)`)` The app can request user info by setting this field. If set, the corresponding field will show up in ProposedOrderCard for user's confirmation. |\n\nUserInfoOptions\n---------------\n\nOptions regarding user info.\n\n| JSON representation ||\n|--------------------------------------------------------------------------------------------------------------------------|---|\n| ``` { \"userInfoProperties\": [ enum (/assistant/df-asdk/transactions/reference/physical/rest/v3/UserInfoProperty) ] } ``` |\n\n| Fields ||\n|------------------------|------------------------------------------------------------------------------------------------------------------------------------------|\n| `userInfoProperties[]` | `enum (`[UserInfoProperty](/assistant/df-asdk/transactions/reference/physical/rest/v3/UserInfoProperty)`)` List of user info properties. |"]]