Hi,
I am currently trying to update our Shopping campaign through the Google
Ad's API and so far so good.
I have a bit of an issue when hitting over 5000 requests. I am aware that
there is a 5000 limit per request and I'm not too far off we have 5,600ish
products in the shopping that I want on the Ad Campaign.
Problem is I create the Ad Group and Partitions at the top of my script
with this code:
$operations = [];
$root = *ProductPartitions::createSubdivision(); ///This is what I think is
causing the problem,*
$criterion = ProductPartitions::asBiddableAdGroupCriterion($adGroupId,
$root);
$operation = ProductPartitions::createAddOperation($criterion);
$operations[] = $operation;
$otherCondition = ProductPartitions::createSubdivision(
$root,
new ProductCanonicalCondition()
);
$criterion = ProductPartitions::asBiddableAdGroupCriterion(
$adGroupId,
$otherCondition
);
$operation = ProductPartitions::createAddOperation($criterion);
$operations[] = $operation;
$otherBrand = ProductPartitions::createSubdivision(
$otherCondition,
new ProductOfferId()
);
$criterion = ProductPartitions::asBiddableAdGroupCriterion(
$adGroupId,
$otherBrand
);
$operation = ProductPartitions::createAddOperation($criterion);
$operations[] = $operation;
$productBiddingCategory = new ProductBiddingCategory();
$productBiddingCategory->setType(ProductDimensionType::BIDDING_CATEGORY_L1);
$productBiddingCategoryUnit = ProductPartitions::createUnit($otherBrand,
$productBiddingCategory);
$criterion = ProductPartitions::asBiddableAdGroupCriterion(
$adGroupId,
$productBiddingCategoryUnit,
10000
);
$operation = ProductPartitions::createAddOperation($criterion);
$operations[] = $operation;
After I send the first 5000 operations I try to do another loop to send
another 1400ish, the problem is where I run this code
$cheapBrand = new ProductOfferId();
$cheapBrand->setValue($sku);
$cheapBrandUnit = ProductPartitions::createUnit(*$root*, $cheapBrand);
*///Where
this line says $root I think it's trying to re-create $root rather than get
the previously created.*
$criterion = ProductPartitions::asBiddableAdGroupCriterion(
$adGroupId,
$cheapBrandUnit,
$bid_trans
);
$operation = ProductPartitions::createAddOperation($criterion);
$operations[] = $operation;
It seems because I don't store the $root object the code tries to re-create
and then fails with error:
AdGroupCriterionError.PRODUCT_PARTITION_DOES_NOT_EXIST @
operations[1].operand.criterion.parentCriterionId;
I can't delete and rebuild the Root partition as I just want to add to the
existing 5000 request so in total there are 2 requests to build the
partitions.
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
---
You received this message because you are subscribed to the Google Groups
"AdWords API and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit
https://groups.google.com/d/msgid/adwords-api/2a79c5a5-8813-440b-8341-e4e9480273cb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.