I am using Python google-ads library for Google Ads API v2 (Beta)
Using test account I am trying to create 3 product Groups in an empty 
AdGroup.
I have been able to successfully create root single ProductGroup with type 
`UNIT` but cannot create `SUBDIVISION` ones.
Here are my AdGroupCriterionOperation protobuf messages:

[create {
   resource_name: "customers/5936312994/adGroupCriteria/82410873572~-25"
   status: PAUSED
   ad_group {
     value: "customers/5936312994/adGroups/82410873572"
   }
   listing_group {
     type: SUBDIVISION
   }
 }, create {
   resource_name: "customers/5936312994/adGroupCriteria/82410873572~-27"
   status: ENABLED
   ad_group {
     value: "customers/5936312994/adGroups/82410873572"
   }
   negative {
     value: true
   }
   listing_group {
     type: UNIT
     case_value {
       listing_custom_attribute {
         index: INDEX0
       }
     }
     parent_ad_group_criterion {
       value: "customers/5936312994/adGroupCriteria/82410873572~-25"
     }
   }
 }, create {
   resource_name: "customers/5936312994/adGroupCriteria/82410873572~-26"
   status: ENABLED
   ad_group {
     value: "customers/5936312994/adGroups/82410873572"
   }
   cpc_bid_micros {
     value: 10000000
   }
   listing_group {
     type: UNIT
     case_value {
       listing_custom_attribute {
         value {
           value: "1000-2000"
         }
         index: INDEX0
       }
     }
     parent_ad_group_criterion {
       value: "customers/5936312994/adGroupCriteria/82410873572~-25"
     }
   }
 }]

When I am trying to call mutate method of AdGroupCriterionService I am 
getting 3 errors (one for each of the operations above).
for the root operation I am getting 
`LISTING_GROUP_SUBDIVISION_REQUIRES_OTHERS_CASE` and for both children I am 
getting: `LISTING_GROUP_DOES_NOT_EXIST`
Here are the exact messages:

errors {
  error_code {
    ad_group_criterion_error: LISTING_GROUP_SUBDIVISION_REQUIRES_OTHERS_CASE
  }
  message: "Subdivided listing groups must have an \"others\" case."
  trigger {
    string_value: "ProductPartition{id=TempCriterionId{id=25}, 
bidSimulatorStatus=null, partitionType=SUBDIVISION, parentCriterionId=null, 
productGroup=null, productGroupObsoleteStatus=null, caseValue=null, 
decisionPath=[], salesCountry=null, merchantId=null, 
hasPromotedSuggestion=null}"
  }
}
errors {
  error_code {
    ad_group_criterion_error: LISTING_GROUP_DOES_NOT_EXIST
  }
  message: "Listing group referenced in the operation was not found in the 
ad group."
  trigger {
    string_value: "TempCriterionId{id=25}"
  }
  location {
    field_path_elements {
      field_name: "operations"
      index {
      }
    }
    field_path_elements {
      field_name: "create"
    }
    field_path_elements {
      field_name: "listing_group"
    }
    field_path_elements {
      field_name: "parent_ad_group_criterion"
    }
  }
}
errors {
  error_code {
    ad_group_criterion_error: LISTING_GROUP_DOES_NOT_EXIST
  }
  message: "Listing group referenced in the operation was not found in the 
ad group."
  trigger {
    string_value: "TempCriterionId{id=25}"
  }
  location {
    field_path_elements {
      field_name: "operations"
      index {
        value: 1
      }
    }
    field_path_elements {
      field_name: "create"
    }
    field_path_elements {
      field_name: "listing_group"
    }
    field_path_elements {
      field_name: "parent_ad_group_criterion"
    }
  }
}

I am assuming that if the root AdGroupCriterion was successful then both 
children criterions would be created as well. But I cannot figure out how 
to change my operation in order to create the root AdGroupCriterion with 
`SUBDIVISION` listing_group type.
The messages I am trying to create in my testing account are the exact 
copies from the production account.
And I didn't find any differences concerning listing_group logic in Java 
example of creation several ProductGroups at once 
<https://developers.google.com/google-ads/api/docs/samples/add-shopping-product-listing-group-tree>
 from 
the API docs.

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/9f97b786-ee94-4410-ad17-11cf467f7cfb%40googlegroups.com.

Reply via email to