動作動態消息

建立及上傳動作動態饋給

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

  • 請遵循 動作動態消息 適用於動作資料檔案每次上傳時,請務必使用不重複的動作資料檔案名稱。 建議您在檔案名稱中加入時間戳記,例如 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;
}

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

外送+外帶網址

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