סקירה כללית על ממשק ה-API המשני של מבצעים

אתם יכולים להשתמש במבצעים כדי להציג מבצעים מיוחדים על מוצרים שאתם מוכרים ב-Google. המבצעים מוצגים בפלטפורמות שונות של Google, כולל חיפוש Google, שופינג ו-Chrome. כדי שמבצעים יאושרו, הם צריכים לעמוד בקריטריונים מסוימים. מידע נוסף זמין במאמר בנושא קריטריונים לקידום.

כשאתם מוסיפים מבצע למוצרים שלכם, הקונים רואים קישור למבצע מיוחד. לדוגמה, '15% הנחה' או 'משלוח חינם'. קישורים למבצעים יכולים להגביר את האטרקטיביות של המוצרים שלכם ולעודד קונים לבצע רכישה. המימוש של מבצעים תמיד יתבצע בתהליך התשלום באתר או בנקודת המכירה.

מידע נוסף זמין במאמר בנושא יסודות המבצעים.

דרישות מוקדמות

כדי ש-Google תוכל להציג את קידומי המכירות שלכם, עליכם לספק לה מידע ספציפי על העסק ועל המוצרים שלכם. צריכים להיות לכם:

בנוסף, אתם צריכים להצטרף לתוכנית המבצעים בחשבון Merchant Center. אם אתם לא בטוחים אם כבר נרשמתם, אתם יכולים לבדוק את זה ב-Merchant Center.

אם אתם לא רשומים, אתם צריכים למלא את טופס הבקשה. הצוות של 'קידום מכירות מוצרים' יודיע לכם כאשר תוכלו להתחיל בהטמעה.

מידע נוסף זמין במאמר קריטריונים ומדיניות להשתתפות.

יצירת מקור נתונים

אפשר להשתמש בשיטה accounts.dataSources.create כדי ליצור מקור לנתוני מבצעים. אם יש מקור נתונים קיים של מבצעים, אפשר להשתמש בשיטה accounts.dataSources.list כדי לאחזר את כל מקורות הנתונים. לאחר מכן אפשר להשתמש בשדה name של המקור לנתוני מבצעים כדי ליצור מבצעים.

בדוגמה הבאה אפשר לראות איך ליצור מקור נתונים להוספת מבצעים:

POST https://merchantapi.googleapis.com/datasources/v1/accounts/{ACCOUNT_ID}/dataSources

{
  "displayName": "{DISPLAY_NAME}",
  "promotionDataSource": {
    "contentLanguage": "{CONTENT_LANGUAGE}",
    "targetCountry": "{TARGET_COUNTRY}"
  }
}

מחליפים את מה שכתוב בשדות הבאים:

  • {ACCOUNT_ID}: המזהה הייחודי של החשבון שלכם, כפי שהוא מופיע בממשק המשתמש של Merchant Center.
  • {DISPLAY_NAME}: השם המוצג של מקור הנתונים.
  • {CONTENT_LANGUAGE}: קוד השפה בן שתי האותיות של המוצרים במקור הנתונים לפי תקן ISO 639-1.
  • {TARGET_COUNTRY}: קוד הטריטוריה במאגר CLDR של מדינת היעד שבה רוצים שהמבצעים יוצגו.

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

{
  "name": "accounts/{ACCOUNT_ID}/dataSources/{DATASOURCE_ID}",
  "dataSourceId": "{DATASOURCE_ID}",
  "displayName": "{DISPLAY_NAME}",
  "promotionDataSource": {
    "targetCountry": "{TARGET_COUNTRY}",
    "contentLanguage": "{CONTENT_LANGUAGE}"
  },
  "input": "API"
}

קידומי מכירות

אפשר להשתמש בשיטה accounts.promotions.insert כדי ליצור או לעדכן מבצע. השיטה accounts.promotions.insert מקבלת כקלט משאב promotions ושם של מקור נתונים. אם הפעולה בוצעה ללא שגיאות, היא מחזירה את המבצע החדש או המעודכן.

