Hi,
I tried to update new adgroups in keywords using batch processing, but I got these error:
Operation 531 - FAILURE:
errorType=NewEntityCreationError
trigger=TempAdGroupId: 227
errorString=NewEntityCreationError.TEMP_ID_ENTITY_HAD_ERRORS
fieldPath=operations[531].operand.adGroupId
reason=TEMP_ID_ENTITY_HAD_ERRORS
Operation 611 - FAILURE:
errorType=EntityNotFound
trigger=AdGroupId: 0
errorString=EntityNotFound.INVALID_ID
fieldPath=operations[611].operand.adGroupId
reason=INVALID_ID
I'm wondering what the issues are? I used to do this sequentially (not using batch processing) and I didn't need to specify and adgroup ID when adding new ad group. I think you need to do so for batch processing (to be able to put the right keyword in the right adgroup ID) so here's my code for updating ad group:
def BuildAdGroupOperations(client, batch_job_helper, adgroup_spreadsheet):
micro_multiplier=1000000
ad_group_service = client.GetService('AdGroupService', version='v201705')
id=0
# Construct operations and add ad groups.
adgroup_operations = [{
'operator': 'ADD',
'xsi_type': 'AdGroupOperation',
'operand': {
'campaignId': adgroup_spreadsheet.loc[i,'Campaign ID'],
'id': batch_job_helper.GetId(),
'name': adgroup_spreadsheet.loc[i, 'Ad group'],
'status': 'ENABLED',
'biddingStrategyConfiguration': {
'bids': [
{
'xsi_type': 'CpcBid',
'bid': {
'microAmount': int(adgroup_spreadsheet.loc[i, 'Max CPC']*micro_multiplier),
},
}
]
},
'urlCustomParameters': {
'parameters': [
# Since your tracking URL has two custom parameters, provide
# their values too. This can be provided at campaign, ad group,
# ad, criterion, or feed item levels.
{
'key': 'term',
'value': adgroup_spreadsheet.loc[i, 'Custom Parameter']
}
]
}
}
}
for i in range (1, adgroup_spreadsheet.shape[0])]
return adgroup_operations
Is there a better way to assign adgroup ID (or to let it automatically assign and get the ID to load keywords in)?
One more question is how to print out which ad group/keyword is having an error? Thanks!