สร้างและอัปโหลดฟีดการดำเนินการ
เมื่อสร้างและอัปโหลดฟีดการดำเนินการ ให้ทำตามวิธีการต่อไปนี้
- ทำตามข้อกำหนดที่อธิบายไว้ใน
ฟีดการดำเนินการ
สำหรับไฟล์ข้อมูลการดำเนินการ เราขอแนะนำให้ใช้ชื่อไฟล์ข้อมูลการกระทําที่ไม่ซ้ำกันสําหรับการอัปโหลดแต่ละครั้ง
ใส่การประทับเวลาในชื่อไฟล์ เช่น
action_1633621547.json - ในตัวอธิบายชุดไฟล์ ให้ตั้งค่าช่อง
nameเป็นreservewithgoogle.action.v2ดูตัวอย่างไฟล์ตัวอธิบายได้ที่ตัวอย่าง JSON เราขอแนะนำให้ใช้ชื่อไฟล์ตัวอธิบายที่ไม่ซ้ำกันสำหรับการอัปโหลดแต่ละครั้ง ใส่การประทับเวลาในชื่อไฟล์ เช่นaction_1633621547.filesetdesc.jsonคุณต้องอัปโหลดไฟล์ตัวอธิบายไปยังเซิร์ฟเวอร์ SFTP ทั่วไป - อัปโหลดฟีดไปยังเซิร์ฟเวอร์ SFTP ทั่วไปทุกวันเป็นการรีเฟรชแบบเต็ม
- คุณดูรายละเอียดเซิร์ฟเวอร์ SFTP ได้ในส่วนการกำหนดค่า > ฟีดของพอร์ทัลพาร์ทเนอร์
- ดูสถานะการนำเข้าฟีดได้ในส่วนฟีด > ประวัติของพอร์ทัลพาร์ทเนอร์
คำจำกัดความ
คำจำกัดความของ ActionFeed
message ActionFeed { repeated ActionDetail data = 1; }
คำจำกัดความของ ActionDetail
message ActionDetail { string entity_id = 2; string link_id = 3; // Deep link for action detail string url = 4; repeated Action actions = 1; }
คำจำกัดความของการดำเนินการ
// Information about an Action which could be performed. message Action { // Deprecated fields not to be reused. reserved 1; oneof action_info { FoodOrderingInfo food_ordering_info = 3; } }
คำจำกัดความของ FoodOrderingInfo
message FoodOrderingInfo { // Service type for food ordering action. enum ServiceType { UNKNOWN = 0; DELIVERY = 1; TAKEOUT = 2; } ServiceType service_type = 1 ; }
ตัวอย่างฟีดการดำเนินการ
จัดส่งเท่านั้น
ชื่อไฟล์ : actions_1697754089_0001.json
{ "data": [ { "actions": [{ "food_ordering_info": { "service_type": "DELIVERY" } }], "entity_id": "dining-1", "link_id": "delivery-dining-1", "url": "https://www.restaurant.com/delivery/dining-1" } ] }
สั่งกลับบ้านเท่านั้น
ชื่อไฟล์ : actions_1697754089_0001.json
{ "data": [ { "actions": [{ "food_ordering_info": { "service_type": "TAKEOUT" } }], "entity_id": "dining-1", "link_id": "takeout-link-dining-1", "url": "https://www.restaurant.com/takeout/dining-1" } ] }
จัดส่งถึงบ้านและสั่งกลับบ้าน
ชื่อไฟล์ : actions_1697754089_0001.json
{ "data": [ { "actions": [ { "food_ordering_info": { "service_type": "DELIVERY" } }, { "food_ordering_info": { "service_type": "TAKEOUT" } } ], "entity_id": "dining-1", "link_id": "common-link-dining-1", "url": "https://www.restaurant.com/commonlink/dining-1" } ] }
URL สำหรับการนำกลับบ้านและการนำส่งแตกต่างกัน
ชื่อไฟล์ : actions_1697754089_0001.json
{ "data": [ { "actions": [ { "food_ordering_info": { "service_type": "TAKEOUT" } } ], "entity_id": "dining-1", "link_id": "takeout-dining-1", "url": "https://www.restaurant.com/takeout/dining-1" }, { "actions": [ { "food_ordering_info": { "service_type": "DELIVERY" } } ], "entity_id": "dining-1", "link_id": "delivery-dining-1", "url": "https://www.restaurant.com/delivery/dining-1" } ] }
ไฟล์ตัวอธิบาย
ชื่อไฟล์ : actions_1697754089.filesetdesc.json
{ "generation_timestamp": 1697754089, "name": "reservewithgoogle.action.v2", "data_file": [ "actions_1697754089_0001.json", "actions_1697754089_0002.json" ] }