المعالجة المجمّعة لـ "حملات الأداء الأفضل"
تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
توفّر المعالجة المجمّعة طريقة لإرسال مجموعة من العمليات، التي قد تكون مترابطة، إلى خدمات متعددة بدون انتظار اكتمال العمليات بشكل متزامن. يمكنك استخدام المعالجة المجمّعة لإنشاء "حملات الأداء الأفضل" وإدارتها.
يقدّم هذا الدليل تفاصيل خاصة بـ "حملات الأداء الأفضل" عند استخدام المعالجة المجمّعة. يقدّم دليل المعالجة المجمّعة العام معلومات عامة حول المعالجة المجمّعة، ويتضمّن دليل طلبات البنية معلومات تفصيلية حول إنشاء الطلبات أو إدارتها لإنشاء "حملات الأداء الأفضل".
لإنشاء "حملة أداء أفضل" باستخدام المعالجة المجمّعة، اتّبِع الخطوات التالية:
إنشاء مهمة معالجة مجمّعة جديدة
اتّبِع خطوة إنشاء مهمة المعالجة العامة للدُفعات لإنشاء مورد BatchJob
.
إعداد قائمة بعمليات التعديل
تتطلّب "حملات الأداء الأفضل" عمليات لإنشاء العديد من المراجع ذات الصلة، والتي يتم تفصيلها في دليل طلبات البنية. أنشئ MutateOperation
لكل مرجع يجب تضمينه في مهمة المعالجة المجمّعة.
متطلبات CampaignOperation
وCampaignAssetOperation
عند تفعيل إرشادات بناء هوية العلامة التجارية لإحدى الحملات (راجِع إرشادات بناء هوية العلامة التجارية)، عليك ربط مواد عرض العلامة التجارية بالحملة باستخدام موارد CampaignAsset
. بالإضافة إلى ذلك، في مهمة مجمّعة، يجب إنشاء موارد CampaignAsset
هذه مباشرةً بعد إنشاء مورد Campaign
نفسه. إذا لم يتم إنشاء موارد CampaignAsset
مباشرةً بعد إنشاء مورد Campaign
(عند تفعيل إرشادات العلامة التجارية، يُرجى الاطّلاع على تحديد المشاكل وحلّها)، سيتعذّر تنفيذ الطلب وسيتم عرض الرمز CampaignError
للإشارة إلى مواد العرض غير المتوفّرة.
لن يؤدي تضمين عمليات إنشاء CampaignAsset
لاحقًا في قائمة العمليات نفسها إلى منع حدوث هذا الخطأ.
متطلبات AssetGroupOperation
وAssetGroupAssetOperation
يجب أن تكون العمليات من النوع MutateOperation
التي تنشئ موارد AssetGroup
وAssetGroupAsset
في مهمة مجمّعة متسلسلة بدون عمليات أخرى بينها، وذلك بسبب طريقة تجميع هذه العمليات معًا عند معالجتها. بخلاف ذلك، سيعرض الطلب
AssetGroupError
للإشارة إلى أنّ بعض مواد العرض غير متوفّرة،
حتى إذا كانت العمليات المطلوبة
لتلبية الحد الأدنى من متطلبات مواد العرض مضمّنة لاحقًا
في قائمة العمليات.
AssetGroupListingGroupFilterOperation
أفضل الممارسات
عند استخدام فلاتر مجموعات المؤسسات في سياق
AssetGroupListingGroupFilter
،
ننصح بإضافة عمليات
AssetGroupListingGroupFilterOperation
تستهدف AssetGroup
نفسها إلى
مهمة دفعات على التوالي، حتى يتم التعامل مع مجموعة العمليات بشكل ذري
أثناء تقسيم الدفعات. للاطّلاع على مزيد من المعلومات حول تقسيم الدفعات والعوامل الأخرى التي تؤثّر في مجموعات بطاقات بيانات المتجر، يُرجى الاطّلاع على دليل معالجة دفعات مجموعات بطاقات بيانات المتجر.
إضافة عمليات التغيير إلى مهمة
أضِف عمليات التعديل من الخطوة 2 إلى قائمة واستخدِم
AddBatchJobOperations
لإضافة قائمة التعديلات إلى مهمة الدفعات التي تم إنشاؤها في الخطوة 1.
اتّبِع خطوة إضافة العمليات
في دليل المعالجة العامة للدُفعات لإضافة قائمة عمليات التعديل.
تنفيذ الوظيفة المجمّعة
اسمح بتشغيل المهام التي تم تحميلها من خلال استدعاء RunBatchJob
. يمكنك الاطّلاع على الخطوة تنفيذ مهمة المعالجة المجمّعة في دليل المعالجة المجمّعة العام للحصول على مثال.
استرداد حالة المهمة
تبدأ مهام الدفعات كعمليات طويلة الأمد وتستغرق عادةً وقتًا طويلاً للانتهاء.
بعد بدء المهمة، استخدِم طريقة
GetOperation
للعملية الطويلة الأمد من أجل التحقّق من حالة المهمة
إلى أن تكتمل.
عند انتهاء جميع مهام الدُفعة، استدعِ الدالة
ListBatchJobResults
لعرض حالاتها وردودها باتّباع خطوة
عرض جميع نتائج مهام الدُفعة في
دليل المعالجة العامة للدُفعات.
إنّ محتوى هذه الصفحة مرخّص بموجب ترخيص Creative Commons Attribution 4.0 ما لم يُنصّ على خلاف ذلك، ونماذج الرموز مرخّصة بموجب ترخيص Apache 2.0. للاطّلاع على التفاصيل، يُرجى مراجعة سياسات موقع Google Developers. إنّ Java هي علامة تجارية مسجَّلة لشركة Oracle و/أو شركائها التابعين.
تاريخ التعديل الأخير: 2025-08-27 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2025-08-27 (حسب التوقيت العالمي المتفَّق عليه)"],[[["\u003cp\u003eBatch processing allows you to execute a series of interdependent operations across Google Ads services, including creating and managing Performance Max campaigns, without waiting for each operation to complete individually.\u003c/p\u003e\n"],["\u003cp\u003eCreating a Performance Max campaign with batch processing involves preparing a list of \u003ccode\u003eMutateOperation\u003c/code\u003e objects, each defining a resource to be created or modified, such as an asset group or listing group filter.\u003c/p\u003e\n"],["\u003cp\u003eOperations involving \u003ccode\u003eAssetGroup\u003c/code\u003e and \u003ccode\u003eAssetGroupAsset\u003c/code\u003e resources should be sequential within the batch job due to their interdependencies and asset requirements.\u003c/p\u003e\n"],["\u003cp\u003eWhen using \u003ccode\u003eAssetGroupListingGroupFilter\u003c/code\u003e for Performance Max campaigns with online sales, it's recommended to add operations targeting the same \u003ccode\u003eAssetGroup\u003c/code\u003e consecutively to ensure atomic processing.\u003c/p\u003e\n"],["\u003cp\u003eThe batch job is executed asynchronously, requiring you to monitor its status using the \u003ccode\u003eGetOperation\u003c/code\u003e method until completion and then retrieve results using \u003ccode\u003eListBatchJobResults\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# Batch Processing for Performance Max\n\n[Batch processing](/google-ads/api/docs/batch-processing/overview) provides a way to dispatch\na set of operations, which may be interdependent, to multiple services without\nsynchronously waiting for the operations to complete. You can use batch\nprocessing to create and manage Performance Max campaigns.\n\nThis guide provides details specific to Performance Max campaigns when working\nwith batch processing. The generic\n[batch processing guide](/google-ads/api/docs/batch-processing/overview) provides general\ninformation about batch processing, and the\n[Structure requests guide](/google-ads/api/performance-max/structure-requests) contains detailed\ninformation about constructing requests to create or manage Performance Max\ncampaigns.\n\nTo create a Performance Max campaign using batch processing, follow these steps:\n\nCreate a new batch job\n----------------------\n\nFollow the general batch processing\n[job creation step](/google-ads/api/docs/batch-processing/flow#createjob) for creating a\n[`BatchJob`](/google-ads/api/reference/rpc/v21/BatchJob) resource.\n\nPrepare a list of mutate operations\n-----------------------------------\n\nPerformance Max campaigns require operations to create several related\nresources, which are detailed in the\n[Structure requests guide](/google-ads/api/performance-max/structure-requests). Create a\n[`MutateOperation`](/google-ads/api/reference/rpc/v21/MutateOperation) for each resource that should\nbe included in the batch job.\n\n### `CampaignOperation` and `CampaignAssetOperation` requirements\n\n| **Note:** this requirement only applies to [`Campaign`](/google-ads/api/reference/rpc/v21/Campaign) resources with associated [`Asset`](/google-ads/api/reference/rpc/v21/Asset) resources using [`CampaignAsset`](/google-ads/api/reference/rpc/v21/CampaignAsset) in order to meet the [brand asset requirements](/google-ads/api/performance-max/create-campaign#brand-guidelines).\n\nWhen brand guidelines are enabled for a campaign (see\n[brand guidelines](/google-ads/api/performance-max/create-campaign#brand-guidelines)), you must link\nbrand assets to the campaign using [`CampaignAsset`](/google-ads/api/reference/rpc/v21/CampaignAsset)\nresources. Furthermore, in a batch job the creation of these `CampaignAsset`\nresources must happen immediately after the creation of the [`Campaign`](/google-ads/api/reference/rpc/v21/Campaign)\nresource itself. If the `CampaignAsset` resources are not created immediately\nafter the `Campaign` resource (when brand guidelines are enabled - see\n[troubleshooting](/google-ads/api/performance-max/troubleshooting#campaigns_with_brand_guidelines_enabled)),\nthe request will fail and return a `CampaignError` indicating missing assets.\nIncluding the `CampaignAsset` creation operations later in the same list of\noperations won't prevent this error.\n\n### `AssetGroupOperation` and `AssetGroupAssetOperation` requirements\n\n| **Note:** this requirement only applies to [`AssetGroup`](/google-ads/api/reference/rpc/v21/AssetGroup) resources with associated [`Asset`](/google-ads/api/reference/rpc/v21/Asset) resources using [`AssetGroupAsset`](/google-ads/api/reference/rpc/v21/AssetGroupAsset) in order to adhere to the [minimum asset requirements](/google-ads/api/performance-max/asset-requirements).\n\nThe operations of type [`MutateOperation`](/google-ads/api/reference/rpc/v21/MutateOperation) that\ncreate [`AssetGroup`](/google-ads/api/reference/rpc/v21/AssetGroup) and\n[`AssetGroupAsset`](/google-ads/api/reference/rpc/v21/AssetGroupAsset) resources in a batch job must\nbe sequential without other operations in between because of how these\noperations are grouped together when processed. Otherwise, the request throws an\n[`AssetGroupError` indicating some assets are missing](/google-ads/api/performance-max/troubleshooting#common_asset_group_errors),\neven if the operations required to\n[meet minimum asset requirements](/google-ads/api/performance-max/asset-requirements) are included later\nin the operations list.\n\n### `AssetGroupListingGroupFilterOperation` best practices\n\n| **Note:** [`AssetGroupListingGroupFilter`](/google-ads/api/reference/rpc/v21/AssetGroupListingGroupFilter) resources may only be used with Performance Max campaigns for [online sales with a product feed](/google-ads/api/performance-max/retail). [`AssetGroup`](/google-ads/api/reference/rpc/v21/AssetGroup) resources in such campaigns must have a [valid product group tree](/google-ads/api/performance-max/listing-groups) composed of one or more [`AssetGroupListingGroupFilter`](/google-ads/api/reference/rpc/v21/AssetGroupListingGroupFilter) resources associated with it. To target all products, use a single node tree.\n\nWhen working with listing group filters in the context of an\n[`AssetGroupListingGroupFilter`](/google-ads/api/reference/rpc/v21/AssetGroupListingGroupFilter), we\nrecommend adding\n[`AssetGroupListingGroupFilterOperation`](/google-ads/api/reference/rpc/v21/AssetGroupListingGroupFilterOperation)\noperations targeting the same [`AssetGroup`](/google-ads/api/reference/rpc/v21/AssetGroup) to a\nbatch job consecutively, so that the set of operations are treated atomically\nduring batch splitting. To read more on batch splitting and other factors\naffecting listing groups, see the\n[listing group batch processing guide](/google-ads/api/docs/batch-processing/listing-groups).\n\nAdd the mutate operations to the job\n------------------------------------\n\nAdd the mutate operations from [Step 2](#prepareoperations) to a list and call\n[`AddBatchJobOperations`](/google-ads/api/reference/rpc/v21/BatchJobService#addbatchjoboperations)\nto add the list of mutations to the batch job created in [Step 1](#createjob).\nFollow the [add operations step](/google-ads/api/docs/batch-processing/flow#addoperations)\nin the general batch processing guide to add the list of mutate operations.\n\nRun the batch job\n-----------------\n\nAllow the uploaded jobs to start running by calling\n[`RunBatchJob`](/google-ads/api/reference/rpc/v21/BatchJobService#runbatchjob). See\n[Run the batch job](/google-ads/api/docs/batch-processing/flow#runjob)\nstep in the general batch processing guide for an example.\n\nRetrieve the job's status\n-------------------------\n\nBatch jobs start as long-running operations and usually take time to finish.\nAfter starting the job, use the long-running operation's\n[`GetOperation`](/google-ads/api/reference/rpc/google.longrunning#google.longrunning.Operations.GetOperation)\nmethod to [poll the job's status](/google-ads/api/docs/batch-processing/flow#pollstatus)\nuntil it's done.\n\nWhen all of your batch jobs finish, call\n[`ListBatchJobResults`](/google-ads/api/reference/rpc/v21/BatchJobService#listbatchjobresults) to\nprint their statuses and responses following the\n[list all batch job results](/google-ads/api/docs/batch-processing/flow#listresults) step in\nthe general batch processing guide."]]