AdGroupCriterionService returns different results using the same selector

94 views
Skip to first unread message

wes...@channable.com

unread,
Oct 17, 2018, 8:45:30 AM10/17/18
to AdWords API and Google Ads API Forum
To whom it may concern:

As of October 16, 2018 at around 18.00, we've been experiencing some issues when using the python API. I have spent today looking into the issue, but I found something strange. I made a small example so that I could share the problem with you.

I have the following code:

service = client.GetService('AdGroupCriterionService', version='v201809')

adgroup_adwords_id
= 41434232302

selector
= {
   
'fields': [
       
'Id',
       
'CpcBid',
       
'BaseAdGroupId',
       
'CriteriaType',
       
'PartitionType',
       
'CaseValue'
   
],
   
'predicates': [
       
{
           
'field': 'AdGroupId',
           
'operator': 'IN',
           
'values': [adgroup_adwords_id]
       
},
       
{
           
'field': 'CriteriaType',
           
'operator': 'EQUALS',
           
'values': 'PRODUCT_PARTITION'
       
},
       
{
           
'field': 'Status',
           
'operator': 'NOT_EQUALS',
           
'values': 'REMOVED'
       
}
   
]
}

result
= service.get(selector)



I am trying to query Google Ads to find all the Adgroup Criterions for a Shopping Campaign. When I run the above code, it results in different responses when I call it multiple times, i.e.

# First run
{
   
'adgroup_id': 41434232302,
   
'criterion_use': 'BIDDABLE',
   
'criterion': {
       
'id': 318749511508,
       
'type': 'PRODUCT_PARTITION',
       
'Criterion.Type': 'ProductPartition',
       
'partitionType': 'UNIT',
       
'parentCriterionId': 293946777986,
       
'caseValue': {
           
'ProductDimension.Type': 'ProductOfferId',
           
'value': 'fbeni618004'
       
}
   
}
}

# A later run
{
   
'adgroup_id': 41434232302,
   
'criterion_use': 'BIDDABLE',
   
'criterion': {
       
'id': 318749511508,
       
'type': 'PRODUCT_PARTITION',
       
'Criterion.Type': 'ProductPartition',
       
'partitionType': 'UNIT',
       
'parentCriterionId': None,
       
'caseValue': {
           
'ProductDimension.Type': 'ProductOfferId',
           
'value': 'fbeni618004'
       
}
   
}
}



The `parentCriterionId` changes from a value to a `None`. On Google Ads, nothing has changed about this criterion:




Could you share some insight into what is going on? We've been running this code for quite some time, so we were a bit surprised when we all of a sudden got errors for this.

We are using `v201809` of the API and version 14.1.0 of the `googleads` Python library

Teja Makani

unread,
Oct 17, 2018, 3:39:59 PM10/17/18
to AdWords API and Google Ads API Forum
Hello Wesley,

I ran the PRODUCT_PARTITION_REPORT and able to see AdGroupId and ParentCriterionId matching. Could please confirm whether the problem persists quite often? If yes, could you please share the SOAP logs(request and response) without redacting any information? You could follow the instructions shown here to enable SOAP logging for Python client library. You could use reply privately to the author option while sharing the details requested.

Regards,
Sai Teja, AdWords API Team.

wes...@channable.com

unread,
Oct 19, 2018, 1:51:52 AM10/19/18
to AdWords API and Google Ads API Forum
From our private conversation,
 
... can you include the parentCriterionId field in the selector and see whether the requests are still failing? Since the fields are not included in the request, they are not guaranteed in the response. Could you please give it a try and let me know if the problem persists.

I tried this, and that indeed fixed the consistency issues we were having. Thank you for your assistance. Cannot believe I missed that. I do still find it a bit strange that this just started being a problem recently, but again, thanks!
Reply all
Reply to author
Forward
0 new messages