ऐक्शन फ़ीड

ऐक्शन फ़ीड बनाना और अपलोड करना

ऐक्शन फ़ीड बनाते और अपलोड करते समय, पक्का करें कि इन निर्देशों का पालन किया जा रहा हो:

  • कार्रवाई डेटा फ़ाइलों के लिए ऐक्शन फ़ीड में दी गई जानकारी का पालन करें. अपलोड के बीच में आपको कार्रवाई के डेटा वाली खास फ़ाइल के नाम का इस्तेमाल करना होगा. हमारा सुझाव है कि फ़ाइल के नाम में टाइमस्टैंप शामिल करें, जैसे कि action1_1633621547.json.
  • फ़ाइलसेट डिस्क्रिप्टर में, name फ़ील्ड को reservewithgoogle.action.v2 पर सेट करें. डिस्क्रिप्टर फ़ाइल के उदाहरण के लिए, जानकारी देने वाली फ़ाइल के लिए JSON सैंपल देखें. अपलोड के बीच में आपको यूनीक डिस्क्रिप्टर फ़ाइल नाम का इस्तेमाल करना चाहिए. हमारा सुझाव है कि फ़ाइल के नाम में टाइमस्टैंप शामिल करें, जैसे कि action1_1633621547.filesetdesc.json. डिस्क्रिप्टर फ़ाइल को जेनरिक एसएफ़टीपी ड्रॉपबॉक्स पर अपलोड करना ज़रूरी है.
  • फ़ीड को हर दिन सामान्य एसएफ़टीपी ड्रॉपबॉक्स पर पूरा रीफ़्रेश करते समय अपलोड करना चाहिए.
  • पार्टनर पोर्टल के कॉन्फ़िगरेशन > फ़ीड सेक्शन में, सामान्य फ़ीड एसएफ़टीपी ड्रॉपबॉक्स की जानकारी देखी जा सकती है.
  • फ़ीड ड्रॉपबॉक्स चुनना

  • पार्टनर पोर्टल के फ़ीड > इतिहास सेक्शन में जाकर, सामान्य फ़ीड में डेटा जोड़े जाने की स्थिति देखी जा सकती है.

परिभाषाएं

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.filesetdes.json

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