Hi
I am developing app in java where I need to Add Campaigns within those
Campaigns AdGroups, and for those AdGroups their repesctive keywords. So fo
adding Ad Group we need Campaign ID, and for adding keywords need AdGroup
ID.
So for now I am doing like this :
First Adding Batch of Campiagns like below :
CampaignOperation[] campaignOperations = new CampaignOperation[ ] {
cOp1, cOp2, cOp3};
// Add campaigns.
CampaignReturnValue addResult =
campaignService.mutate(campaignOperations);
// Retriving IDs for added campians
Then I Add AdGroups To Respective Campaigns using Campaign IDs I got, as
below :
AdGroupOperation[] adAdGroupsOperations = new AdGroupOperation[] {
cOp1AdGrp1, cOp1AdGrp2, cOp1AdGrp3, cOp2AdGrp1, cOp2AdGrp2,
cOp3AdGrp1,};
// Add ad groups.
AdGroupReturnValue result = adGroupService.mutate(adAdGroupsOperations);
// I retriev Group IDs here
Then I Add Keywords To Respective AdGroups using AdGroup IDs I got, as
below :
AdGroupCriterionOperation[] keywordsOperations = new
AdGroupCriterionOperation[ cOp1AdGrp1KeywrdOp1,
cOp1AdGrp1KeywrdOp1, .................., cOp[N]AdGrp[N]KeywrdOp[N];
// Add keywords.
AdGroupCriterionReturnValue result = adGroupCriterionService
.mutate(keywordsOperations);
Above code will do like :
1] Adds Campaigns,
2] Adds AdGroups to respective Campaigns,
3] Adds Keywords to Respective AdGroups,
Now my problem is that if any of these fails I need to roll back,
Is there any way to rollback changes made by perticular session
OR
Is there any way that I can do like this :
1] Create nested operations
mainOperation {
CampaignOperation1 {
AdGroupOperation1, {
KeywordOperation1,
KeywordOperation2,
}
AdGroupOperation2, {
KeywordOperation1,
KeywordOperation2,
}
AdGroupOperation3, {
KeywordOperation1,
KeywordOperation2,
}
AdGroupOperation4, {
KeywordOperation1,
KeywordOperation2,
}
},
CampaignOperation1 {
AdGroupOperation1, {
KeywordOperation1,
KeywordOperation2,
}
AdGroupOperation2, {
KeywordOperation1,
KeywordOperation2,
}
AdGroupOperation3, {
KeywordOperation1,
KeywordOperation2,
}
AdGroupOperation4, {
KeywordOperation1,
KeywordOperation2,
}
}
}
2] And then add these operations in single batch.
Is this possible, and how ?
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 http://groups.google.com/group/adwords-api.
To view this discussion on the web visit
https://groups.google.com/d/msgid/adwords-api/883fdcc1-a9ee-41ee-8f8b-e3ba64ecf2db%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.