My code : String assetGroupResourceName = 
"customers/2966251517/assetGroups/6483919124";
long assetGroupdId= Long.parseLong(assetGroupResourceName.substring(
assetGroupResourceName.lastIndexOf("/") + 1));
mutateOperations.clear();
System.out.println("assetGroupResourceName" + assetGroupResourceName);
//AssetGroupListingGroupFilter.Builder listingGroupFilter = 
AssetGroupListingGroupFilter.newBuilder().setAssetGroup(assetGroupResourceName).setType(ListingGroupFilterTypeEnum.ListingGroupFilterType.SUBDIVISION).setListingSource(ListingGroupFilterListingSourceEnum.ListingGroupFilterListingSource.SHOPPING);
AssetGroupListingGroupFilter listingGroupFilter = 
AssetGroupListingGroupFilter.newBuilder()
.setAssetGroup(ResourceNames.assetGroup(Long.parseLong(saInfo.getAccountId()), 
assetGroupdId))
//.setResourceName(ResourceNames.assetGroupListingGroupFilter(Long.parseLong(saInfo.getAccountId()),
 
assetGroupdId, 11339184668L))
// Since this is the root node, do not set the ParentListingGroupFilter. 
For all other
// nodes, this would refer to the parent listing group filter resource name.
// .setParentListingGroupFilter("PARENT_FILTER_NAME")
//
// Unlike AddPerformanceMaxRetailCampaign, the type for the root node here 
must be
// SUBDIVISION because it will have child partitions under it.
.setType(ListingGroupFilterTypeEnum.ListingGroupFilterType.SUBDIVISION)
// Specifies that this uses the shopping listing source because it is a 
Performance
// Max campaign for retail.
.setListingSource(ListingGroupFilterListingSourceEnum.
ListingGroupFilterListingSource.SHOPPING)

//.setParentListingGroupFilter(ResourceNames.assetGroupListingGroupFilter(Long.parseLong(saInfo.getAccountId()),
 
assetGroupdId, 11339184668L))
//.setCaseValue(ListingGroupFilterDimension.newBuilder().setProductCustomAttribute(ListingGroupFilterDimension.ProductCustomAttribute.newBuilder().setValue("10-10").setIndex(ListingGroupFilterCustomAttributeIndexEnum.ListingGroupFilterCustomAttributeIndex.INDEX0).build()).build())
// Note the case_value is not set because it should be undefined for the 
root node.
.build();

Error : com.google.ads.googleads.v15.errors.GoogleAdsException: errors {
  error_code {
    asset_group_listing_group_filter_error: 
SUBDIVISION_MUST_HAVE_EVERYTHING_ELSE_CHILD
  }
  message: "Listing Group SUBDIVISION node must have everything else child."
  location {
    field_path_elements {
      field_name: "mutate_operations"
      index: 0
    }
    field_path_elements {
      field_name: "asset_group_listing_group_filter_operation"
    }
    field_path_elements {
      field_name: "create"
    }
    field_path_elements {
      field_name: "type"
    }
  }
}
request_id: "ijlCc3TXKxRNp6AuhS5NFQ"

Thanks
Tanish
On Thursday, 23 November 2023 at 17:42:36 UTC+5:30 Google Ads API Forum 
Advisor wrote:

> Hi Tanish,
>
> Thank you for reaching out to the Google Ads API support team.
>
> After reviewing your concern, I understand that you want to create listing 
> groups for PMAX campaigns. Yes, you can create listing groups using the 
> example provided in the Google Ads API documentation Creating Shopping 
> Listing Groups 
> <https://developers.google.com/google-ads/api/docs/performance-max/listing-groups>.
>  
> The example performance Max listing groups 
> <https://developers.google.com/google-ads/api/docs/performance-max/listing-groups#performance_max_listing_groups>
>  
> demonstrates how to create a new listing group for PMAX campaigns.
>
> If the issue persists, please provide us with the complete API logs (
> *request* 
> <https://developers.google.com/google-ads/api/docs/concepts/field-service#request>
>  and  
> <https://developers.google.com/google-ads/api/docs/concepts/field-service#response>
> *response* 
> <https://developers.google.com/google-ads/api/docs/concepts/field-service#response>
>  with  
> <https://developers.google.com/google-ads/api/docs/concepts/call-structure#request-id>
> *request-id* 
> <https://developers.google.com/google-ads/api/docs/concepts/call-structure#request-id>
>  and  
> <https://developers.google.com/google-ads/api/docs/concepts/call-structure#request_headers>*request
>  
> header* 
> <https://developers.google.com/google-ads/api/docs/concepts/call-structure#request_headers>)
>  
> generated at your end so that we can better assist you.
>
> If you are using a client library and haven't enabled the logging yet, I 
> would request you to enable logging for the specific client library that 
> you are using. You can refer to the guides  
> <https://developers.google.com/google-ads/api/docs/client-libs/java/logging>
> *Java* 
> <https://developers.google.com/google-ads/api/docs/client-libs/java/logging>
> ,  
> <https://developers.google.com/google-ads/api/docs/client-libs/dotnet/logging>
> *.Net* 
> <https://developers.google.com/google-ads/api/docs/client-libs/dotnet/logging>
> ,  
> <https://developers.google.com/google-ads/api/docs/client-libs/php/logging>
> *PHP* 
> <https://developers.google.com/google-ads/api/docs/client-libs/php/logging>
> ,  
> <https://developers.google.com/google-ads/api/docs/client-libs/python/logging>
> *Python* 
> <https://developers.google.com/google-ads/api/docs/client-libs/python/logging>
> ,  
> <https://developers.google.com/google-ads/api/docs/client-libs/ruby/logging>
> *Ruby* 
> <https://developers.google.com/google-ads/api/docs/client-libs/ruby/logging>
>  or  
> <https://developers.google.com/google-ads/api/docs/client-libs/perl/logging>
> *Perl* 
> <https://developers.google.com/google-ads/api/docs/client-libs/perl/logging> 
> to 
> enable logging at your end. For REST interface requests, you can enable 
> logging via the curl command by using the -i flag
>
> You can send the details via *Reply privately to the author option* or a 
> *direct 
> private reply* to this email.
>   
> This message is in relation to case "ref:!00D1U01174p.!5004Q02qUeqY:ref"
>
> Thanks,
>   
> [image: Google Logo] Google Ads API Team 
>
>  
>
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 
"Google Ads API and AdWords 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/ae49ef58-0900-4f72-9697-6834aed506bbn%40googlegroups.com.
  • Li... Tanish Gupta
    • ... 'Google Ads API Forum Advisor' via Google Ads API and AdWords API Forum
      • ... Tanish Gupta
        • ... Tanish Gupta

Reply via email to