Hi
Yes. removed all old campaigns which created through API. and create new
campaign + adgroup thru API and use below link to add partition by
productcanonicalcondition. its working good.
But what should do for partition the products in adgroup without condition.
that is filter products for partition/group products using few
brands/category/producttype/custom-labels/itemids (see attachement) in
adgroup . we used the below coding. but its not working and got
PRODUCT_PARTITION_DOES_NOT_EXIST even remove all campaigns which created
through API
$root = new ProductPartition();
$root->setPartitionType(ProductPartitionType::SUBDIVISION);
$root->setId(-1);
$productPartition1 = new ProductPartition();
$productPartition1->setPartitionType(ProductPartitionType::UNIT);
$productPartition1->setCaseValue(new ProductBrand(null, "adidas"));
$productPartition1 -> setParentCriterionId($root->getId());
$ProductPartition2 = new ProductPartition();
$ProductPartition2 -> setPartitionType(ProductPartitionType::UNIT);
$ProductPartition2 -> setCaseValue(new ProductBrand());
$ProductPartition2 -> setParentCriterionId($root->getId());
$criterion = new BiddableAdGroupCriterion();
$biddingStrategyConfiguration = new BiddingStrategyConfiguration();
$cpcBid = new CpcBid();
$money = new Money();
$money->setMicroAmount(500000);
$cpcBid->setBid($money);
$biddingStrategyConfiguration->setBids([$cpcBid]);
$criterion->setBiddingStrategyConfiguration($biddingStrategyConfiguration);
$criterion->setAdGroupId(72638726631);
$criterion->setCriterion($productPartition1);
On Tuesday, May 7, 2019 at 12:59:00 AM UTC+5:30, googleadsapi-forumadvisor
wrote:
>
> Hi Bala,
>
> Based on the error, it looks like the subdivision creation is failing as
> there is already a product partition. The subsequent nodes seems to fail as
> the subdivision creation failed. Could you please confirm if you were
> creating the ad group via Google Ads UI? If so, you will need to first
> remove the default product partition and then retry to create a new Product
> Partition. If you want to do this in a new ad group, you could create one
> via the API and then use this code sample
> <https://github.com/googleads/googleads-php-lib/blob/d552b800ad53c400b1a50c7852e7ad184245d2ea/examples/AdWords/v201809/ShoppingCampaigns/AddProductPartitionTree.php>
> as
> a reference to create the Product Partition. Please give this a try and let
> me know if you face any issues.
>
> Thanks,
> Bharani, Google Ads API Team
> =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
> Also find us on our blog and discussion group:
> https://ads-developers.googleblog.com/search/label/google_ads_api
> https://developers.google.com/adwords/api/community/
> =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
>
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/5e7a45cb-a0f9-4c7b-8b71-cadb756bb03c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.