כדי ליצור מבצע, צריך לציין את השם של מקור הנתונים. בנוסף, צריך לציין בבקשה ערכים בשדות הבאים:

  • contentLanguage
  • redemptionChannel
  • promotionId
  • targetCountry
  • attributes.offerType
  • attributes.genericRedemptionCode
  • attributes.couponValueType
  • attributes.productApplicability
  • attributes.promotionEffectiveTimePeriod.endTime
  • attributes.promotionEffectiveTimePeriod.startTime
  • attributes.longTitle

‫Google בודקת ומאשרת את המבצעים לפני שהיא מפרסמת אותם. מידע נוסף זמין במאמר בנושא תהליך האישור של מבצעים.

מומלץ לעיין במדיניות בנושא מבצעים כדי לוודא שהמבצעים שאתם יוצרים מוסיפים ערך ועומדים בדרישות המדיניות בנושא מודעות שופינג.

הבקשה הבאה מדגימה איך ליצור מבצע אונליין:

HTTP

POST https://merchantapi.googleapis.com/promotions/v1/accounts/{ACCOUNT_ID}/promotions:insert

{
"promotion": {
  "name": "{PROMOTION_NAME}",
  "promotionId": "{PROMOTION_ID}",
  "targetCountry": "{TARGET_COUNTRY}",
  "redemptionChannel": [
    "ONLINE"
  ],
  "contentLanguage": "{CONTENT_LANGUAGE}",
  "attributes": {
    "promotionDisplayTimePeriod": {
      "endTime": "{PROMOTION_END_TIME}",
      "startTime": "{PROMOTION_START_TIME}"
    },
    "offerType": "{OFFER_TYPE}",
    "longTitle": "{LONG_TITLE}"
  }
},
"dataSource": "accounts/{ACCOUNT_ID}/dataSources/{DATASOURCE_ID}"
}

cURL

  curl --request POST \
'https://merchantapi.googleapis.com/promotions/v1/accounts/{ACCOUNT_ID}/promotions:insert?key=[YOUR_API_KEY]' \
--header 'Authorization: Bearer [YOUR_ACCESS_TOKEN]' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{"dataSource":"{DATASOURCE_ID}","promotion":{"name":"accounts/{ACCOUNT_ID}/promotions/{PROMOTION_ID}y","promotionId":"abc","contentLanguage":"en","targetCountry":"US","redemptionChannel":["ONLINE"]}}' \
--compressed

מידע על הכללים שחלים על הגדרת מזהה המבצע זמין במאמר הדרישות המינימליות למאפיין מזהה המבצע.

הערכים החוקיים לשדה החובה offerType הם NO_CODE ו-GENERIC_CODE. אם לא תספקו אחד מהערכים האלה, בקשת ה-API תיכשל עם תשובת HTTP 400 [offer_type] validation/missing_required: Invalid or missing required attribute: offer_type. אם לא תספקו אף אחד משדות החובה, תוחזר הודעת שגיאה דומה.

אם לא תציינו ערך בשדה attributes.genericRedemptionCode, הבקשה תיכשל עם תגובת HTTP 400 [genericRedemptionCode] No redemption code provided.

הערכים בשדות promotion.attributes.promotionDisplayTimePeriod.startTime ו-promotion.attributes.promotionDisplayTimePeriod.endTime צריכים להיות בפורמט yyyy-mm-ddThh:mm:ssZ. חשוב להקפיד להחליף את הערכים בשדות האלה בתאריכים עתידיים.

מידע נוסף זמין במאמר מפרט נתוני המבצעים.

במאמר שיטות מומלצות לקידום מכירות מוסבר איך ליצור מבצעים בצורה הכי טובה.

רשימה של מאפיינים שקשורים למבצעים זמינה במאמר בנושא הוספה של מאפיינים של נתונים מובְנים.

אחרי שהבקשה ליצירת מבצע מופעלת בהצלחה, יכולות לעבור כמה דקות עד שאפשר לאחזר את המבצע באמצעות ה-API או עד שהוא מופיע ב-Merchant Center.

הנה דוגמה שאפשר להשתמש בה כדי להוסיף כמה מבצעים באופן אסינכרוני:

Java

