Thanks! The following worked for me:

String criteriaResourceName = 
CampaignCriterionServiceClient.formatCampaignCriteriaName(String.valueOf(customerId),
 
campaignId + "~" + criteria);

CampaignCriterion.Builder criterionBuilder =
            CampaignCriterion.newBuilder()
                .setResourceName(criteriaResourceName)
                .setBidModifier(FloatValue.of(modifier));

CampaignCriterion criterion = criterionBuilder.build();

return CampaignCriterionOperation.newBuilder()
            .setUpdate(criterion)
            .setUpdateMask(FieldMasks.allSetFieldsOf(criterion))
            .build();




On Wednesday, May 22, 2019 at 6:14:09 AM UTC-4, adsapiforumadvisor wrote:
>
> Hi Ben,
>
> Thank you for reaching out. Yes, this is possible in the API. To achieve 
> this, you need to create a campaign criterion using the 
> CampaignCriterionService.MutateCampaignCriteria 
> <https://developers.google.com/google-ads/api/reference/rpc/google.ads.googleads.v1.services#google.ads.googleads.v1.services.CampaignCriterionService>()
>  
> method and set type 
> <https://developers.google.com/google-ads/api/reference/rpc/google.ads.googleads.v1.resources#google.ads.googleads.v1.resources.CampaignCriterion>
>  equal 
> to *LOCATION*. After successfully creating this campaign criterion, you 
> may then associate your campaign bid modifier to this campaign criterion.
>
> Let me know if this helps. Feel free to write back if you have further 
> clarifications.
>
> Regards,
> Dave
> Google Ads API Team
>
>
> ref:_00D1U1174p._5001UAqK1L:ref

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads 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 and Google Ads 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/74979244-6434-47ba-9062-55956c2f58a9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to