Hi Vishal,
I only now got around to trying this. Unfortunately the described scenario
(using temporary IDs for ad group criterions or ad group ads) does not work
with the batch job service. If I submit a job with operations to create an
ad group, one ad and criterion each contained in the ad group and label
operations to attach one label each to the ad group, the ad and the
criterion as follows:
[{'operand': {'biddingStrategyConfiguration': {'bids': [{'bid':
{'microAmount': '2560000'},
'xsi_type':
'CpcBid'}]},
'campaignId': 857289266,
'id': -1,
'name': 'Some Ad Group Name',
'status': 'ENABLED',
'xsi_type': 'AdGroup'},
'operator': 'ADD',
'xsi_type': 'AdGroupOperation'},
{'operand': {'ad': {'description': 'Some description line',
'finalUrls': ('https://example.com/',),
'headlinePart1': 'Headline Part 1',
'headlinePart2': 'Headline Part 2',
'id': -2,
'path1': 'path1',
'path2': 'path2',
'xsi_type': 'ExpandedTextAd'},
'adGroupId': -1,
'status': 'ENABLED',
'xsi_type': 'AdGroupAd'},
'operator': 'ADD',
'xsi_type': 'AdGroupAdOperation'},
{'operand': {'adGroupId': -1,
'biddingStrategyConfiguration': {'bids': [{'bid':
{'microAmount': '500000'},
'xsi_type':
'CpcBid'}]},
'criterion': {'id': -3,
'matchType': 'BROAD',
'text': 'some keyword',
'xsi_type': 'Keyword'},
'userStatus': 'ENABLED',
'xsi_type': 'BiddableAdGroupCriterion'},
'operator': 'ADD',
'xsi_type': 'AdGroupCriterionOperation'},
{'operand': {'adGroupId': -1,
'labelId': 1255811636,
'xsi_type': 'AdGroupLabel'},
'operator': 'ADD',
'xsi_type': 'AdGroupLabelOperation'},
{'operand': {'adGroupId': -1,
'adId': -2,
'labelId': 1255811636,
'xsi_type': 'AdGroupAdLabel'},
'operator': 'ADD',
'xsi_type': 'AdGroupAdLabelOperation'},
{'operand': {'adGroupId': -1,
'criterionId': -3,
'labelId': 1255811639,
'xsi_type': 'AdGroupCriterionLabel'},
'operator': 'ADD',
'xsi_type': 'AdGroupCriterionLabelOperation'}]
Then the AdGroupAdLabelOperation and the
AdGroupCriterionLabelOperation will fail with an EntityNotFound.INVALID_ID
error, the triggers being "TempAdId: 2" and "TempCriterionId{id=3}"
respectively.
EIther I'm doing something wrong or temporary IDs are indeed only supported
on the campaign and ad group level. If it's the latter, it'd be great if
the BatchJobService documentation could be amended accordingly.
Best regards,
Dorian
On Friday, 18 November 2016 21:16:44 UTC+1, Vishal Vinayak (Adwords API
Team) wrote:
>
> Hi Dorian,
>
> That is indeed possible. You can use the AdGroupCriterionService
> <https://developers.google.com/adwords/api/docs/reference/latest/AdGroupCriterionService>
> in
> conjugation with BatchJobService
> <https://developers.google.com/adwords/api/docs/reference/v201609/BatchJobService>
> to
> create/edit criteria for multiple ad groups all at once. A list of all
> operations supported by the BatchJobService is available here
> <https://developers.google.com/adwords/api/docs/guides/batch-jobs#supported_operations>
> .
>
> Regards,
> Vishal, AdWords API Team
>
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
You received this message because you are subscribed to the Google
Groups "AdWords 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 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/e285e032-b304-4f6c-908d-b2745ee3e038%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.