import com.google.api.core.ApiFuture;
import com.google.api.core.ApiFutureCallback;
import com.google.api.core.ApiFutures;
import com.google.api.gax.core.FixedCredentialsProvider;
import com.google.auth.oauth2.GoogleCredentials;
import com.google.common.util.concurrent.MoreExecutors;
import com.google.protobuf.Timestamp;
import com.google.shopping.merchant.promotions.v1.Attributes;
import com.google.shopping.merchant.promotions.v1.CouponValueType;
import com.google.shopping.merchant.promotions.v1.InsertPromotionRequest;
import com.google.shopping.merchant.promotions.v1.OfferType;
import com.google.shopping.merchant.promotions.v1.ProductApplicability;
import com.google.shopping.merchant.promotions.v1.Promotion;
import com.google.shopping.merchant.promotions.v1.PromotionsServiceClient;
import com.google.shopping.merchant.promotions.v1.PromotionsServiceSettings;
import com.google.shopping.merchant.promotions.v1.RedemptionChannel;
import com.google.shopping.type.CustomAttribute;
import com.google.shopping.type.Destination.DestinationEnum;
import com.google.type.Interval;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
import java.util.stream.Collectors;
import shopping.merchant.samples.utils.Authenticator;
import shopping.merchant.samples.utils.Config;

/** This class demonstrates how to insert multiple promotions asynchronously. */
public class InsertPromotionsAsyncSample {

  private static String generateRandomString() {
    String characters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
    Random random = new Random();
    StringBuilder sb = new StringBuilder(8);
    for (int i = 0; i < 8; i++) {
      sb.append(characters.charAt(random.nextInt(characters.length())));
    }
    return sb.toString();
  }

  private static Promotion createPromotion(String accountId) {
    String merchantPromotionId = generateRandomString();

    Attributes attributes =
        Attributes.newBuilder()
            .setProductApplicability(ProductApplicability.ALL_PRODUCTS)
            .setOfferType(OfferType.GENERIC_CODE)
            .setGenericRedemptionCode("ABCD1234")
            .setLongTitle("My promotion")
            .setCouponValueType(CouponValueType.PERCENT_OFF)
            .addPromotionDestinations(DestinationEnum.SHOPPING_ADS)
            .setPercentOff(10)
            // Note that promotions have a 6-month limit.
            // For more information, read here: https://support.google.com/merchants/answer/2906014
            // Also note that only promotions valid within the past 365 days are shown in the UI.
            .setPromotionEffectiveTimePeriod(
                Interval.newBuilder()
                    .setStartTime(Timestamp.newBuilder().setSeconds(1726842472))
                    .setEndTime(Timestamp.newBuilder().setSeconds(1726842473))
                    .build())
            .build();

    return Promotion.newBuilder()
        .setName(String.format("accounts/%s/merchantPromotions/%s", accountId, merchantPromotionId))
        .setPromotionId(merchantPromotionId)
        .setContentLanguage("fr")
        .setTargetCountry("CH")
        .addRedemptionChannel(RedemptionChannel.ONLINE)
        .setAttributes(attributes)
        // Custom attributes allow you to add additional information which is not available in
        // Attributes. For example, you might want to pilot experimental functionality.
        .addCustomAttributes(
            CustomAttribute.newBuilder()
                .setName("another example name")
                .setValue("another example value")
                .build())
        .build();
  }

