Partial failure flag

36 views
Skip to first unread message

srke...@hotels.com

unread,
Sep 28, 2015, 10:48:40 AM9/28/15
to AdWords API Forum
Hi,

I am performing a MutateJobService to update keyword bids in bulk.Should I  be worried about setting Partialfaliure flag? When updating 1000 keywords in a batch, if certain keywords fail to get updated due to errors, then will the whole batch fail?

If i do have to set to the Partialfaliure  flag, then can someone send a small snippet as to how and where its set. I am using python API.

Thanks in advance!

Anthony Madrigal

unread,
Sep 28, 2015, 2:12:45 PM9/28/15
to AdWords API Forum
Hi,

Fortunately, the Partial Failure is always set to true when using the MutateJobService. By setting this flag, you will not have all of your requests fail when only one or a few of them fail. 

For future reference, you can set the Partial Failure flag to true by setting it in the googleads.yaml file. 

Cheers,
Anthony
AdWords API Team
Message has been deleted

srke...@hotels.com

unread,
Sep 28, 2015, 6:49:12 PM9/28/15
to AdWords API Forum
Thanks Anthony, one more questions. I am trying to get the cpc bid from the mutate job response. and i am using the following code:


for result in result_response['SimpleMutateResult']['results']:
   
print(result.AdGroupCriterion.biddingStrategyConfiguration.bids[0].bid.microAmount)

but the above code sometimes gives the cpm bid instead of cpcbid because the object "bids[0]" is sometimes cpc and other times cpm. How do i change the above code to get cpc bid always?.. below is the response object and the code i tried, which did not work and thre an error.

         
biddingStrategyConfiguration =
           
(BiddingStrategyConfiguration){
               biddingStrategyType
= "MANUAL_CPC"
               biddingStrategySource
= "CAMPAIGN"
               biddingScheme
=
                 
(ManualCpcBiddingScheme){
                     
BiddingScheme.Type = "ManualCpcBiddingScheme"
                     enhancedCpcEnabled
= False
                 
}
               bids
[] =
                 
(CpmBid){
                     
Bids.Type = "CpmBid"
                     bid
=
                       
(Money){
                           
ComparableValue.Type = "Money"
                           microAmount
= 250000
                       
}
                     cpmBidSource
= "ADGROUP"
                 
},
                 
(CpcBid){
                     
Bids.Type = "CpcBid"
                     bid
=
                       
(Money){
                           
ComparableValue.Type = "Money"
                           microAmount
= 3600000
                       
}


                     cpcBidSource = "CRITERION"
                  },

sometimes bids[0] is cpc and other times its cpm.. how to refer to cpcbid in the object bids[]?

i tried:


   
print(result.AdGroupCriterion.biddingStrategyConfiguration.bids['CpcBid'].bid.microAmount)

AttributeError: 'BiddingStrategyConfiguration' object has no attribute 'CpcBid'




Umesh Dengale

unread,
Sep 29, 2015, 11:51:44 AM9/29/15
to AdWords API Forum
Hello,

The BiddingStrategyConfiguration has a bids property. You could add a condition to check the bids array contains the CpcBid type to get only CpcBid data.

Thanks,
Umesh, AdWords API Team.
Reply all
Reply to author
Forward
0 new messages