Unable to create Subdivision of Product Partition and Unable to Replace the Existing Product Partitoons as well

106 views
Skip to first unread message

gagan gupta

unread,
May 19, 2020, 3:56:57 AM5/19/20
to AdWords API and Google Ads API Forum
Hello Google Team,

I want to Achieve:
1. Product Partition as All Products MINUS filtered products on Product_Type_L1, MINUS filtered products on CUSTOM_LABEL_0
I tried with the Attached code and got Attached Errors. May you please correct my code.

2. Also, If I want to replace all existing Product Partitions with New Fresh Product Partition.
I tried but unsuccessful. May you please add the code in my attached code which can do this replace operation.

Gagan 
GoogleProductPartition
Errors

Google Ads API Forum Advisor Prod

unread,
May 19, 2020, 2:20:12 PM5/19/20
to gagan...@gmail.com, adwor...@googlegroups.com
Hi Gagan,

If you want to replace a product partition, you will either need to update the existing product partitions or remove them then add new ones.

Please reply privately to author your SOAP requests and responses if you continue to face issues.

Regards,
Anthony
Google Ads API Team

ref:_00D1U1174p._5004Q1zqFyN:ref

gagan gupta

unread,
May 19, 2020, 2:35:28 PM5/19/20
to AdWords API and Google Ads API Forum
Hi Anthony,

1. I am unable to neither replace nor remove and add. Please show me code on how to do it. Grateful, if you may Please use my existing code to do the same. Attached.
2. Also, I am unable to Create Product Partition as All Products MINUS filtered products on Product_Type_L1, MINUS filtered products on CUSTOM_LABEL_0
I tried with the Attached code and got Attached Errors. Please correct my code.

Gagan 

Google Ads API Forum Advisor Prod

unread,
May 20, 2020, 11:35:18 AM5/20/20
to gagan...@gmail.com, adwor...@googlegroups.com
Hi Gagan,

Unfortunately, our team doesn't provide code on how to implement certain functions. However, if you do provide SOAP logs, I can let you know what can be modified in your code to get it to work properly.

gagan gupta

unread,
Jun 5, 2020, 4:47:15 AM6/5/20
to AdWords API and Google Ads API Forum
Hi Anthony,

Unfortunately, I do not how to write code for updating it. I got confused with many documentations on the same.
Can you please refer me to the exact code examples to replace the Existing Product Partition with a new Product Partition.
If possible please update my code which I have attached here.

Ignore the 1st point, just 2nd point is my concern.
 2. Need to replace all existing Product Partitions with New Fresh Product Partition.

Gagan 

gagan gupta

unread,
Jun 5, 2020, 4:54:57 AM6/5/20
to AdWords API and Google Ads API Forum
Ignore -- Unable to create Subdivision of Product Partition 
right now concern -- Unable to Replace the Existing Product Partitoons as well

Thanks,
Gagan

Google Ads API Forum Advisor Prod

unread,
Jun 5, 2020, 3:01:33 PM6/5/20
to gagan...@gmail.com, adwor...@googlegroups.com
Hi,

We don't have examples on how to update these. Please send over your SOAP logs so that I can let you know what to modify in your requests.

gagan gupta

unread,
Jun 8, 2020, 3:45:45 AM6/8/20
to AdWords API and Google Ads API Forum
Replied you privately.

gagan gupta

unread,
Jun 8, 2020, 3:50:05 AM6/8/20
to AdWords API and Google Ads API Forum
Logs contain All SOAP requests, Responses, Errors, Exceptions, etc

Google Ads API Forum Advisor Prod

unread,
Jun 8, 2020, 2:02:43 PM6/8/20
to gagan...@gmail.com, adwor...@googlegroups.com
Hello,

I didn't receive your private message with your logs. Can you please send them again?

Thanks,

gagan gupta

unread,
Jun 9, 2020, 1:16:15 AM6/9/20
to AdWords API and Google Ads API Forum
Sent you.

Google Ads API Forum Advisor Prod

unread,
Jun 9, 2020, 2:02:07 PM6/9/20
to gagan...@gmail.com, adwor...@googlegroups.com
Hi Gagan, it seems we are experiencing some difficulty receiving your log files. We are investigating that issue. In the meantime, I have taken a look at the code and errors that you provided. I see two issues here.

First, you are receiving the error AdGroupCriterionError.PRODUCT_PARTITION_ALREADY_EXISTS. It sounds to me like you are trying to update your existing product partition tree. You need to remove the existing ProductPartition before you make any changes to the partition tree. Please see this guide for more information on partitioning for shopping campaigns.

The second error you are receiving is AdGroupCriterionError.PRODUCT_PARTITION_SUBDIVISION_REQUIRES_OTHERS_CASE. As mentioned in the guide mentioned earlier, each node of types SUBDIVISION must have one child node that is a catch-all for "Other" types of products that don't fit into the product partitions you've defined at the child level.  

