Hi Bharani,

Thanks for the suggestion. I used update operations and was able to update 
bid modifiers for Mobile,Tablet and Desktop devices but was not able to 
update bid modifier for Connected_TV device target. I am using criterionId 
of CONNECTED_TV as 30004 but request fails with "Resource was not found" 
error with trigger *string_value: "CriterionId{id=30004}"*

*Isn't criterionId 30004 correct value for CONNECTED_TV*. Can you point me 
to any documents which specifies correct criterionIds for all devices.

Request
-------
MethodName: 
google.ads.googleads.v2.services.CampaignCriterionService/MutateCampaignCriteria
Endpoint: googleads.googleapis.com:443
Headers: {developer-token=TOKEN, login-customer-id=xxxxxxxxxx, 
x-goog-api-client=gl-java/1.8.0_201 gapic/ gax/1.45.0 grpc/1.21.0}
Body: customer_id: "yyyyyyyyyy"
operations {
  update {
    resource_name: "customers/yyyyyyyyyy/campaignCriteria/zzzzzzzzzz~30004"
    campaign {
      value: "customers/yyyyyyyyyy/campaigns/zzzzzzzzzz"
    }
    criterion_id {
      value: 30004
    }
    negative {
    }
    device {
      type: CONNECTED_TV
    }
    bid_modifier {
      value: 4.5
    }
  }
  update_mask {
    paths: "bid_modifier"
  }
}
partial_failure: true


Response
--------
Headers: 
Metadata(content-disposition=attachment,content-type=application/grpc,request-id=xfa-FSqq-vQBvKXT_siBwA,date=Thu,
 
05 Sep 2019 09:36:06 GMT,alt-svc=quic=":443"; ma=2592000; v="46,43,39")
Body: results {
}
partial_failure_error {
  code: 3
 * message: "Resource was not found., at operations[0]."*
  details {
    type_url: 
"type.googleapis.com/google.ads.googleads.v2.errors.GoogleAdsFailure"
    value: "\nH\n\0028\003\022\027Resource was not 
found.\032\027*\025CriterionId{id=30004}\"\020\022\016\n\noperations\022\000"
  }
}

Failure message: null
Status: Status{code=OK, description=null, cause=null}.

2019-09-05 09:36:06,466 [main] INFO  
c.t.s.c.g.i.s.CampaignTargetServiceClient - Google add campaign targets 
operation 0 failed for account yyyyyyyyyy with errors: [error_code {
  mutate_error: RESOURCE_NOT_FOUND
}
message: "*Resource was not found*."
trigger {
 * string_value: "CriterionId{id=30004}"*
}
location {
  field_path_elements {
    field_name: "operations"
    index {
    }
  }
}
]

Thanks,
Alok

