פיד פעולות

יצירה והעלאה של פידים של פעולות

כשיוצרים ומעלים פידים של פעולות, חשוב לפעול לפי ההוראות הבאות:

  • קבצים של נתוני פעולות פועלים לפי המפרט של פיד הפעולות. צריך להשתמש בשמות ייחודיים של קובצי נתוני פעולות בין העלאות. מומלץ לכלול חותמת זמן בשם הקובץ, לדוגמה action1_1633621547.json.
  • במתאר של מערך הקבצים, מגדירים את השדה name לערך reservewithgoogle.action.v2. דוגמה לקובץ תיאור זמינה בקובץ JSON לדוגמה. צריך להשתמש בשמות ייחודיים של שמות שמתארים בכל העלאה. מומלץ לכלול חותמת זמן בשם הקובץ, לדוגמה 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.filesetreset.json

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