Please refer to this code sample for a complete working sample of how to construct a product partition tree. Specifically, line 167 demonstrates how to set the "Other" node. 

I hope this is enough to resolve your issues. If not, would you please reply privately to author with your customer ID and request ID so that we can retrieve the logs on our end?

All the best,
Devin
The Google Ads API Team

ref:_00D1U1174p._5004Q1zqFyN:ref

gagan

unread,
Jun 9, 2020, 2:50:44 PM6/9/20
to Google Ads API Forum Advisor Prod, adwor...@googlegroups.com
I sent many times, it shows "sent" to me.
Give me your email address, I will send you logs and IDs as well.

Gagan 

gagan gupta

unread,
Jun 17, 2020, 7:54:24 AM6/17/20
to AdWords API and Google Ads API Forum
Thanks, Devin,

I have sent the email to: googleadsa...@google.comwith the attached code and errors which are coming up.

Please look.

Thanks a lot,
Gagan 


sent an email to 

gagan gupta

unread,
Jun 17, 2020, 7:55:24 AM6/17/20
to AdWords API and Google Ads API Forum
Thanks, Devin,

I have sent the email to googleadsapi-support@google.comwith the attached code and errors which are coming up.

Please look.

Thanks a lot,
Gagan 

Google Ads API Forum Advisor Prod

unread,
Jun 17, 2020, 11:40:13 AM6/17/20
to gagan...@gmail.com, adwor...@googlegroups.com
Hi Gagan, I have taken a look at the logs from your request and see two errors you need to fix: PRODUCT_PARTITION_ALREADY_EXISTS and PRODUCT_PARTITION_UNIT_CANNOT_HAVE_CHILDREN.

For PRODUCT_PARTITION_ALREADY_EXISTS, please try removing your existing product partition tree before you add a new one.

For PRODUCT_PARTITION_UNIT_CANNOT_HAVE_CHILDREN, it seems you are creating a node with a type of UNIT and adding children to it. Any node that has child nodes must be of type SUBDIVISION.

gagan gupta

unread,
Jun 18, 2020, 3:17:27 AM6/18/20
to AdWords API and Google Ads API Forum
Hi Devin,

1. I have seen the code examples by you and realized that we have 2 different ways of coding the product partition, both are attached as examples here in this. I am using the first approach and have coded the system already, this first approach is tested at our end and has been accepted as part of Product and serving clients, the first approach is creating the product partition, I do not want to change the first approach for the creation and not looking to write another set of code for Updation, I want to edit the first approach only to suit the requirement of just removing the existing product partition and creating the new one. please help here.

2. I need to modify the first approach code so that it can remove the existing product partition and update with new one.

Gagan 
second_Approach_Using_ProductPartitionTree_ProductPartitionNode_Objects
first_Approach_Using_ProductPartition_Objects

Google Ads API Forum Advisor Prod

unread,
Jun 18, 2020, 10:19:59 AM6/18/20
to gagan...@gmail.com, adwor...@googlegroups.com

Hi Gagan, assuming you have a working approach for adding a product partition tree, you should be able to continue using that. In order to update your product partition tree, you must remove the existing product partition tree and then replace it by adding a new one. I see no reason why you shouldn't be able to use the same approach when adding the new product partition tree. Keep in mind that a product partition tree is simply a collection of AdGroupCriteria that are linked together. In order to remove the existing product partition tree, you can select and remove all AdGroupCriteria for a given AdGroup with a Criterion of type PRODUCT_PARTITION. Then you should be able to use the same logic you used to build the original tree to add the new one. Please let me know if this works for you. 



All the best,
Devin
The Google Ads API Team



ref:_00D1U1174p._5004Q1zqFyN:ref

gagan gupta

unread,
Jun 19, 2020, 2:28:00 AM6/19/20
to AdWords API and Google Ads API Forum
Hi Devin,

Please elaborate: 
"A product partition tree is simply a collection of AdGroupCriteria that are linked together. In order to remove the existing product partition tree, you can select and remove all AdGroupCriteria for a given AdGroup with a Criterion of type PRODUCT_PARTITION. Then you should be able to use the same logic you used to build the original tree to add the new one."

Please give me a code example on the same.

Gagan

Google Ads API Forum Advisor Prod

unread,
Jun 22, 2020, 10:51:39 AM6/22/20
to gagan...@gmail.com, adwor...@googlegroups.com

Hi Gagan,

In order to retrieve all Ad Group Criteria for that campaign, you can use the get method of the AdGroupCriterionService. Here is a similar example but for CampaignCriteria . While the service you'll be using is different, the approach is similar. When constructing your selector, you'll need to specify the ad group you are targeting, as well as ad group criteria that have a criteria with a criterion of type PRODUCT_PARTITION. Then, you can use the mutate method on the AdGroupCriterionService to remove the relevant AdGroupCriteria.



All the best,
Devin
The Google Ads API Team



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