How to update product partitions

153 views
Skip to first unread message

ry...@n-i-e.co.uk

unread,
Mar 4, 2019, 11:09:03 AM3/4/19
to AdWords API and Google Ads API Forum
Hi,

So we finally have our tool working and building a shopping campaign based off of our stock levels. 

at 4AM the cron job will run.....

Currently - The script deletes the existing Ad Group and then Re-Builds a new Ad Group and then adds Product Groups in. 

How we want it to run - The script will run in the morning and update the ad group and then update any of the product groups that need new bids setting. 

Why we want to change it - The reason behind wanting to update rather than delete and re-create is because the Ad Group reporting is not working properly as each day we have a new Ad Group. Also we are sending over 7,000 requests a day. This is fine as we have the higher API access so as long as we send in 2 requests less than 5000 we have no problems. 

Issues I am facing - So I can skip the Ad Group delete and use the existing Ad Group ID however I am unable to find any type of EDIT 

I use the below code to create a partition 


ProductPartitions::createUnit($mainPart, $newPart);
 

Is there any type of function that is editUnit or editPartition that I can call, this way rather than 7,000+ requests daily we would only send the required amount of updates.

Also is there another way I can stop the reports from being per Ad Group? and have them per Campaign instead? would I need to use the Reporting API for this ? 

Apologies for the million questions I am one final step away from having our Ad's / Shopping API working perfectly. 

Thanks, 
Ryan 

ry...@n-i-e.co.uk

unread,
Mar 4, 2019, 11:16:00 AM3/4/19
to AdWords API and Google Ads API Forum
Just incase the reporting problem were having makes no sense here's a screenshot of our Ad Group Overview applet on the Campaign Overview.

reports.png


As you can see there are a lot of Products Ad Groups, this usually isn't a problem however we filter by Active Ad Groups so were not seeing accurate stats for the month only the current day. (To get stats for the month we have to change our filters and then read the bottom row) 

googleadsapi...@google.com

unread,
Mar 4, 2019, 5:22:43 PM3/4/19
to AdWords API and Google Ads API Forum
Hi Ryan, 

What details are you trying to edit in a node of the product partition? Are you trying to change the bid amount? If so, you can use the AdGroupCriterionService.mutate() and modify the bids or bid modifier. You can refer to the sample UpdateKeyword to get an idea on how to perform this operation. You will need to filter with the specific criterion (Type = PRODUCT_PARTITION and criterion id). If you are trying to remove or add a node to a subdivision, you could use the AdGroupCriterionService and perform the ADD or REMOVE operation by specifying the parent criterion id of the parent node. If you are trying to do something different could you share the specifics? 

As mentioned above, it is not required to remove the entire ad group, unless the ad group is really a new one. Are you making some updates to the ad group level attributes? If so, you could use the AdGroupService.mutate() and perform the updates. You can refer to the UpdateAdGroup sample for reference. 

I believe, if you are not deleting the ad groups, you may be fine with your current approach of reporting. But, if you need to get stats at Campaign level, you will need to use the Campaign Performance Reports. What specific metrics are you interested in? 

Thanks,
Sreelakshmi, AdWords API Team


=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
    http://googleadsdeveloper.blogspot.com/search/label/adwords_api
    https://developers.google.com/adwords/api/community/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Reply all
Reply to author
Forward
0 new messages