ฟีดการดำเนินการ

สร้างและอัปโหลดฟีดการดำเนินการ

เมื่อสร้างและอัปโหลดฟีดการดำเนินการ โปรดตรวจสอบว่าคุณได้ทำตามวิธีการต่อไปนี้

  • ทำตามข้อกำหนดที่อธิบายไว้ในฟีดการดำเนินการสำหรับไฟล์ข้อมูลการดำเนินการ คุณต้องใช้ชื่อไฟล์ข้อมูลการดำเนินการที่ไม่ซ้ำกันระหว่างการอัปโหลด ขอแนะนำให้ระบุการประทับเวลาในชื่อไฟล์ เช่น action1_1633621547.json
  • ในข้อบ่งชี้ชุดไฟล์ ให้ตั้งค่าช่อง name เป็น reservewithgoogle.action.v2 สำหรับตัวอย่างไฟล์ข้อบ่งชี้ โปรดดูตัวอย่าง JSON ของไฟล์ Descriptor คุณต้องใช้ชื่อไฟล์ตัวบ่งชี้ที่ไม่ซ้ำกันระหว่างการอัปโหลด ขอแนะนำให้ระบุการประทับเวลาในชื่อไฟล์ เช่น action1_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 [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"]
}