Regarding Client Hierarchy in the Ads API

225 views
Skip to first unread message

Dorian Kind

unread,
May 2, 2019, 4:59:32 AM5/2/19
to AdWords API and Google Ads API Forum
Hi,

a common use case we have is to create an tree-like hierarchy of all Ads accounts that are accessible from a given Ads OAuth2 credential. In the Adwords API, it took a single call to the ManagedCustomerService to receive all the information required to build such a data structure.

As far as I can tell so far, in the Ads API the number of calls to build an equivalent hierarchy grows linearly with the number of accounts that are accessible. It seems that we'll have to

1) Use the customer_client resource to list all reachable accounts
2) For each gathered account, set the account's ID as login-customer-id and use the customer resource to obtain account name and type (sub-manager or actual account)
3) For each manager account identified in 2), set the account's ID as login-customer-id and use the customer_client_link resource to gather that manager's sub-accounts

I hope I'm misunderstanding something because it looks like the process above could take a while for large accounts structures (we sometimes encounter MCCs with over 1'000 sub-managers and accounts).

Is there a quicker way to get a list of all accessible accounts, including the links between managers and accounts?

Thanks for any feedback and best regards,
Dorian

googleadsapi...@google.com

unread,
May 2, 2019, 2:59:05 PM5/2/19
to AdWords API and Google Ads API Forum
Hello Dorian,

In Google Ads API we don't have a way to get the account hierarchy with the account details and link details in a single call. You have to follow the process you mentioned to build that hierarchy. Adding to the customer_client_link, when you use this resource you would be getting all the links of the manager account (even of the canceled account's). Even with the customer_client resource you will get canceled accounts and it is not possible to filter them out. Out team is aware of the hierarchy(time consuming, more requests) and the account status issues and will update you once I have more information.

Regards,
Sai Teja, Google Ads API Team


=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
    https://ads-developers.googleblog.com/search/label/google_ads_api
    https://developers.google.com/adwords/api/community/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

Was your question answered? Please rate your experience with us by taking a short survey.
If not -- reply to this email and tell us what else we can do to help.

Take Survey

Also find us on our blog and discussion group:
http://googleadsdeveloper.blogspot.com/search/label/adwords_api
https://developers.google.com/adwords/api/community/

--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 adwor...@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscribe@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 "AdWords API and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/64bca39f-bc86-4e89-a4bb-9a0b4168e3ff%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Dorian Kind

unread,
Mar 28, 2022, 4:55:07 AM3/28/22
to Google Ads API and AdWords API Forum
Hi Sai Teja,

it's been three years without an update. I still believe there's worth in having a more efficient way of downloading the whole account hierarchy without having to send (number of accessible manager accounts) +1 requests. Are you planning on adding some features towards that end?

Best,
Dorian


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 "AdWords API and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api...@googlegroups.com.

Google Ads API Forum Advisor

unread,
Mar 28, 2022, 11:28:59 PM3/28/22
to dor...@webrepublic.ch, adwor...@googlegroups.com
Hi Dorian,

I am also a member of the Google Ads API team and let me provide support to your concern.

It seems that you want to get the account hierarchy of your MCC account. With this, try using this implementation on retrieving account hierarchy.

Let me know if this is what you are looking for. Let me know also if you have further concerns.

Regards,
Google Logo
Ernie John
Google Ads API Team
 


ref:_00D1U1174p._5004Q2Ys3MH:ref

Dorian Kind

unread,
Mar 29, 2022, 8:17:50 AM3/29/22
to Google Ads API and AdWords API Forum
Hi Ernie,

Thanks for your response. I have seen the example code that you linked to and it still doesn't seem very efficient. It will perform 1+N calls to the Ads API, where N is the number of accessible manager accounts for the authenticated user. In larger account hierarchies—which are not uncommon for an agency—this can mean one has to do a couple hundred calls just to get the account structure. In my eyes this is a step back compared to the Adwords API, where the same information could be gathered with a single call (or a small number of calls, if paging is required) to the ManagedCustomerService.

Best,
Dorian

Google Ads API Forum Advisor