  public static void asyncInsertPromotions(String accountId, String dataSourceId) throws Exception {
    GoogleCredentials credential = new Authenticator().authenticate();

    PromotionsServiceSettings merchantPromotionsServiceSettings =
        PromotionsServiceSettings.newBuilder()
            .setCredentialsProvider(FixedCredentialsProvider.create(credential))
            .build();

    try (PromotionsServiceClient merchantPromotionsServiceClient =
        PromotionsServiceClient.create(merchantPromotionsServiceSettings)) {

      // Arbitrarily creates five merchant promotions with random IDs.
      List<InsertPromotionRequest> requests = new ArrayList<>();
      for (int i = 0; i < 5; i++) {
        InsertPromotionRequest request =
            InsertPromotionRequest.newBuilder()
                .setParent(String.format("accounts/%s", accountId))
                .setPromotion(createPromotion(accountId))
                .setDataSource(String.format("accounts/%s/dataSources/%s", accountId, dataSourceId))
                .build();
        requests.add(request);
      }

      // Inserts the merchant promotions.
      List<ApiFuture<Promotion>> futures =
          requests.stream()
              .map(
                  request ->
                      merchantPromotionsServiceClient.insertPromotionCallable().futureCall(request))
              .collect(Collectors.toList());

      // Creates callback to handle the responses when all are ready.
      ApiFuture<List<Promotion>> responses = ApiFutures.allAsList(futures);
      ApiFutures.addCallback(
          responses,
          new ApiFutureCallback<List<Promotion>>() {
            @Override
            public void onSuccess(List<Promotion> results) {
              System.out.println("Inserted merchant promotions below:");
              System.out.println(results);
            }

            @Override
            public void onFailure(Throwable throwable) {
              System.out.println(throwable);
            }
          },
          MoreExecutors.directExecutor());
    } catch (Exception e) {
      System.out.println(e);
    }
  }


  public static void main(String[] args) throws Exception {
    Config config = Config.load();
    asyncInsertPromotions(config.getAccountId().toString(), "<YOUR_DATA_SOURCE_ID>");
  }
}

הנה כמה דוגמאות למבצעים שתוכלו להשתמש בהם כדי להתחיל.

מבצע על כל המוצרים בכל החנויות המקומיות

בדוגמה הבאה של בקשה אפשר לראות איך יוצרים מבצע על מוצרים בחנויות מקומיות שרלוונטי לכל המוצרים בחשבון Merchant Center ולכל החנויות שנוספו לחשבון פרופיל העסק המקושר.

POST https://merchantapi.googleapis.com/promotions/v1/accounts/{ACCOUNT_ID}/promotions:insert

{
  "promotion": {
    "promotionId": "buy_2_get_10_off",
    "contentLanguage": "en",
    "targetCountry": "US",
    "redemptionChannel": [
      "IN_STORE"
    ],
    "attributes": {
      "longTitle": "Buy 2 and get 10$ OFF purchase",
      "productApplicability": "ALL_PRODUCTS",
      "offerType": "NO_CODE",
      "couponValueType": "BUY_M_GET_MONEY_OFF",
      "promotionDisplayTimePeriod": {
        "startTime": "2024-2-06T00:47:44Z",
        "endTime": "2024-5-06T00:47:44Z"
      },
      "promotionEffectiveTimePeriod": {
        "startTime": "2024-2-06T00:47:44Z",
        "endTime": "2024-5-06T00:47:44Z"
      },
      "moneyOffAmount": {
        "amountMicros": "1000000",
        "currencyCode": "USD"
      },
      "minimumPurchaseQuantity": 2,
      "storeApplicability": "ALL_STORES",
      "promotionUrl": "http://promotionnew4url.com/",
      "promotionDestinations": [
        "LOCAL_INVENTORY_ADS"
      ],
    }
  },
  "dataSource": "accounts/{ACCOUNT_ID}/dataSources/{DATASOURCE_ID}"
}

השדה productApplicability הוא חובה. המאפיין הזה מציין אם המבצע חל על כל המוצרים או רק על מוצרים ספציפיים. הערכים הנתמכים הם ALL_PRODUCTS ו-SPECIFIC_PRODUCTS. מידע נוסף זמין במאמר בנושא בחירת מוצרים למבצע.

השדה couponValueType הוא חובה. הוא מציין את סוג המבצע שאתם מפעילים. רשימת הערכים הנתמכים מפורטת במאמר בנושא סוג ערך השובר. בהתאם לסוג ערך השובר שבחרתם, חלק מהמאפיינים הם חובה.

בשדה minimumPurchaseQuantity מגדירים את הערך של כמות הרכישה המינימלית שנדרשת למימוש המבצע. מידע נוסף זמין במאמר בנושא כמות רכישה מינימלית למימוש המבצע.

