אם יש פעולות בעבודת אצווה שמכילות קריטריונים של קבוצת מודעות או מסננים של קבוצת נכסים של קבוצת כרטיסי מוצר, הפעולות בעבודת האצווה מפולחות לתת-אצוות מרובות כשהן מתקבלות על ידי שרת Google Ads API. הערה: בניגוד לפעולות רגילות בעבודת אצווה, כל אצווה משנית שמכילה פעולות סינון של קבוצות כרטיסי מוצר נחשבת לאטומית.
הדרך שבה עבודות באצווה שמכילות מסננים של קבוצות של כרטיסי מוצר מפולגות לאצוות משנה נקבעת לפי הגורמים הבאים:
סוג המסנן של קבוצת כרטיסי המוצר
המסנן של קבוצת כרטיסי המוצר מטרגט את AdGroupCriterion או את AssetGroup
כל הפעולות הרצופות של AdGroupCriterionOperation
שכוללות listing_group שמטרגטות את אותו AdGroup מקובצות יחד בתת-חבילה אטומית (ללא התנהגות של כשל חלקי).
כל שאר הפעולות הרצופות מקובצות יחד בחבילות משנה לא אטומיות (התנהגות של כשל חלקי).
התרשים הבא ממחיש את הרעיון הזה. כל אחת מהתיבות האפורות מייצגת עבודת אצווה שנשלחה באמצעות Google Ads API. בתוך התיבות האפורות, הפעולות השונות מקובצות לפי צבע כדי לייצג את קבוצות המשנה שמערכת Google Ads API יוצרת. הסדר של הפעולות בכל אחת מהתיבות האפורות תואם לסדר שבו הפעולות היו מתווספות לעבודת האצווה.
מגבלות
כשעובדים עם מסננים של קבוצות כרטיסי מוצר בהקשר של משימות אצווה, חלות המגבלות הבאות:
אורך של אצווה אחת של AssetGroupListingGroupFilterOperation פעולות שמכילה listing_group ומכוונת לאותו AdGroup לא יכול להיות יותר מ-20,000 פעולות. עם זאת, מומלץ לא לחרוג מ-10,000 פעולות.
אפשר לבצע עד 10,000 פעולות באותו AssetGroup באותו אצווה של AssetGroupListingGroupFilterOperation פעולות.
הפרה של אחד מהתנאים האלה גורמת לכך שכל העבודה של אצווה תיכשל.
פתרון בעיות
פעולות סינון של קבוצות כרטיסי מוצר בעבודת אצווה מעובדות כטרנזקציה אחת, מה שעלול להוביל לתרחישים שבהם הרבה פעולות נכשלות בגלל מספר קטן של פעולות שגויות. בנוסף, בגלל האופן שבו מעובדות פעולות BatchJob, יכול להיות שהגורם הבסיסי לכשלים יופיע באינדקס לפני או אחרי הכשלים במורד הזרם.
לדוגמה, כשמעבדים תגובה מ-ListBatchJobResults, יכול להיות שחלק מהפעולות ייכשלו עם הודעת סטטוס, Ad group is invalid due to the listing
groups it contains. ההודעה הזו בדרך כלל מציינת שהפעולה באינדקס הזה בוטלה בגלל פעולה שנכשלה באינדקס אחר. כדי לזהות את שורש הבעיה, מומלץ לעבור על כל הודעות הסטטוס בBatchJobResult – לפני ואחרי האינדקס של הודעת השגיאה Ad group is invalid – כדי למצוא מידע נוסף על השגיאה.
[[["התוכן קל להבנה","easyToUnderstand","thumb-up"],["התוכן עזר לי לפתור בעיה","solvedMyProblem","thumb-up"],["סיבה אחרת","otherUp","thumb-up"]],[["חסרים לי מידע או פרטים","missingTheInformationINeed","thumb-down"],["התוכן מורכב מדי או עם יותר מדי שלבים","tooComplicatedTooManySteps","thumb-down"],["התוכן לא עדכני","outOfDate","thumb-down"],["בעיה בתרגום","translationIssue","thumb-down"],["בעיה בדוגמאות/בקוד","samplesCodeIssue","thumb-down"],["סיבה אחרת","otherDown","thumb-down"]],["עדכון אחרון: 2025-09-05 (שעון UTC)."],[[["\u003cp\u003eWhen using listing group filters in batch jobs, operations are split into sub-batches based on the type of filter, target (AdGroup or AssetGroup), and order of operations.\u003c/p\u003e\n"],["\u003cp\u003eConsecutive operations targeting the same AdGroup or AssetGroup are grouped into atomic sub-batches, ensuring all operations within the sub-batch either succeed or fail together.\u003c/p\u003e\n"],["\u003cp\u003eOther consecutive operations are grouped into non-atomic sub-batches, allowing for partial failures where some operations may succeed while others fail.\u003c/p\u003e\n"],["\u003cp\u003eBatch jobs containing listing group filters have limitations on the number of operations allowed per batch to avoid failures, with recommendations to stay well below the maximum limits.\u003c/p\u003e\n"],["\u003cp\u003eIt is recommended to add operations targeting the same AdGroup or AssetGroup consecutively in a batch job for atomic processing during batch splitting.\u003c/p\u003e\n"]]],[],null,["# Listing group filters in batch jobs\n\nWhen you work with listing group filters in the context of an\n[`AdGroupCriterion.listing_group`](/google-ads/api/reference/rpc/v21/AdGroupCriterion#listing_group)\nor an\n[`AssetGroupListingGroupFilter`](/google-ads/api/reference/rpc/v21/AssetGroupListingGroupFilter),\ntake the following considerations into account when designing your integration.\n\nBatch splitting\n---------------\n\n| **Key Point:** We recommend adding `AssetGroupListingGroupFilterOperation` operations targeting the same `AssetGroup`, and `AdGroupCriterionOperation` operations containing a `listing_group` that targets the same `AdGroup`, to a batch job consecutively, so that the set of operations are treated atomically during batch splitting.\n\nIf there are any operations in a batch job that contain ad group criteria or\nasset group listing group filters, the operations in the batch job are split\ninto multiple *sub-batches* when received by the Google Ads API server. Note that\nunlike standard operations in a batch job, each sub-batch containing listing\ngroup filter operations is treated atomically.\n\nThe way in which batch jobs containing listing group filters are split into\nsub-batches is determined by the following factors:\n\n1. Type of listing group filter\n2. The `AdGroupCriterion` or `AssetGroup` the listing group filter is targeting\n3. Order of operations\n\nConsider how operations are grouped:\n\n- All consecutive [`AssetGroupListingGroupFilterOperation`](/google-ads/api/reference/rpc/v21/AssetGroupListingGroupFilterOperation) operations targeting the same [`AssetGroup`](/google-ads/api/reference/rpc/v21/AssetGroup) are grouped together in an atomic sub-batch (no partial failure behavior).\n- All consecutive [`AdGroupCriterionOperation`](/google-ads/api/reference/rpc/v21/AdGroupCriterionOperation) operations that contain a `listing_group` targeting the same [`AdGroup`](/google-ads/api/reference/rpc/v21/AdGroup) are grouped together in an atomic sub-batch (no partial failure behavior).\n- All other consecutive operations are grouped together in non-atomic sub-batches (partial failure behavior).\n\n| **Key Term:** **Consecutive** refers to the order of the operations in the batch job.\n\nThe following diagram illustrates this concept. Each of the gray boxes\nrepresents a batch job as submitted using the Google Ads API. Within the gray boxes,\nthe individual operations are grouped by color to represent the sub-batches that\nthe Google Ads API server creates. The order of the operations in each of the gray\nboxes corresponds to the order in which the operations would have been added to\nthe batch job.\n\nLimitations\n-----------\n\nWhen working with listing group filters in the context of batch jobs, the\nfollowing limitations apply:\n\n- A single batch of `AssetGroupListingGroupFilterOperation` operations containing a `listing_group` and targeting the same `AdGroup` cannot exceed 20,000 operations in length. However, it is recommended not to exceed 10,000 operations.\n- A single batch of `AssetGroupListingGroupFilterOperation` operations targeting the same `AssetGroup` cannot exceed 10,000 operations.\n- Violating either of these conditions results in the entire batch job failing.\n\nTroubleshooting\n---------------\n\nListing group filter operations in a batch job are processed as one transaction,\nwhich can lead to scenarios where many operations fail due to a small number of\nerroneous operations. Further, because of the way `BatchJob` operations are\nprocessed, the root cause of the failures may appear at an index before or after\nthe downstream failures.\n\nFor example, when processing a response from [`ListBatchJobResults`](/google-ads/api/reference/rpc/v21/BatchJobService#listbatchjobresults), you may find that several\noperations failed with a status message, `Ad group is invalid due to the listing\ngroups it contains`. This message typically indicates that the operation at this\nindex was cancelled because of a failed operation at a different index. To\nidentify the root cause of the issue, we recommend iterating through all status\nmessages in the [`BatchJobResult`](/google-ads/api/reference/rpc/v21/BatchJobResult)---before\nand after the index of the `Ad group is invalid` error message---in search\nof additional error information."]]