動作動態消息

建立並上傳動作動態饋給

建立並上傳動作動態饋給時,請務必遵循下列操作說明:

  • 遵循動作資料檔案動作動態饋給所述的規格。每次上傳之間,都必須使用不重複的動作資料檔案名稱。 建議您在檔案名稱中加入時間戳記,例如 action1_1633621547.json
  • 在檔案集描述元中,將 name 欄位設為 reservewithgoogle.action.v2。如需描述元檔案的範例,請參閱描述元檔案 JSON 範例。您必須在上傳作業之間使用不重複的描述元檔案名稱。建議您在檔案名稱中加入時間戳記,例如 action1_1633621547.filesetdesc.json。描述元檔案必須上傳至一般的 SFTP Dropbox。
  • 動態饋給必須每天以全面重新整理的方式上傳至一般 SFTP Dropbox。
  • 如要查看一般動態饋給的 SFTP Dropbox 資訊,請前往合作夥伴入口網站的「設定」>「動態饋給」專區。
  • 選取動態饋給 Dropbox

  • 如要查看一般的動態饋給擷取狀態,請依序前往合作夥伴入口網站的「動態饋給」>「記錄」專區。

定義

ActionFeed 定義

message ActionFeed {
  repeated ActionDetail data = 1;
}

ActionDetails 定義

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"
    }
  ]
}

外送與外帶網址不同

檔案名稱 : 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"]
}