באופן דומה, אפשר להשתמש בשדה minimumPurchaseAmount כדי להגדיר את סכום הרכישה המינימלי שנדרש למימוש המבצע. מידע נוסף זמין במאמר בנושא סכום רכישה מינימלי.

מידע נוסף על הערכים שצריך לספק כדי ליצור מבצע על מוצרים בחנויות מקומיות זמין במאמר מפרט מקור הנתונים לקידום של מוצרים בחנויות מקומיות.

מבצע באינטרנט שחל על מוצרים נבחרים עם קוד מימוש

בדוגמת הבקשה הבאה אפשר לראות איך יוצרים מבצע אונליין שחל על מוצרים נבחרים עם קוד מימוש.

POST https://merchantapi.googleapis.com/promotions/v1/accounts/{ACCOUNT_ID}/promotions:insert

{
 "promotion": {
   "promotionId": "25_pct_off",
   "contentLanguage": "en",
   "targetCountry": "US",
   "redemptionChannel": [
     "ONLINE"
   ],
   "attributes": {
     "longTitle": "10% off on selected items",
     "productApplicability": "SPECIFIC_PRODUCTS",
     "offerType": "GENERIC_CODE",
     "genericRedemptionCode": "SPRINGSALE",
     "couponValueType": "PERCENT_OFF",
     "promotionDisplayTimePeriod": {
       "startTime": "2024-2-06T00:47:44Z",
       "endTime": "2024-5-06T00:47:44Z"
     },
     "promotionEffectiveTimePeriod": {
       "startTime": "2024-2-06T00:47:44Z",
       "endTime": "2024-5-06T00:47:44Z"
     },
     "percentOff": 25,
     "promotionDestinations": [
       "FREE_LISTINGS"
     ],
     "itemIdInclusion": [
       "1499860100",
       "1499860101",
       "1499860102",
       "1499860103",
       "1499860104"
     ],
   }
 },
 "dataSource": "accounts/{ACCOUNT_ID}/dataSources/1000000573361824"
}

צפייה בקידומי המכירות

כדי להציג מבצע, משתמשים ב-accounts.promotions.get. הבקשה הזו של GET היא לקריאה בלבד. צריך להזין את merchantId ואת מזהה המבצע. השיטה GET מחזירה את משאב המבצעים המתאים.

לדוגמה:

HTTP

GET https://merchantapi.googleapis.com/promotions/v1/accounts/{ACCOUNT_ID}/promotions/{PROMOTION_ID}

cURL

  curl \
   'https://merchantapi.googleapis.com/promotions/v1/accounts/{ACCOUNT_ID}/promotions/{PROMOTION_ID}?key=[YOUR_API_KEY]' \
   --header 'Authorization: Bearer [YOUR_ACCESS_TOKEN]' \
   --header 'Accept: application/json' \
   --compressed

מחליפים את מה שכתוב בשדות הבאים:

  • {ACCOUNT_ID}: המזהה הייחודי של חשבון Merchant Center.
  • {PROMOTION_ID}: המזהה הייחודי של המבצע שרוצים לאחזר. הפורמט הוא {CHANNEL} ~{CONTENT_LANGUAGE}~ {TARGET_COUNTRY}~{PROMOTION_ID} .

שימו לב: עוברות כמה דקות עד שאפשר לאחזר מבצע חדש שנוצר באמצעות ה-API.

איך צופים בקידום של מוצרים בחנויות מקומיות

בדוגמה הבאה מוצגת בקשה לאחזור מבצע על מוצרים בחנויות מקומיות, שמזהה המבצע שלו הוא in_store~en~US~buy_2_get_10_off.

GET https://merchantapi.googleapis.com/promotions/v1/accounts/{ACCOUNT_ID}/promotions/in_store~en~US~buy_2_get_10_off

אחרי שהבקשה תצליח, תופיע התגובה הבאה:

