What is the best way to get list of non-mcc accounts?

77 views
Skip to first unread message

Alexander Belozerov

unread,
Apr 4, 2019, 5:08:44 PM4/4/19
to AdWords API and Google Ads API Forum
Hello there,
Ive got a tree-like mcc structure, such as that mcc of multiple levels on top of each other.

What is the best way to get a list of non-mcc customer ids in order to be able to query stats for them (it is not possible to query for mcc account)?


This code return all accounts under master mcc including mcc:
query = SELECT customer_client.client_customer FROM customer_client
response = ga_service.search(customer_id = MASTER_MCC, query = query)

I wonder what is the best way to get non-mcc accounts on all levels?

Thanks,
Alex

googleadsapi...@google.com

unread,
Apr 4, 2019, 10:12:17 PM4/4/19
to AdWords API and Google Ads API Forum
Hi Alex,

You could use a filter for the field customer.manager and set this to FALSE to return only client accounts in your query. Let me know if this helps.

Regards,
Dannison
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/b579b039-4785-404c-909e-251d5ae755a4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Alexander Belozerov

unread,
Apr 5, 2019, 3:02:20 PM4/5/19
to AdWords API and Google Ads API Forum
Hi Dannison,
Thank you for your message,
Could you please help with the query?

When i do something like this with my master MCC:
'SELECT customer_client.client_customer, customer.manager FROM customer_client'

I get customer.manager = true for all accounts. So this particular query doesn't solve the issue. But i wonder if you meant to use customer.manager in some other way?


Thanks,
Alex

googleadsapi...@google.com

unread,
Apr 8, 2019, 3:54:26 AM4/8/19
to AdWords API and Google Ads API Forum
Hi Alex,

If you are running this query in the root MCC account, then it should return all accounts under that MCC account (including sub-MCC's and client accounts under the sub-MCC account). Upon replication, I was able to get all the accounts of my root MCC hierarchy. However, the customer.manager always returned a value of TRUE even for client accounts. Could you confirm if this is also what you are encountering? I will file a bug report on this and provide you updates once available. Ideally, the customer.manager field should return TRUE if the account is a MCC account and FALSE if it is a client account.

Regards,
Dannison
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/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

googleadsapi...@google.com

unread,
Apr 8, 2019, 4:14:16 AM4/8/19
to AdWords API and Google Ads API Forum
Hi Alex,

Upon further investigation, the result appearing in the query you are using is indeed correct. The result should return all accounts (including sub-MCC and client accounts). However, there is no field to determine whether the customer_client account returned is a manager account or not. The customer.manager field only returns the value of the account you are using to run the service. Instead of filing a bug report, I will file a feature request on your behalf.

Regards,
Dannison
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/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

On 04/05/19 23:42:47 dju...@gmail.com wrote:

googleadsapi...@google.com

unread,
Apr 22, 2019, 11:30:15 PM4/22/19
to AdWords API and Google Ads API Forum
Hi Alex,

I was able to receive an update from the engineering team, the team is aware of this and is currently looking into how to improve this. In the meantime, you can collect the customer IDs from the customer_client and then issue a separate request to retrieve the corresponding customer resources and their customer.manager attribute.

Regards,
Dannison
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/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

On 04/05/19 23:42:47 dju...@gmail.com wrote:
Reply all
Reply to author
Forward
0 new messages