你必須擁有狀態良好的 Merchant Center 帳戶,且帳戶中已核准的產品可刊登在免費產品資訊中。如要開始使用,請參閱下列說明中心文章:
在 Merchant Center 中設定產品後,請先完成本節中的必要條件,再建構 API 整合。
1. Merchant Center 設定
請確認 Google Merchant Center 帳戶已設定下列項目:
1.1. 退貨政策
你必須在 Merchant Center 中定義退貨政策,因為這是記錄商家規定,結帳畫面會參考這項政策。設定的政策會套用至帳戶中的所有產品,但你可以使用 return_policy_label 動態饋給屬性,將特定退貨政策限制為僅適用於部分產品。
如果你的 Merchant Center 帳戶是進階帳戶,則必須在每個子帳戶中設定退貨政策。
你必須提供退貨費用、退貨速度 (期限) 和完整政策的連結。如要進一步瞭解如何設定退貨,請參閱這篇文章。
1.2. 客戶服務資訊
你必須在 Merchant Center 中設定客戶服務資訊。系統會使用這項資訊,在訂單確認頁面上產生「聯絡商家」連結。如要進一步瞭解如何設定客戶服務資訊,請參閱這篇文章。
2. 產品資料
你必須更新產品動態饋給,標示產品是否符合資格,並提供法規遵循資料。如要透過 UCP 啟用 Google 結帳功能,就必須提供這項資訊,因為服務專員需要藉此判斷產品是否符合資格、計算準確的總費用,並向使用者顯示必要的法律警語。
2.1. 代理結帳資格
這會讓產品加入 Google 結帳體驗。
這是透過包含單一布林值的產品屬性 native_commerce 提供。如果設為 false 或缺少這項屬性,產品就無法啟用結帳功能。
2.2. 產品警告
如果商品有法規警告要求 (例如加州 65 號提案)。你有責任遵守所有適用法律,包括產品警告規定。當你提供這些警告時,系統會在結帳畫面顯眼處顯示。
提供 consumer_notice 屬性群組,並包含兩項子屬性:
consumer_notice_type:必須是legal_disclaimer、safety_warning或prop_65。consumer_notice_message:字串 (最多 1000 個字元)。系統接受 HTML 標記<b>、<br>和<i>。
2.3. 產品 ID
產品動態饋給中的 id 必須與結帳 API 預期的產品 ID 一致。如果相符,則無須採取任何行動。否則,請使用merchant_item_id自訂屬性對應這些值。
2.4. 如何為產品新增屬性
以下範例說明將產品提供給 Merchant Center 的不同方式。
2.4.1. 動態饋給
建議您建立補充資料來源 (操作說明請見這裡)。你可以將這項屬性新增至主要動態饋給,但請謹慎操作,因為格式不正確可能會影響一般產品擷取作業。
語法注意事項:請確保複雜字串 (例如第 65 號提案訊息) 不含會破壞檔案格式的字元 (例如 CSV 中的額外半形逗號),除非已正確逸出。
文字檔格式:
| ID | native_commerce | consumer_notice |
|---|---|---|
| 11111 | TRUE | prop_65:This product can expose you... |
| 22222 | TRUE | |
| 33333 | FALSE |
XML 格式:
<item>
<g:id>11111</g:id>
<g:native_commerce>TRUE</g:native_commerce>
<g:consumer_notice>
<g:consumer_notice_type>prop_65</g:consumer_notice_type>
<g:consumer_notice_message>
This product can expose you to chemicals...
</g:consumer_notice_message>
</g:consumer_notice>
</item>
<item>
<g:id>22222</g:id>
<g:native_commerce>TRUE</g:native_commerce>
</item>
<item>
<g:id>33333</g:id>
<g:native_commerce>FALSE</g:native_commerce>
</item>
2.4.2. Content API
以自訂屬性形式提供屬性。必須納入包含完整產品的 products.insert,因為 products.update 不支援更新 customAttributes。
範例:
"customAttributes": [
{
"name": "native commerce",
"groupValues": [
{
"name": "checkout eligibility",
"value": "true"
}
]
},
{
"name": "consumer notice",
"groupValues": [
{
"name": "notice type",
"value": "prop_65"
},
{
"name": "notice message",
"value": "This product can expose you to chemicals..."
}
]
},
{
"name": "merchant item id",
"value": "some_checkout_item_id_1"
}
]
2.4.2. Merchant API
以自訂屬性形式提供屬性。你可以將這些屬性新增至現有accounts.productInputs.insert,或使用 accounts.productInputs.patch 直接更新。
「insert」的示例:
"customAttributes": [
{
"name": "native commerce",
"groupValues": [
{
"name": "checkout eligibility",
"value": "true"
}
]
},
{
"name": "consumer notice",
"groupValues": [
{
"name": "notice type",
"value": "prop_65"
},
{
"name": "notice message",
"value": "This product can expose you to chemicals..."
}
]
},
{
"name": "merchant item id",
"value": "some_checkout_item_id_1"
}
]
更新範例:
| 類型 | 名稱 | 值 |
|---|---|---|
| 路徑參數 | productInput.name |
accounts/{account}/productInputs/en~US~11111 |
| 查詢參數 | updateMask |
customAttributes.native%20commerce,customAttributes.consumer%20notice,customAttributes.product%20fee,customAttributes.merchant%20item%20id |
dataSource |
dataSources/{datasource} |
{
"offerId": "11111",
"contentLanguage": "en",
"feedLabel": "US",
"customAttributes": [
{
"name": "native commerce",
"groupValues": [
{
"name": "checkout eligibility",
"value": "true"
}
]
},
{
"name": "consumer notice",
"groupValues": [
{
"name": "notice type",
"value": "prop_65"
},
{
"name": "notice message",
"value": "This product can expose you to chemicals..."
}
]
},
{
"name": "product fee",
"groupValues": [
{
"name": "product fee type",
"value": "US_AZ_TIRE_FEE"
},
{
"name": "product fee amount",
"value": "2.75 USD"
}
]
},
{
"name": "merchant item id",
"value": "some_checkout_item_id_1"
}
]
}
3. 產品限制
下列類別的產品不符合結帳功能的使用資格。確認這些項目已將 native_commerce 設為空白或 false。
金融商品和週期性付款模式
- 訂閱項目:需要週期性結算週期的產品。
- 分期付款:需要商家強制執行的付款方案或融資的交易。
客製化商品和運送選項
- 個人化商品:需要自訂設計的商品 (例如雕刻、縮寫)。
- 非新品或特價商品:整新品、二手商品,以及標示為「特價商品」(不得退貨) 的商品。
- 預購商品:推出日期未到且延後出貨的產品。
- 套裝服務:需要額外合約的項目,例如保固、安裝或設定。
- 特殊運送:需要非標準運費的商品 (例如貨運、高級運送)。
- 禮物:需要拆分月結單物流或為收件者隱藏價格的交易。
- 店內啟用:必須在零售地點實體啟用的產品。
政策和安全限制
- 設有年齡限制:需要身分證件驗證的商品 (例如酒精飲料、菸草製品)。
- 禁止宣傳的內容:武器、成人內容、醫療保健/藥品、仿冒品,或標準 Google 購物政策禁止的任何其他類別。
數位商品和服務
- 服務:課程、線上課程和旅遊套裝行程 (除非使用特定旅遊導軌整合)。
- 租賃:電影租借、設備租借或租賃。
- 虛擬商品:遊戲幣、大型多人線上角色扮演遊戲商品或造型。
- 軟體依附元件:使用者必須先安裝特定軟體,才能購買的商品。