פיד פעולות

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

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

  • פועלים לפי המפרט שמתואר בפיד הפעולות לגבי קובצי נתונים של פעולות. מומלץ להשתמש בשמות ייחודיים לקובצי נתוני הפעולות בכל העלאה. מוסיפים חותמת זמן לשם הקובץ, לדוגמה, action_1633621547.json.
  • בתיאור של קבוצת הקבצים, מגדירים את השדה name לערך reservewithgoogle.action.v2. דוגמה לקובץ JSON של קובץ התיאור. מומלץ להשתמש בשמות קבצים ייחודיים לתיאור בכל העלאה. מוסיפים חותמת זמן לשם הקובץ, לדוגמה, action_1633621547.filesetdesc.json. צריך להעלות את קובץ התיאור לשרת ה-SFTP הגנרי.
  • מעלים פידים לשרת ה-SFTP הגנרי מדי יום כרענון מלא.
  • פרטי שרת ה-SFTP מופיעים בקטע Configuration > Feeds (הגדרה > פידים) ב-Partner Portal.
  • בחירת שרתי פידים

    בחירת שרתי פידים ב-Partner Portal
  • אפשר לראות את סטטוס הטמעת הנתונים של הפיד בקטע הטמעת נתונים > היסטוריה בפורטל לשותפים.

הגדרות

הגדרת ActionFeed

message ActionFeed {
  option features.(pb.java).nest_in_file_class = YES;

  repeated ActionDetail data = 1;
}

הגדרת ActionDetail

message ActionDetail {
  option features.(pb.java).nest_in_file_class = YES;

  string entity_id = 2;
  string link_id = 3;

  // Deep link for action detail
  string url = 4;

  // The actions that can be performed using this deep link. At least one
  // Action must be specified.
  repeated Action actions = 1;
}

הגדרת הפעולה

// Information about an Action which could be performed.
message Action {
  option features.(pb.java).nest_in_file_class = YES;

  // Deprecated fields not to be reused.
  reserved 1;

  oneof action_info {
    AppointmentInfo appointment_info = 2;

  }
}

ההגדרה של AppointmentInfo

// Indicates that the parent Action is for booking an appointment.
// In v2 of the Action feed, the deep link URL is specified on ActionDetail.url,
// so this message has no fields and should be set as an empty object
// (for example, "appointment_info": {} in JSON).
message AppointmentInfo {
  option features.(pb.java).nest_in_file_class = YES;

}

דוגמאות לפיד פעולות

פיד פעולות

{
  "data": [
    {
      "entity_id": "appointments-merchant-1",
      "link_id": "appointment-link-1",
      "url": "https://www.partnerwebsite.com/appointment/appointment-partner-1",
      "actions":[
        {
          "appointment_info": {}
        }
      ]
    }
  ]
}

קובץ תיאור

{
  "generation_timestamp": 1677540395,
  "name": "reservewithgoogle.action.v2",
  "data_file": [
    "action_1677540395_0001.json",
    "action_1677540395_0002.json"

  ]
}