ManagedCustomerService seems to be returning incorrect TestAccount for a couple of ManagedCustomers

58 views
Skip to first unread message

Etleap Dev

unread,
Sep 7, 2018, 7:09:14 PM9/7/18
to AdWords API and Google Ads API Forum
Hello,

We have an application (Etleap) which retrieves data from Google Ads on behalf of users. We have received a few reports that a couple of accounts, which are managed by MCC accounts, are not being processed. We determine whether to process an account by using the ManagedCustomerService and selecting the ManagedCustomerField.TestAccount (boolean which I believe was repurposed/renamed to mean whether or not the account is considered "active"). For a couple of ManagedCustomers, the value for this field is false, when our user claims that the account is indeed active "The account is active with two campaigns currently enabled.  We have data from June to yesterday." This works for the overwhelming majority of adword accounts for this user and across our userbase, so we believe that something is wrong with the particular ManagedCustomer the user is asking about. 

Relevant code:

ManagedCustomerServiceInterface managedCustomerService = service(ManagedCustomerServiceInterface.class, getSession());
Selector selector = new SelectorBuilder().fields(ManagedCustomerField.CustomerId, ManagedCustomerField.TestAccount,
ManagedCustomerField.Name).build();
ManagedCustomerPage managedCustomerPage = managedCustomerService.get(selector);

Additional information:
I can provide the client ID and customer information in a private message if required.

Thanks,
Jordan

Luis Xander Talag (AdWords API Team)

unread,
Sep 10, 2018, 1:28:45 AM9/10/18
to AdWords API and Google Ads API Forum
Hi Jordan,

The testAccount field of the ManageCustomer object does not determine your account status but rather a boolean type of object that will tell you whether your managed customer's account is a test account. The status of account cannot be retrieve via the API as this is currently not supported.

To further investigate the account you mentioned that was not being processed, could you provide more context on the issue you are encountering? If possible, could you provide the complete SOAP request and response logs if you encounter any error? Please reply via Reply privately to author.

Thanks and regards,
Luis
AdWords API Team

Etleap Dev

unread,
Sep 10, 2018, 12:26:19 PM9/10/18
to AdWords API and Google Ads API Forum
Yes, my apologies, how we actually determine whether an account is "active" is if it has any enabled campaigns. Relevant code below:

private boolean hasActiveCampaign(ManagedCustomer customer) throws IOException {
if (customer.getTestAccount()) {
return true;
}

CampaignServiceInterface campaignService = service(CampaignServiceInterface.class,
getSession(customer.getCustomerId().toString()));
Selector selector = new SelectorBuilder()
.fields(CampaignField.Status)
.equals(CampaignField.Status, CampaignStatus.ENABLED.getValue())
.limit(1)
.build();
Campaign[] campaigns = campaignService.get(selector).getEntries();
return campaigns != null && campaigns.length > 0;
}

I will provide the requested customer information to you in a private message shortly.
-Jordan

Etleap Dev

unread,
Sep 11, 2018, 7:49:59 PM9/11/18
to AdWords API and Google Ads API Forum
Thank you for resolving the issue via private reply. For posterity, when the actual customer accounts were reviewed, it turned out the issue was that the campaign was a video campaign. At the moment, video campaigns are only available in the AdWords API reports.
Reply all
Reply to author
Forward
0 new messages