unread,
Mar 30, 2022, 2:57:57 AM3/30/22
to dor...@webrepublic.ch, adwor...@googlegroups.com

Hi Dorian,

Thanks for getting back to us.

Kindly note that AdWords API services have greatly changed or been entirely replaced. CustomerService and ManagedCustomerService are significantly different. However, you may check if it suits you to use the customer_client report resource to get customer clients using ​​GoogleAdsService.search or GoogleAdsService.searchStream methods.

Regards,

Google Logo
Yasar
Google Ads API Team
 


ref:_00D1U1174p._5004Q2Ys3MH:ref

Dorian Kind

unread,
Mar 30, 2022, 7:50:57 AM3/30/22
to Google Ads API and AdWords API Forum
Hi Yasar,

I am aware of the fact that the Adwords API services don't always have a direct counterpart in the Ads API. My point is really just that a fundamental use case (at least for agencies that work with Google Ads) for the API is to build a hierarchy of all accessible Ads accounts for a given authenticated user, and this use case is considerably more complex to implement in the Ads API compared to the Adwords API. If I understand Ernie's and your reply correctly, there's also no plans to change that situation.

Best,
Dorian

Google Ads API Forum Advisor

unread,
Mar 31, 2022, 2:49:00 AM3/31/22
to dor...@webrepublic.ch, adwor...@googlegroups.com
Hi Dorian,

Thank you for your reply.

I understand the concern on the new implementation of the get account hierarchy feature. We also are currently not aware of any plans or direction that this current implementation would be undergoing changes.

However, our team could create a feature request, subject for review, regarding your suggestion in making the implementation less complex. For our team to do so, could you share your complete use case as well as relevant details on why the change would be more suitable?

Best regards,

Google Logo
Peter Laurence
Google Ads API Team
 


ref:_00D1U1174p._5004Q2Ys3MH:ref

Dorian Kind

unread,
Apr 12, 2022, 11:05:50 AM4/12/22
to Google Ads API and AdWords API Forum
Hi Peter,

thanks for your continued support. Happy to share our main use case, which is account selection in internal web tools—we are a mid-sized agency and currently manage about 800 Google Ads accounts distributed over around 100 manager accounts in a hierarchy around 3 to 4 levels deep on average.
In order to select the proper Ads account on which to run a specific job in such a tool (they're mostly of the housekeeping and quality assurance type), we've experienced that it's easier for account managers to be able to follow the hierarchy of manager accounts in a tree-like view down to the desired account instead of selecting it from a rather large list directly.
In the Adwords API, implementing such a tree view is simple as it can be done with a single call in the app's backend. While migrating one of our tools to the Ads API, we discovered that we'd now have to do around a hundred calls to get to the same result—which slows down the loading of the tree view significantly, frustrating our users.

I hope this gives some context for a feature request. Feel free to reach out if you need more details.

Best,
Dorian

Dorian Kind

unread,
Apr 13, 2022, 3:50:37 AM4/13/22
to Google Ads API and AdWords API Forum
Hi again,

to follow up on that, one additional advantage of having a tree as opposed to a list is in a situation where an account manager wants to select all accounts under a given manager account except for a small number of them. In a selectable tree that's easy: select the manager account—causing all accounts under it to be selected—and then unselect the ones that aren't required. In a list, this task is obviously much more difficult.

Thanks & best regards,
Dorian

Google Ads API Forum Advisor

unread,
Apr 13, 2022, 9:30:40 AM4/13/22
to dor...@webrepublic.ch, adwor...@googlegroups.com

Hi Dorian,

Thank you for sending the requested information to my colleague. I'm also a member of the Google Ads API team and allow me to assist you here. Moving forward to your concern, I already raised this feature to the rest of my team about retrieving the account hierarchy of all the accounts that authenticated users have direct access to. This feature request is subject for review. New features will be announced in the Ads API release notes and our blog post as well.

Best regards,

Google Logo
Jinky
Google Ads API Team
 


ref:_00D1U1174p._5004Q2Ys3MH:ref
Reply all
Reply to author
Forward
0 new messages