[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"
}
}
}]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"
}
}
}[create {
resource_name: "customers/5936312994/adGroupCriteria/82410873572~-1"
status: ENABLED
listing_group {
type: SUBDIVISION
}
}, create {
status: ENABLED
ad_group {
value: "customers/5936312994/adGroups/82410873572"
}
cpc_bid_micros {
value: 10000000
}
listing_group {
type: UNIT
case_value {
listing_custom_attribute {
index: INDEX0
}
}
parent_ad_group_criterion {
value: "customers/5936312994/adGroupCriteria/82410873572~-1"
}
}
}, create {
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~-1"
}
}
}]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=1}, 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=1}"
}
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=1}"
}
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"
}
}
}[create {
status: ENABLED
ad_group {
value: "customers/5936312994/adGroups/82410873572"
}
cpc_bid_micros {
value: 14000000
}
listing_group {
type: UNIT
case_value {
listing_custom_attribute {
value {
value: "3000-4000"
}
index: INDEX0
}
}
parent_ad_group_criterion {
value: "customers/5936312994/adGroupCriteria/82410873572~-1"
}
}
}, create {
status: ENABLED
ad_group {
value: "customers/5936312994/adGroups/82410873572"
}
cpc_bid_micros {
value: 10000000
}
listing_group {
type: UNIT
case_value {
listing_custom_attribute {
}
}
parent_ad_group_criterion {
value: "customers/5936312994/adGroupCriteria/82410873572~-1"
}
}
}, create {
resource_name: "customers/5936312994/adGroupCriteria/82410873572~-1"
status: ENABLED
listing_group {
type: SUBDIVISION
}
}]errors {
error_code {
field_error: REQUIRED
}
message: "The required field was not present."
trigger {
string_value: ""
}
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: "case_value"
}
field_path_elements {
field_name: "listing_custom_attribute"
}
field_path_elements {
field_name: "index"
}
}
}[create {
status: ENABLED
ad_group {
value: "customers/5936312994/adGroups/82410873572"
}
cpc_bid_micros {
value: 14000000
}
listing_group {
type: UNIT
case_value {
listing_custom_attribute {
value {
value: "3000-4000"
}
index: INDEX0
}
}
parent_ad_group_criterion {
value: "customers/5936312994/adGroupCriteria/82410873572~-1"
}
}
}, create {
status: ENABLED
ad_group {
value: "customers/5936312994/adGroups/82410873572"
}
cpc_bid_micros {
value: 10000000
}
listing_group {
type: UNIT
case_value {
}
parent_ad_group_criterion {
value: "customers/5936312994/adGroupCriteria/82410873572~-1"
}
}
}, create {
resource_name: "customers/5936312994/adGroupCriteria/82410873572~-1"
status: ENABLED
listing_group {
type: SUBDIVISION
}
}][create {
status: ENABLED
ad_group {
value: "customers/5936312994/adGroups/82410873572"
}
cpc_bid_micros {
value: 14000000
}
listing_group {
type: UNIT
case_value {
listing_brand {
value {
value: "\321\215\320\272\320\276\321\207\320\265\320\273\320\276\320\262\320\265\320\272\320\270"
}
}
}
parent_ad_group_criterion {
value: "customers/5936312994/adGroupCriteria/82410873572~-1"
}
}
}, create {
status: ENABLED
ad_group {
value: "customers/5936312994/adGroups/82410873572"
}
cpc_bid_micros {
value: 10000000
}
listing_group {
type: UNIT
case_value {
listing_brand {
}
}
parent_ad_group_criterion {
value: "customers/5936312994/adGroupCriteria/82410873572~-1"
}
}
}, create {
resource_name: "customers/5936312994/adGroupCriteria/82410873572~-1"
status: ENABLED
listing_group {
type: SUBDIVISION
}
}]
ad_group_criterion.listing_group.case_value.CopyFrom(client.get_type('ListingDimensionInfo'))
Hope this helps, please let me know if you have any further questions.
Best,
Ben Karl, Google Ads API Team
the issue here is that one of the AdGroupCriterion in your request needs to have a case_value field that is not set
it's not very clear on how to do that in the Python
ad_group_criterion.listing_group.case_value.listing_brand.SetInParent()This set of documentation shows how to set an empty message field in Python.
ad_group_criterion_operation = client.get_service('AdGroupCriterionOperation', version=GADS_API_V)
ad_group_criterion = ad_group_criterion_operation.createThank you,
Ben, Google Ads API Team
Have you tried calling SetInParent on case_value directly? For example: ad_group_criterion.listing_group.case_value.SetInParent()
My advice was to resolve the error LISTING_GROUP_SUBDIVISION_REQUIRES_OTHERS_CASE, but it does seem that you were able to overcome that.
case_value {
listing_brand {
}
}