Để thảo luận và đưa ra ý kiến phản hồi về các sản phẩm của chúng tôi, hãy tham gia kênh Discord chính thức của Google Ads trong máy chủ Cộng đồng quảng cáo và đo lường của Google.
Nếu có bất kỳ thao tác nào trong một công việc hàng loạt có chứa tiêu chí nhóm quảng cáo hoặc bộ lọc nhóm trang thông tin của nhóm tài sản, thì các thao tác trong công việc hàng loạt sẽ được chia thành nhiều nhóm con khi được máy chủ Google Ads API nhận. Xin lưu ý rằng không giống như các thao tác tiêu chuẩn trong một lô công việc, mỗi lô con chứa các thao tác lọc nhóm trang thông tin đều được xử lý một cách riêng lẻ.
Cách chia các lô công việc có chứa bộ lọc nhóm trang thông tin thành các lô phụ được xác định bằng các yếu tố sau:
Loại bộ lọc nhóm trang thông tin
AdGroupCriterion hoặc AssetGroup mà bộ lọc nhóm trang thông tin đang nhắm đến
Tất cả các thao tác AdGroupCriterionOperation liên tiếp có chứa một listing_group nhắm đến cùng một AdGroup sẽ được nhóm lại với nhau trong một lô con nguyên tử (không có hành vi thất bại một phần).
Tất cả các thao tác liên tiếp khác được nhóm lại với nhau trong các lô con không phải là lô con nguyên tử (hành vi thất bại một phần).
Sơ đồ sau đây minh hoạ khái niệm này. Mỗi hộp màu xám đại diện cho một lô công việc được gửi bằng API Google Ads. Trong các hộp màu xám, các thao tác riêng lẻ được nhóm theo màu để biểu thị các lô phụ mà máy chủ Google Ads API tạo. Thứ tự của các thao tác trong mỗi hộp màu xám tương ứng với thứ tự mà các thao tác sẽ được thêm vào lệnh hàng loạt.
Các điểm hạn chế
Khi làm việc với bộ lọc nhóm trang thông tin trong bối cảnh của các thao tác hàng loạt, bạn phải tuân thủ những giới hạn sau:
Một lô gồm AssetGroupListingGroupFilterOperation thao tác chứa listing_group và nhắm đến cùng một AdGroup không được vượt quá 20.000 thao tác. Tuy nhiên, bạn không nên vượt quá 10.000 thao tác.
Một lô gồm các thao tác AssetGroupListingGroupFilterOperation nhắm đến cùng một AssetGroup không được vượt quá 10.000 thao tác.
Nếu vi phạm một trong hai điều kiện này, toàn bộ công việc hàng loạt sẽ thất bại.
Khắc phục sự cố
Các thao tác lọc nhóm trang thông tin trong một công việc hàng loạt được xử lý dưới dạng một giao dịch. Điều này có thể dẫn đến các trường hợp mà nhiều thao tác không thành công do một số ít thao tác sai. Hơn nữa, do cách xử lý các thao tác BatchJob, nguyên nhân gốc của các lỗi có thể xuất hiện ở chỉ mục trước hoặc sau các lỗi hạ lưu.
Ví dụ: khi xử lý một phản hồi từ ListBatchJobResults, bạn có thể thấy rằng một số thao tác không thành công kèm theo thông báo trạng thái Ad group is invalid due to the listing
groups it contains. Thông báo này thường cho biết rằng thao tác tại chỉ mục này đã bị huỷ do một thao tác không thành công tại một chỉ mục khác. Để xác định nguyên nhân gốc rễ của vấn đề, bạn nên lặp lại tất cả thông báo trạng thái trong BatchJobResult – trước và sau chỉ mục của thông báo lỗi Ad group is invalid – để tìm thêm thông tin về lỗi.
[[["Dễ hiểu","easyToUnderstand","thumb-up"],["Giúp tôi giải quyết được vấn đề","solvedMyProblem","thumb-up"],["Khác","otherUp","thumb-up"]],[["Thiếu thông tin tôi cần","missingTheInformationINeed","thumb-down"],["Quá phức tạp/quá nhiều bước","tooComplicatedTooManySteps","thumb-down"],["Đã lỗi thời","outOfDate","thumb-down"],["Vấn đề về bản dịch","translationIssue","thumb-down"],["Vấn đề về mẫu/mã","samplesCodeIssue","thumb-down"],["Khác","otherDown","thumb-down"]],["Cập nhật lần gần đây nhất: 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."]]