สร้างและอัปโหลดฟีดการดำเนินการ
เมื่อสร้างและอัปโหลดฟีดการดำเนินการ โปรดทําตามวิธีการต่อไปนี้
- ปฏิบัติตามข้อกำหนดที่อธิบายไว้ใน
ฟีดการดำเนินการ
สำหรับไฟล์ข้อมูลการดำเนินการ คุณต้องใช้ชื่อไฟล์ข้อมูลการดำเนินการที่ไม่ซ้ำกันระหว่างการอัปโหลด
ขอแนะนำให้ใส่การประทับเวลาในชื่อไฟล์ เช่น
action1_1633621547.json
- ในข้อบ่งชี้ชุดไฟล์ ให้ตั้งค่าช่อง
name
เป็นreservewithgoogle.action.v2
หากต้องการดูตัวอย่างไฟล์ข้อบ่งชี้ ให้อ้างอิงจากตัวอย่าง JSON ของไฟล์คำอธิบาย คุณต้องใช้ชื่อไฟล์ตัวบ่งชี้ที่ไม่ซ้ำกันระหว่างการอัปโหลด ขอแนะนำให้ใส่การประทับเวลาในชื่อไฟล์ เช่นaction1_1633621547.filesetdesc.json
ไฟล์ข้อบ่งชี้จะต้องอัปโหลดไปยังดรอปบ็อกซ์ SFTP ทั่วไป - ฟีดต้องอัปโหลดไปที่ดรอปบ็อกซ์ SFTP ทั่วไปทุกวันโดย รีเฟรช
- คุณสามารถดูข้อมูลดรอปบ็อกซ์ SFTP สำหรับฟีดทั่วไปได้ใน การกำหนดค่า > ฟีดของพอร์ทัลพาร์ทเนอร์
- คุณดูสถานะการนำเข้าฟีดทั่วไปได้ใน ฟีด > ส่วนประวัติของพอร์ทัลพาร์ทเนอร์
คำจำกัดความ
คำจำกัดความของ ActionFeed
message ActionFeed { repeated ActionDetail data = 1; }
คําจํากัดความของรายละเอียดการดำเนินการ
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 [features.field_presence = IMPLICIT]; }
ตัวอย่างฟีดการดำเนินการ
จัดส่งเท่านั้น
ชื่อไฟล์ : actions1_1697754089.json
{ "data": [ { "actions": [{ "food_ordering_info": { "service_type": "DELIVERY" } }], "entity_id": "entity002", "link_id": "delivery_link/entity002", "url": "https://www.restaurant.com/delivery/entity002" } ] }
สั่งกลับบ้านเท่านั้น
ชื่อไฟล์ : actions1_1697754089.json
{ "data": [ { "actions": [{ "food_ordering_info": { "service_type": "TAKEOUT" } }], "entity_id": "entity002", "link_id": "takeout_link/entity002", "url": "https://www.restaurant.com/takeout/entity002" } ] }
บริการจัดส่งและสั่งกลับบ้าน
ชื่อไฟล์ : actions1_1697754089.json
{ "data": [ { "actions": [ { "food_ordering_info": { "service_type": "DELIVERY" } }, { "food_ordering_info": { "service_type": "TAKEOUT" } } ], "entity_id": "entity002", "link_id": "common_link/entity002", "url": "https://www.restaurant.com/commonlink/entity002" } ] }
URL อื่นสำหรับบริการจัดส่งและสั่งกลับบ้าน
ชื่อไฟล์ : actions1_1697754089.json
{ "data": [ { "actions": [ { "food_ordering_info": { "service_type": "TAKEOUT" } } ], "entity_id": "entity002", "link_id": "takeout_link/entity002", "url": "https://www.restaurant.com/takeout/entity002" }, { "actions": [ { "food_ordering_info": { "service_type": "DELIVERY" } } ], "entity_id": "entity002", "link_id": "delivery_link/entity002", "url": "https://www.restaurant.com/delivery/entity002" } ] }
ไฟล์ข้อบ่งชี้
ชื่อไฟล์ : actions1_1697754089.filesetdesc.json
{ "generation_timestamp": 1697754089, "name": "reservewithgoogle.action.v2", "data_file": ["actions1_1697754089.json"] }