On Tuesday, September 3, 2019 at 3:55:26 PM UTC+5:30, alok wrote:
>
> Hi,
>
> I am trying to add campaign targets using java client library but getting 
> below error while adding device targets.I followed the approach mentioned 
> in Google Ads API examples 
>
> https://github.com/googleads/google-ads-java/blob/master/google-ads-examples/src/main/java/com/google/ads/googleads/examples/targeting/AddCampaignTargetingCriteria.java
>
> Note that location and proximity targets are getting added successfully 
> but *device targets returns error 
> "OPERATOR_NOT_SUPPORTED_FOR_CRITERION_TYPE"*
> *Is there bug in google Ads API while adding device targets, if yes any 
> timelines when it will be resolved or is there any problem in below 
> request.*
>
> Request and Response are below:
>
> Request
> -------
> MethodName: 
> google.ads.googleads.v2.services.CampaignCriterionService/MutateCampaignCriteria
> Endpoint: googleads.googleapis.com:443
> Headers: {developer-token=TOKEN, login-customer-id=xxxxxxxxxx, 
> x-goog-api-client=gl-java/1.8.0_201 gapic/ gax/1.45.0 grpc/1.21.0}
> Body: customer_id: "yyyyyyyyyy"
> operations {
>   create {
>     campaign {
>       value: "customers/yyyyyyyyyy/campaigns/aaaaaaaaaa"
>     }
>     criterion_id {
>       value: 30001
>     }
>     negative {
>     }
>     device {
>       type: MOBILE
>     }
>     bid_modifier {
>       value: 4.5
>     }
>   }
> }
> operations {
>   create {
>     campaign {
>       value: "customers/yyyyyyyyyy/campaigns/aaaaaaaaaa"
>     }
>     negative {
>     }
>     bid_modifier {
>       value: 3.4
>     }
>     proximity {
>       geo_point {
>         longitude_in_micro_degrees {
>           value: -178337050
>         }
>         latitude_in_micro_degrees {
>           value: 28422800
>         }
>       }
>       radius {
>         value: 10.0
>       }
>       radius_units: KILOMETERS
>     }
>   }
> }
> operations {
>   create {
>     campaign {
>       value: "customers/yyyyyyyyyy/campaigns/aaaaaaaaaa"
>     }
>     criterion_id {
>       value: 21132
>     }
>     negative {
>     }
>     location {
>       geo_target_constant {
>         value: "geoTargetConstants/21132"
>       }
>     }
>     bid_modifier {
>       value: 2.3
>     }
>   }
> }
> operations {
>   create {
>     campaign {
>       value: "customers/yyyyyyyyyy/campaigns/aaaaaaaaaa"
>     }
>     criterion_id {
>       value: 21133
>     }
>     negative {
>     }
>     location {
>       geo_target_constant {
>         value: "geoTargetConstants/21133"
>       }
>     }
>     bid_modifier {
>       value: 1.2
>     }
>   }
> }
> partial_failure: true
>
>
> Response
> --------
> Headers: 
> Metadata(content-disposition=attachment,content-type=application/grpc,request-id=7Cs-1xvq5XYUgPAj4vQ4jA,date=Fri,
>  
> 30 Aug 2019 10:09:06 GMT,alt-svc=quic=":443"; ma=2592000; v="46,43,39")
> Body: results {
> }
> results {
>   resource_name: 
> "customers/yyyyyyyyyy/campaignCriteria/aaaaaaaaaa~810693935922"
> }
> results {
>   resource_name: "customers/yyyyyyyyyy/campaignCriteria/aaaaaaaaaa~21132"
> }
> results {
>   resource_name: "customers/yyyyyyyyyy/campaignCriteria/aaaaaaaaaa~21133"
> }
> partial_failure_error {
>   code: 3
>   *message: "This operator cannot be applied to a criterion of this 
> type., at operations[0].create.device"*
>   details {
>     type_url: "
> type.googleapis.com/google.ads.googleads.v2.errors.GoogleAdsFailure"
>     value: "\nm\n\003\350\001\t\022<*This operator cannot be applied to a 
> criterion of this type*
> .\032\002*\000\"$\022\016\n\noperations\022\000\022\b\n\006create\022\b\n\006device"
>   }
> }
>
> Failure message: null
> Status: Status{code=OK, description=null, cause=null}.
>
> 2019-08-30 10:09:08,867 [main] INFO  
> c.t.s.c.g.i.s.CampaignTargetServiceClient - Add campaign targets operation 
> 0 failed for account yyyyyyyyyy with errors: [error_code {
>   campaign_criterion_error: *OPERATOR_NOT_SUPPORTED_FOR_CRITERION_TYPE*
> }
> message: "This operator cannot be applied to a criterion of this type."
> trigger {
>   string_value: ""
> }
> location {
>   field_path_elements {
>     field_name: "*operations*"
>     index {
>     }
>   }
>   field_path_elements {
>     field_name: "*create*"
>   }
>   field_path_elements {
>     field_name: "*device*"
>   }
> }
> ]
>
> Thanks,
> Alok
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
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 adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/f3adee71-c3a4-4c95-abbf-6a62bbef8374%40googlegroups.com.

Reply via email to