Hello,

I am currently working on a project where I need to construct a detailed, 
tree-like view of product partitions for shopping campaigns, including both 
subdivisions (intermediate nodes) and units (leaf nodes). 

I am in the process of retrieving listing_group data. I would like to know 
if there is a way to GET both SUBDIVISIONS and UNITS together. Or would I 
have to make two separate request and combine the data (someway on 
server-side or client)? 

My aim is to return the complete product partition tree for my currently 
active Google Ads Shopping campaigns. Right now I am under the impression I 
need to do both separately.

For Example I am using this query :
 SELECT 
  ad_group_criterion.listing_group.type, 
  ad_group_criterion.listing_group.case_value.product_type.level, 
  ad_group_criterion.listing_group.case_value.product_type.value, 
  ad_group_criterion.listing_group.case_value.product_item_id.value, 
  ad_group_criterion.listing_group.parent_ad_group_criterion, 
  ad_group_criterion.listing_group.path, 
  ad_group.id 
FROM ad_group_criterion 
WHERE 
  ad_group_criterion.listing_group.type = 'SUBDIVISION'  
  AND ad_group.id = ${adGroupId}

I mapped over the result and logged the object for listing_group.
(random numbers to remove my actual ids)

[
  {
    type: 2,
    case_value: null,
    parent_ad_group_criterion: 'customers/customerId/adGroupCriteria/1~6',
    path: xt { dimensions: [Array] }
  },
  {
    type: 2,
    case_value: null,
    parent_ad_group_criterion: null,
    path: xt { dimensions: [] }
  },
  {
    type: 2,
    case_value: { product_type: [Object], product_item_id: null },     
    parent_ad_group_criterion: 'customers/customerId/adGroupCriteria/1~6',
    path: xt { dimensions: [Array] }
  }
]

I then logged the paths: 
[
  [ Ut { product_brand: [Kt] } ],
  [],
  [ Ut { product_brand: [Kt] }, Ut { product_type: [Xt] } ]
]
My impression is this is the root node, brand node and product type node, 
which would then lead to my product_item_ids.

Is it possible to query both subdivisions and units in the results? 

Kind Regards,
Michael H.

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/b1d3c99e-60fd-45d1-865b-29208621746dn%40googlegroups.com.

Reply via email to