{
 "name": "accounts/{ACCOUNT_ID}/promotions/in_store~en~US~buy_2_get_10_off",
 "promotionId": "buy_2_get_10_off",
 "contentLanguage": "en",
 "targetCountry": "US",
 "redemptionChannel": [
   "IN_STORE"
 ],
 "attributes": {
   "longTitle": "Buy 2 and get 10$ OFF purchase",
   "productApplicability": "ALL_PRODUCTS",
   "offerType": "NO_CODE",
   "couponValueType": "BUY_M_GET_MONEY_OFF",
   "promotionDisplayTimePeriod": {
     "startTime": "2024-2-06T00:47:44Z",
     "endTime": "2024-5-06T00:47:44Z"
   },
   "promotionEffectiveTimePeriod": {
     "startTime": "2024-2-06T00:47:44Z",
     "endTime": "2024-5-06T00:47:44Z"
   },
   "moneyOffAmount": {
     "amountMicros": "1000000",
     "currencyCode": "USD"
   },
   "minimumPurchaseQuantity": 2,
   "storeApplicability": "ALL_STORES",
   "promotionUrl": "http://promotionnew4url.com/",
   "promotionDestinations": [
     "LOCAL_INVENTORY_ADS"
   ],
 }
 "dataSource": "accounts/{ACCOUNT_ID}/dataSources/1000000573361824"
}

השדה moneyOffAmount בדוגמה הזו מציין את ההנחה שמוצעת במבצע. מידע נוסף זמין במאמר בנושא סכום ההנחה הכספית של מבצע.

בשדה promotionUrl בדוגמה הזו מופיע הקישור לאתר של החנות, שבו הקונים יכולים למצוא מידע נוסף על המבצע. אם לא כוללים את השדה promotionUrl במבצעים של מודעות מלאי של חנויות מקומיות, המערכת מחזירה שגיאה.

צפייה במבצע אונליין

בדוגמה הבאה מוצגת בקשה לאחזור מבצע אונליין שמזהה המבצע שלו הוא online~en~US~25_pct_off.

GET https://merchantapi.googleapis.com/promotions/v1/accounts/{ACCOUNT_ID}/promotions/online~en~US~25_pct_off
{
 "name": "accounts/{ACCOUNT_ID}/promotions/online~en~US~25_pct_off",
 "promotionId": "25_pct_off",
 "contentLanguage": "en",
 "targetCountry": "US",
 "redemptionChannel": [
   "ONLINE"
 ],
 "attributes": {
   "longTitle": "10% off on selected items",
   "productApplicability": "SPECIFIC_PRODUCTS",
   "offerType": "GENERIC_CODE",
   "genericRedemptionCode": "WINTERGIFT",
   "couponValueType": "PERCENT_OFF",
   "promotionDisplayTimePeriod": {
     "startTime": "2024-2-06T00:47:44Z",
     "endTime": "2024-5-06T00:47:44Z"
   },
   "promotionEffectiveTimePeriod": {
     "startTime": "2024-2-06T00:47:44Z",
     "endTime": "2024-5-06T00:47:44Z"
   },
   "percentOff": 25,
   "promotionDestinations": [
     "FREE_LISTINGS"
   ],
   "itemIdInclusion": [
     "1499860100",
     "1499860101",
     "1499860102",
     "1499860103",
     "1499860104"
   ],
 }
 "dataSource": "accounts/{ACCOUNT_ID}/dataSources/{dataSource}"
}

בשדה itemIdInclusion שמופיע בדוגמה הזו מצוינים המוצרים שמשתתפים במבצע. מידע נוסף זמין במאמר בנושא מזהה מוצר במבצע.

הצגת רשימת מבצעים

אפשר להשתמש בשיטה promotions.list כדי לראות את כל המבצעים שנוצרו.

הנה דוגמה לבקשה:

HTTP

GET https://merchantapi.googleapis.com/promotions/v1/{ACCOUNT_ID}/promotions

cURL

  curl \
   'https://merchantapi.googleapis.com/promotions/v1/accounts/{ACCOUNT_ID}/promotions?key=[YOUR_API_KEY]' \
   --header 'Authorization: Bearer [YOUR_ACCESS_TOKEN]' \
   --header 'Accept: application/json' \
   --compressed

התשובה מכילה את רשימת כל המבצעים בחשבון שלכם. לכל מבצע אפשר לראות פרטים כמו promotionId, redemptionChannel, dataSource, promotionStatus ועוד.

