ऐक्शन फ़ीड

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

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

  • इसमें दी गई जानकारी का पालन करें ऐक्शन फ़ीड ऐक्शन डेटा फ़ाइलों के लिए. अपलोड के बीच आपको कार्रवाई डेटा के यूनीक फ़ाइल नामों का इस्तेमाल करना चाहिए. फ़ाइल के नाम में टाइमस्टैंप शामिल करने का सुझाव दिया जाता है. उदाहरण के लिए, 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.filesetdesc.json

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