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.