Nguồn cấp dữ liệu hành động

Tạo và tải nguồn cấp dữ liệu hành động lên

Khi tạo và tải nguồn cấp dữ liệu hành động lên, hãy làm theo các hướng dẫn sau:

  • Làm theo quy cách được mô tả trong nguồn cấp dữ liệu hành động cho tệp dữ liệu hành động. Bạn nên sử dụng tên tệp dữ liệu hành động riêng biệt cho mỗi lần tải lên. Thêm dấu thời gian vào tên tệp, ví dụ: action_1633621547.json.
  • Trong phần mô tả nhóm tệp, hãy đặt trường name thành reservewithgoogle.action.v2. Để xem ví dụ về tệp mô tả, hãy tham khảo mẫu JSON. Bạn nên sử dụng tên tệp mô tả riêng biệt cho mỗi lần tải lên. Thêm dấu thời gian vào tên tệp, ví dụ: action_1633621547.filesetdesc.json. Bạn phải tải tệp mô tả lên máy chủ SFTP chung.
  • Tải nguồn cấp dữ liệu lên máy chủ SFTP chung hằng ngày dưới dạng bản làm mới đầy đủ.
  • Bạn có thể tìm thấy thông tin chi tiết về máy chủ SFTP trong mục Cấu hình > Nguồn cấp dữ liệu của Partner Portal.
  • Chọn máy chủ nguồn cấp dữ liệu

    Chọn máy chủ nguồn cấp dữ liệu trong Partner Portal
  • Xem trạng thái nhập nguồn cấp dữ liệu trong phần Nhập > Nhật ký của Partner Portal.

Định nghĩa

Định nghĩa ActionFeed

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

  repeated ActionDetail data = 1;
}

Định nghĩa 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;
}

Định nghĩa hành động

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

  }
}

Định nghĩa 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;

}

Mẫu nguồn cấp dữ liệu hành động

Nguồn cấp dữ liệu hành động

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

Tệp mô tả

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

  ]
}