[AdGroupCriterionError.PRODUCT_PARTITION_ALREADY_EXISTS @ operations[8].Will you please update about it.
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 adwor...@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscribe@googlegroups.com
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 adwords-api+unsubscribe@googlegroups.com.
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/92950152-b25b-4f25-a6aa-c639ea4f2a4a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
$root = new ProductPartition();
$root->setPartitionType(ProductPartitionType::SUBDIVISION);
$root->setId(18283950120); // this is id of parent product group. you can get this id with PRODUCT_PARTITION_REPORT, from fields "id" (criterion id) and parent_id (parent criterion id)
//
$offerId = new ProductOfferId(); // это productDimension
$offerId->setValue($product_id); // this is inner product id from your merchant feed for which you want to create new partition group
$newUnit = ProductPartitions::createUnit($root, $offerId);
$criterion = ProductPartitions::asBiddableAdGroupCriterion(
22622716325, // your merchant adgroup_id
$newUnit,
4*1000000 // bid for new partition group
);
$operation = ProductPartitions::createAddOperation($criterion);
$operations[] = $operation;
//
$adWordsServices = new AdWordsServices();
$session = $this->getSession();
$adGroupCriterionService = $adWordsServices->get($session, AdGroupCriterionService::class);
$adGroupCriterionService->mutate($operations);