הצגת הסטטוס של מבצע

כדי לראות את הסטטוס של מבצע, צריך לעיין במאפיין promotionStatus שמוחזר על ידי השיטה promotions.get או promotions.list.

השדה promotionStatus יכול לקבל את הערכים הבאים:

  • IN_REVIEW: המבצע עדיין בבדיקה.
  • REJECTED: המבצע לא אושר.
  • LIVE: המבצע אושר ופעיל.
  • STOPPED: המבצע הופסק על ידי החשבון.
  • EXPIRED: המבצע כבר לא פעיל.
  • PENDING: המבצע לא הופסק, וכל הבדיקות אושרו, אבל תאריך ההפעלה הוא בעתיד.
  • STATE_UNSPECIFIED: מצב לא ידוע של מבצע.

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

דוגמה לסטטוס מבצע

בדוגמאות הבאות אפשר לראות את ההבדל בין בקשות שהצליחו לבין בקשות שנכשלו.

חסר מיפוי מוצרים

בדוגמה הבאה של גוף התשובה מוצג קידום מכירות אונליין שנפסל בגלל מיפוי מוצרים חסר.

  "promotionStatus": {
    "destinationStatuses": [
      {
        "reportingContext": "FREE_LISTINGS",
        "status": "REJECTED"
      }
    ],
    "itemLevelIssues": [
      {
        "code": "promotion_sku_unmapped",
        "severity": "DISAPPROVED",
        "resolution": "merchant_action",
        "reportingContext": "FREE_LISTINGS",
        "description": "Unmapped",
        "detail": "This promotion couldn't be tested during review because it doesn't apply to any products that are currently in your Products feed",
        "documentation": "https://support.google.com/merchants/answer/2906014",
        "applicableCountries": [
          "US"
        ]
      },
      {
        "code": "promotion_sku_additional_requirements",
        "severity": "DISAPPROVED",
        "resolution": "merchant_action",
        "reportingContext": "FREE_LISTINGS",
        "description": "Promotion conditions not allowed",
        "detail": "This promotion has additional requirements that are not allowed such as requiring customers to verify additional details like phone number or ID before showing the promotion details",
        "documentation": "https://support.google.com/merchants/answer/2906014",
        "applicableCountries": [
          "US"
        ]
      }
    ]
  }

כדי לפתור בעיות במבצעים שנפסלו וללמוד איך למנוע פסילות בעתיד, אפשר לעיין במאמר פתרון בעיות במבצעים שנפסלו.

אם מבצע שיצרתם לא אושר, תקבלו אימייל עם הסיבה לדחייה והוראות לפתרון הבעיות.

המבצע בבדיקה

גוף התגובה הבא מציג מבצע שעדיין נמצא בתהליך הערכה.

  "promotionStatus": {
    "destinationStatuses": [
      {
        "reportingContext": "FREE_LISTINGS",
        "status": "PENDING"
      },
      {
        "destination": "SHOPPING_ADS",
        "status": "PENDING"
      }
    ],
    "itemLevelIssues": []
  }

מבצע שאושר ופעיל

גוף התגובה הבא מציג מבצע שגלוי לקונים.

  "promotionStatus": {
    "destinationStatuses": [
      {
        "reportingContext": "FREE_LISTINGS",
        "status": "LIVE"
      },
      {
        "destination": "SHOPPING_ADS",
        "status": "LIVE"
 }  ],
    "itemLevelIssues": []
  }

מידע נוסף זמין במאמר שאלות נפוצות על סטטוס המבצע.

מחיקת מבצעים

אי אפשר למחוק מבצע באמצעות ה-API. כדי למחוק מבצע, צריך לגשת לממשק המשתמש של Merchant Center. מידע נוסף זמין במאמר עריכת מבצע או שינוי סטטוס מבצע.

כדי לסיים מבצע קיים, אפשר להשתמש בשיטה accounts.promotions.insert כדי לעדכן את השדה attributes.promotionEffectiveTimePeriod.endTime לשעה בעבר.

מידע נוסף