Listing groups creation in PMAX campaigns

283 views
Skip to first unread message

Tanish Gupta

unread,
Nov 23, 2023, 3:31:31 AM11/23/23
to Google Ads API and AdWords API Forum
Hi

I need to know wheter i can create listing groups through this example or I need another method of implementation
https://developers.google.com/google-ads/api/docs/shopping-ads/create-listing-groups

Thanks
Tanish

Google Ads API Forum Advisor

unread,
Nov 23, 2023, 7:12:36 AM11/23/23
to tanish.gupta....@gmail.com, adwor...@googlegroups.com
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. The example 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 and response with request-id and request header) 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 Java, .Net, PHP, Python, Ruby or Perl 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,
 
Google Logo Google Ads API Team

 

Tanish Gupta

unread,
Nov 30, 2023, 9:12:33 PM11/30/23
to Google Ads API and AdWords API Forum
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

Google Ads API Forum Advisor

unread,
Dec 1, 2023, 7:36:45 PM12/1/23
to tanish.gupta....@gmail.com, adwor...@googlegroups.com
Hi,

Thank you for getting back to us.

Upon checking further, please note that a subdivision introduces a new level in the tree, while units are leaves of the tree. Each subdivision must always be completely partitioned, so it must contain a node representing other. This tree structure with subdivisions and units lets you set bids at the unit level and also ensures that every product falls into one and only one unit node in the tree. I would recommend you refer to the 'Creating Shopping Listing Groups', 'Performance Max listing groups' and 'AssetGroupListingGroupFilterService' API documentations for more information.

If still the issue persists, please provide us with the complete API logs (request and response with request-id and request header) generated at your end. 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 Java, .NetPHPPythonRuby or Perl to enable logging at your end. For REST interface requests, you can enable logging via the curl command by using the -i flag.

Tanish Gupta

unread,
Dec 4, 2023, 5:32:00 AM12/4/23
to Google Ads API and AdWords API Forum
Can you give me a example of making a subdivision tree in omax retail campaign as i am not able to create this and according to example provided in google ads docs is not working for me

Google Ads API Forum Advisor

unread,
Dec 4, 2023, 7:25:11 PM12/4/23
to tanish.gupta....@gmail.com, adwor...@googlegroups.com

Hi,

Thank you for getting back to us.

As said earlier, please go through the 'code_sample' snippet; it explains the creation of subdivision nodes in the Pmax campaign.Even after following the code snippet,if the issue still persists, please provide us with the complete API logs (request and response with request-id and request header) 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 Java, .Net, PHP, Python, Ruby or Perl 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 the Reply privately to the author option or a direct private reply to this email.

Reply all
Reply to author
Forward
0 new messages