Temporary IDs issue creating ListingGroups using BatchJob

379 views
Skip to first unread message

Miquel Isern Roca

unread,
Apr 4, 2022, 9:05:34 AM4/4/22
to Google Ads API and AdWords API Forum
Hello,

I'm using Google Ads API to create a Listing Group with all its operations inside one BatchJob. The structure of the tree is simple, the SUBDIVISION root node with all product IDs as UNIT nodes under it and an OTHERS node to close up.

  1. When the Listing Group has a number of nodes under 1000, it works correctly. The nodes are created on Google.
  2. If I try to create a Listing Group with over 1000 nodes, let's say 5000. I get errors.
    • I tried this in two different ways:
      1. The operation to create the OTHERS node is the last one uploaded. In this case, only the ROOT node gets created on google and the rest of the operations return an error  `LISTING_GROUP_SUBDIVISION_REQUIRES_OTHERS_CASE`.
      2. The operation to create the OTHERS node is second, right after the ROOT node one. In this case, the first 1000 nodes are correctly created in Google with a ROOT and OTHERS node. The rest of the operations to create 4000 more nodes return with an error `LISTING_GROUP_DOES_NOT_EXIST`. Specifically pointing to the `-1` temporary ID used to create the ROOT node which was the parent criterion of all the failed nodes.
Looks like Google process the operations 1000 at a time and expects us to have the temporary IDs updated.

- Is this behavior intended? Does it only happen for ListingGroups or for other types as well?
- Are we limited to creating only 1000 children nodes in a BatchJob before we have to collect the assigned criterion ID of the parent node to create more nodes under it?
- Is it possible to keep the temporary IDs of a BatchJob valid for all the operations it contains?
- With the AdWords API there was a limit on the number of nodes a Partition tree could have, which was 20_000 nodes. Is this limit still in place for GoogleAds API? Has it changed?

This wasn't an issue on the AdWords API. Since the sunset of the API is near this is a high-priority problem for us.

Google Ads API and AdWords API Forum

unread,
Apr 5, 2022, 2:35:04 AM4/5/22
to Google Ads API and AdWords API Forum

Reposting the last inquiry (https://groups.google.com/g/adwords-api/c/TFbS2gMXHrs/m/duJm6yKDBQAJ) from the forum as it wasn't routed to our support queue.


Cheers,

Peter Laurence

Google Ads API Team

Google Ads API Forum Advisor

unread,
Apr 5, 2022, 3:45:12 AM4/5/22
to adwor...@googlegroups.com
Hi,

Thank you for reaching out to our API support team.

Regarding the LISTING_GROUP_SUBDIVISION_REQUIRES_OTHERS_CASE and as per this guide, and also in this later section, it states that : 
  • Each subdivision must always be completely partitioned, so it must contain a node representing Other.
  • Ad group criteria are not assigned IDs until the mutate request that creates them is processed by the server. However, a ListingGroupInfo is invalid until it is complete, so whenever you create a subdivision you must also create at least one of its children and an Other node in the same request.
That being said, for your operations "The operation to create the OTHERS node is the last one uploaded.", you may need to ensure that every subdivision has an Other node when it is being constructed.

As for the error LISTING_GROUP_DOES_NOT_EXIST, if the above considerations do not help resolve the issue, could you share to our team the complete request and response logs, and the request-id, as well as the batch job ID, when the error was encountered?

You may then send the requested information via the Reply privately to author option. If this option is not available, you may send the details directly to our googleadsa...@google.com alias instead.

Regarding the following items :

- Is this behavior intended? Does it only happen for ListingGroups or for other types as well?
- Are we limited to creating only 1000 children nodes in a BatchJob before we have to collect the assigned criterion ID of the parent node to create more nodes under it?
- With the AdWords API there was a limit on the number of nodes a Partition tree could have, which was 20_000 nodes. Is this limit still in place for GoogleAds API? Has it changed?


Could you confirm whether the batch job also returned errors related to the limit? I asked because as per the Google Ads API system limits guide, there is no mention on how many ListingGroups can be processed in a specific batch job. However, for batch processing limits, you may also refer to this guide, and it then states that : 

It is recommended to add no more than 1,000 operations per AddBatchJobOperationsRequest and use the sequence_token to upload the rest of the operations to the same job. 

In addition, there is also no mention of a 20,000 nodes limit in the AdWords API version of the system limits documentation. For our team to take a closer look, could you also provide supporting documentation or references for the said 20,000 nodes limit?

Furthermore, the API also generally follows the account limits defined here.


- Is it possible to keep the temporary IDs of a BatchJob valid for all the operations it contains?

For this item, you can refer to this guide for more information on the usage of temporary IDs. From the guide it states two notable items :
  • ...For example, if you create a campaign and specify its resource name as customers/<YOUR_CUSTOMER_ID>/campaigns/-1, then when you are creating the ad group in a later operation, you can reference it by that resource name and the -1 you specified will be replaced by the actual ID of the created campaign automatically.
  • Temporary resource names are not remembered across jobs or mutate requests; to reference a resource created in a previous job or mutate request, use its actual resource name.
Best regards,

Google Logo
Peter Laurence
Google Ads API Team
 


ref:_00D1U1174p._5004Q2ZJqPO:ref

Miquel Isern Roca

unread,
Apr 13, 2022, 5:03:33 AM4/13/22
to Google Ads API and AdWords API Forum
Hello,

regarding the limit of 20,000 listing groups per AdGroup. It is true there doesn't seem to be mention of it in the documentation, but a resource limit is in place.

I hit the limit when I tried to create 50,000 UNIT Listing Groups under a ROOT. Only 19,998 UNIT Listing Groups were created on Google, the other groups already existed previously, being the ROOT and the OTHER. For the rest of the operations that followed, I got the `RESOURCE_LIMIT`  error back from Google.


status {
  code: 3
  message: "This request would exceed a limit on the number of allowed resources. The details of which type of limit was exceeded will eventually be returned in ErrorDetails., at mutate_operations[19997].ad_group_criterion_operation"
  details {
    [type.googleapis.com/google.ads.googleads.v9.errors.GoogleAdsFailure] {
      errors {
        error_code {
          resource_count_limit_exceeded_error: RESOURCE_LIMIT
        }
        message: "This request would exceed a limit on the number of allowed resources. The details of which type of limit was exceeded will eventually be returned in ErrorDetails."
        trigger {
          string_value: "LISTING_GROUPS_PER_AD_GROUP"
        }
        location {
          field_path_elements {
            field_name: "mutate_operations"
            index: 19997
          }
          field_path_elements {
            field_name: "ad_group_criterion_operation"
          }
        }
      }
    }
  }
}

With this, I believe we can say that the limit is still in place with the new API. Not sure if it's supposed to be since it is not documented.

Google Ads API Forum Advisor

unread,
Apr 18, 2022, 8:57:09 AM4/18/22
to adwor...@googlegroups.com
Hello,

That limit seems correct to me. I'm going to take a look into improving our documentation around limits regarding listing groups.

As for the other issue, we're in the process of putting together a fix on our side and should hopefully be rolling it out soon. I'll follow up on the progress there and let you know once I have an update.

Regards,
Mike, Google Ads API Team

ref:_00D1U1174p._5004Q2ZJqPO:ref

Google Ads API Forum Advisor

unread,
May 24, 2022, 2:30:42 PM5/24/22
to adwor...@googlegroups.com
Hi,

The issue around 1000 node limit in Batchjobs should be fixed now. Could you kindly try again and confirm?

Cheers
Anash

ref:_00D1U1174p._5004Q2ZJqPO:ref
Reply all
Reply to author
Forward
0 new messages