Action Feed

Create and upload action feeds

When you create and upload action feeds, make sure that you're following these instructions:

  • Follow the spec described in the action feed for action data files. You must use unique action data file names between uploads. It is recommended to include a timestamp in the file name, for example, action1_1633621547.json.
  • In the fileset descriptor, set the name field to reservewithgoogle.action.v2. For an example of the descriptor file, refer to the Descriptor file JSON sample. You must use unique descriptor file names between uploads. It is recommended to include a timestamp in the file name, for example, action1_1633621547.filesetdesc.json. The descriptor file must be uploaded to the generic SFTP dropbox.
  • Feeds must be uploaded to the generic SFTP dropbox daily as full refreshes.
  • You can find generic feed SFTP dropbox info in the Configuration > Feeds section of the partner portal.
  • Selecting feed dropboxes

  • You can find generic feed ingestion status in the Feeds > History section of the partner portal.

Definitions

ActionFeed definition

message ActionFeed {
  repeated ActionDetail data = 1;
}

ActionDetail definition

message ActionDetail {
  string entity_id = 2;
  string link_id = 3;

  // Deep link for action detail
  string url = 4;
  repeated Action actions = 1;
}

Action definition

// 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 definition

message FoodOrderingInfo {
  // Service type for food ordering action.
  enum ServiceType {
    UNKNOWN = 0;
    DELIVERY = 1;
    TAKEOUT = 2;
  }

  ServiceType service_type = 1 [features.field_presence = IMPLICIT];
}

Action Feed samples

Delivery only

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

Takeout only

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

Delivery and takeout

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

Delivery+takeout different URL

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

Descriptor file

Filename : actions1_1697754089.filesetdesc.json

{
  "generation_timestamp": 1697754089,
  "name": "reservewithgoogle.action.v2",
  "data_file": ["actions1_1697754089.json"]
}