Hello Google,

I find why, I use "product_custom_attribute" for create a new 
"adGroupCriterion" / "listingGroup",  page 
support: 
https://developers.google.com/google-ads/api/docs/shopping-ads/create-listing-groups


in your example you used " product_brand " ->

        new ListingDimensionInfo([
            'product_brand' => new ProductBrandInfo()
        ]),


but  it doesn't work for "product_custom_attribute", if we use like this -> 

        new ListingDimensionInfo([
            ' product_custom_attribute  
' => new ProductCustomAttributeInfo()
        ]),


we must set function like this, this function works !!! ->
new ListingDimensionInfo([
            ' product_custom_attribute  ' => new ProductCustomAttributeInfo(
                 'index' => ProductCustomAttributeIndex::INDEX0
)
        ]),



Please update your documents, it is not clear for us.

Thanks,



Le dimanche 10 octobre 2021 à 10:54:56 UTC+2, Jian Hu a écrit :

> Hello Team Google Ads,  
>
> Thanks very much for your help.
> I can’t  succeed for add a *AdGroupCriterion* with listing_group "
> *product_custom_attribute**", (P.S: I can create AdGroupCriterion with 
> listing_group "product_condition**", I use the same function for create 
> “product_custom_attribute”, but it doesn’t work**)*  
>
> I understand well this error from "criterion_error: Subdivided listing 
> groups must have an "others" case.", 
>
> *But I think it’s linked another problem "field_error: The required field 
> was not present."*
>
> *You can find it in log.*
>
> Could you give some information , *which field I need to add ?*
>
> *Thanks very much !*
>
>  
>
>  
>
> My Log:
>
>  [2021-10-08T10:41:41.701414+02:00] google-ads.WARNING: Request made: 
> Host: "googleads.googleapis.com", Method: 
> "/google.ads.googleads.v8.services.AdGroupCriterionService/MutateAdGroupCriteria",
>  
> CustomerId: 5537212111, RequestId: "bCJvjBPVGatuarzbrjkdOQ", IsFault: 1, 
> FaultMessage: *"["Subdivided listing groups must have an \"others\" 
> case.",**"The required field was not present.*"]"  
>
> [2021-10-08T10:41:41.701619+02:00] google-ads.NOTICE: Request
>
> -------
>
> Method Name: 
> /google.ads.googleads.v8.services.AdGroupCriterionService/MutateAdGroupCriteria
>
> Host: googleads.googleapis.com
>
> Headers: {
>
>     "x-goog-api-client": "gl-php\/7.4.23 gapic\/ gax\/1.9.1 grpc\/1.25.0 
> rest\/1.9.1",
>
>     "x-goog-request-params": "customer_id=5537212111",
>
>     "developer-token": "REDACTED",
>
>     "login-customer-id": "2839567378 <(283)%20956-7378>"
>
> }
>
> Request: 
>
> [
>
>    "customerId" => "xxxxxxxxxxx", 
>
>    "operations" => [
>
>          [
>
>             "create" => [
>
>                "resourceName" => 
> "customers/xxxxxxxxxx/adGroupCriteria/xxxxxxxxxx~-1", 
>
>                "status" => "ENABLED", 
>
>                "listingGroup" => [
>
>                   "type" => "SUBDIVISION" 
>
>                ] 
>
>             ] 
>
>          ], 
>
>          [
>
>                      "create" => [
>
>                         "status" => "ENABLED", 
>
>                         "adGroup" => 
> "customers/xxxxxxxxxx/adGroups/xxxxxxxxxx", 
>
>                         "cpcBidMicros" => "10000", 
>
>                         "listingGroup" => [
>
>                            "type" => "UNIT", 
>
>                            "caseValue" => [
>
>                               "productCustomAttribute" => [
>
>                               ] 
>
>                            ], 
>
>                            "parentAdGroupCriterion" => 
> "customers/xxxxxxxxxx/adGroupCriteria/xxxxxxxxxx~-1" 
>
>                         ] 
>
>                      ] 
>
>                   ] 
>
>       ] 
>
> ];
>
> Response
>
> -------
>
> Headers: {
>
>     "request-id": "bCJvjBPVGatuarzbrjkdOQ",
>
>     "date": "Fri, 08 Oct 2021 08:41:42 GMT",
>
>     "alt-svc": "h3=\":443\"; ma=2592000,h3-29=\":443\"; 
> ma=2592000,h3-T051=\":443\"; ma=2592000,h3-Q050=\":443\"; 
> ma=2592000,h3-Q046=\":443\"; ma=2592000,h3-Q043=\":443\"; 
> ma=2592000,quic=\":443\"; ma=2592000; v=\"46,43\""
>
> }
>
>  
>
> Fault
>
> -------
>
> Status code: 3
>
> Details: Request contains an invalid argument.
>
> Failure: 
> {"errors":[{"errorCode":{"criterionError":"LISTING_GROUP_SUBDIVISION_REQUIRES_OTHERS_CASE"},"message":"Subdivided
>  
> listing groups must have an \"others\" 
> case.","trigger":{"int64Value":"-1"},"location":{"fieldPathElements":[{"fieldName":"operations","index":0},{"fieldName":"create"},{"fieldName":"listing_group"},{"fieldName":"type*"}]}},{"errorCode":{"fieldError":"REQUIRED"},"message":"The
>  
> required field was not 
> present.","*location":{"fieldPathElements":[{"fieldName":"operations","index":1},{"fieldName":"create"},{"fieldName":"listing_group"},{"fieldName":"case_value"},{"fieldName":"product_custom_attribute"},{"fieldName":"index"}]}}],"requestId":"bCJvjBPVGatuarzbrjkdOQ"}
>   
>
>
> Request with ID 'bCJvjBPVGatuarzbrjkdOQ' has failed.
>
> Google Ads failure details:
>
>                 *criterion_error: Subdivided listing groups must have an 
> "others" case.*
>
>                 *field_error: The required field was not present.*
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/e47273e1-2062-48ae-a74b-0fd1bdabaeb1n%40googlegroups.com.
  • Ho... Jian Hu
    • ... Jian Hu
      • ... 'Google Ads API Forum Advisor' via AdWords API and Google Ads API Forum
        • ... 'Google Ads API Forum Advisor' via AdWords API and Google Ads API Forum
          • ... Jian Hu
            • ... 'Google Ads API Forum Advisor' via AdWords API and Google Ads API Forum

Reply via email to