Hello, I've created a product partition with 2 offers this way (it works):
// create subdivision $operations = []; $root = ProductPartitions::createSubdivision(); $criterion = ProductPartitions::asBiddableAdGroupCriterion($adGroup->getId(), $root); $operation = ProductPartitions::createAddOperation($criterion); $operations[] = $operation; $ean = new ProductOfferId(); $ean->setValue('0000000001'); $eanUnit = ProductPartitions::createUnit($root, $ean); $criterion = ProductPartitions::asBiddableAdGroupCriterion( $adGroup->getId(), $eanUnit, 10*10000 ); $operation = ProductPartitions::createAddOperation($criterion); $operations[] = $operation; $ean = new ProductOfferId(); $ean->setValue('0000000002'); $eanUnit = ProductPartitions::createUnit($root, $ean); $criterion = ProductPartitions::asBiddableAdGroupCriterion( $adGroup->getId(), $eanUnit, 11*10000 ); $operation = ProductPartitions::createAddOperation($criterion); $operations[] = $operation; // Other $ean = new ProductOfferId(); $eanUnit = ProductPartitions::createUnit($root, $ean); $criterion = ProductPartitions::asNegativeAdGroupCriterion( $adGroup->getId(), $eanUnit ); $operation = ProductPartitions::createAddOperation($criterion); $operations[] = $operation; $adGroupCriterionService->mutate($operations); Now I want to create a function that adds new ProductOfferId to current partition, but I don't know how to retrieve the $root element without creating it again (and without doing a query to read the whole partition). What is the easiest way to get the root element of a product partition? Thank you -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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 adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@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+unsubscr...@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/e4dead6c-3125-4169-bc9e-e1be72f62a4e%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.