Why are cancelled accounts being returned by ManagedCustomerService?

198 views
Skip to first unread message

Alejandro Bullrich

unread,
Jul 12, 2018, 5:30:22 PM7/12/18
to AdWords API and Google Ads API Forum
Hello everyone,

I'm new to this forum, but not so new to Adwords. As most of you may know, accounts can be cancelled (intentionally or not). Cancelled accounts will not count towards the MCC account limit. And according to this reply, cancelled accounts will not be brought by a ManagedCustomerService get method.

This is all great, however, when I test these statements, the premise doesn't seem to hold true. When I query accounts from an MCC, cancelled accounts are still being returned. I have tested this with both testing and real MCCs.

This is my code:

ManagedCustomerServiceInterface originCustomerService = getManagedCustomerService(customerId, refreshToken);

// Create selector builder.
int offset = 0;
SelectorBuilder selectorBuilder = new SelectorBuilder().fields(ManagedCustomerField.CustomerId, ManagedCustomerField.Name)
   .offset(offset).limit(PAGE_SIZE);

// Get results.
ManagedCustomerPage page;

// Map from customerId to customer node.
Map<Long, ManagedCustomerTreeNode> customerIdToCustomerNode = com.google.common.collect.Maps.newHashMap();

// Map from each parent customer ID to its set of linked child customer
// IDs.
SortedSetMultimap<Long, Long> parentIdToChildIds = TreeMultimap.create();

page = adwordsApiCaller.executeCall(() -> originCustomerService.get(selectorBuilder.build()));

Do I need to wait some time for cancelled accounts to be taken as such by the API? Maybe the SelectorBuild is missing something?

Please let me know if you need any further information. Any help provided will be deeply appreciated.

All the best,

Alejandro

Peter Oliquino (AdWords API Team)

unread,
Jul 13, 2018, 1:21:31 AM7/13/18
to AdWords API and Google Ads API Forum
Hi Alejandro,

If the link is still existing between the MCC and the cancelled accounts, then, they will indeed still be returned when using the ManagedCustomerService.get() method. If you wish to fully discard them from your hierarchy, you can terminate the link by referring to this guide in the "Manager or client terminates links" section.

I hope this helps.

Thanks and regards,
Peter
AdWords API Team
Message has been deleted

Alejandro Bullrich

unread,
Jul 13, 2018, 10:17:55 AM7/13/18
to AdWords API and Google Ads API Forum
Hi Peter,

Thanks for your response. The problem I'm facing is that I used to retrieve accounts in order to determine the ammount of accounts an MCC is currently managing. As cancelled accounts don't count towards the MCC account limit, the information I'm handling now with the ManagedCustomerService doesn't abide to my needs.

Basically now in order to determine if an MCC has available space, I need to try to insert an account and catch an error. Another alternative would be using accountLabels or something of the sort to be able to detect cancelled accounts. Is this correct?

Is there any practical way to determine which accounts have been cancelled?

Once again, I'm very grateful for your response.

Best regards,

Alejandro

Peter Oliquino (AdWords API Team)

unread,
Jul 16, 2018, 1:30:41 AM7/16/18
to AdWords API and Google Ads API Forum
Hi Alejandro,

Currently, there is no feature in the AdWords API wherein you can identify if the account has already been cancelled as seen in the ManagedCustomer documentation. So, as for your suggestion, applying AccountLabels to cancelled accounts would be an alternative way to identify them via the AdWords API.

Best regards,
Peter
AdWords API Team

Alperen Belgic

unread,
Sep 4, 2018, 5:13:29 AM9/4/18
to AdWords API and Google Ads API Forum
Hi, 

When I only pick the items which have false value for isHidden member in page.links list, I can get the list that I see in the interface. 

This is the .net library (201806) and only my experience, I am not sure about the results of other inputs.

You may have a look if you would like. 

Alperen 

Dhanya Sundararaju (AdWords API Team)

unread,
Sep 4, 2018, 1:51:52 PM9/4/18
to AdWords API and Google Ads API Forum
Hi Alperen,

Having ManagedCustomerService.ManagedCustomerLink#ishidden = false is not same as cancelled account as it is an option to hide accounts that you do not wish to see in the Manager view. The best option would be to have a label as discussed earlier. 

Regards,
Dhanya, AdWords API Team

Alperen Belgic

unread,
Sep 6, 2018, 11:03:23 AM9/6/18
to adwordsapiad...@google.com, adwor...@googlegroups.com
You are absolutely right. In my case, there was no canceled account which is not hidden. 

Thank you,

--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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...@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 a topic in the Google Groups "AdWords API and Google Ads API Forum" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/adwords-api/NC5vIw0_Shs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to adwords-api...@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/17e61eb4-3de2-491f-b71b-62f3fea00517%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages