CustomerService in v201607

193 views
Skip to first unread message

Karan Vohra

unread,
Aug 8, 2016, 6:31:13 PM8/8/16
to AdWords API Forum
For the MCC account, if i call CustomerService.getCustomers method without setting the customer id header, would i get the list of all customers that the admin account has access to?
For the normal advertiser account, if i call CustomerService.getCustomers method without setting the customer id header, would i get only the advertiser's account detail?

Some clarity would be appreciated as the documentation is confusing me.

Thanks!

Anthony Madrigal

unread,
Aug 8, 2016, 7:40:31 PM8/8/16
to AdWords API Forum
Hi Karan,

If you set the client customer Id from the MCC account, getCustomers should return all the customers under that account. However, if you do not set the client customer Id from the MCC account, you will only have the MCC account returned.

This new method in the API will allow us to make future improvements without having to change the API WSDL in the future.

Please check our blog for any changes regarding this method.

Cheers,
Anthony
AdWords API Team

Sachin Doshi

unread,
Aug 31, 2016, 9:32:59 AM8/31/16
to AdWords API Forum
Also, is there any scenario in which case the call to CustomerService.getCustomers() can return null? 

Thanks,
-Sachin 

Anthony Madrigal

unread,
Aug 31, 2016, 1:53:40 PM8/31/16
to AdWords API Forum
Hi Sachin,

There should be no scenario in which you should get null when calling getCustomers. If you are encountering this, please create a new thread with more details.

Regards,
Anthony
AdWords API Team

jorge.ba...@orbitalads.io

unread,
Sep 22, 2016, 1:14:44 PM9/22/16
to AdWords API Forum
It seems that doesn't matter if you add your clientCustomerId(MCC)  in the soap headers or not . 

From our side , we always get only the ClientCustomerId of the MCC account. As other people said  in this thread , when you omit ClientCustomerId of your MCC on SOAP Headers, it should return a list of all customers managed by that MCC.

I attached some logs with both scenarios (with stripped sensitive info) : 
   - Including MCC CustomerId in SOAP Headers, 
   - Without Including MCC CustomerId in SOAP Headers,

Adwords API team , Could you please check in your side , and confirm if  is there a bug? 


If you need any other info to investigate the issue, please let me know, and i'm glad to provide it;

Thanks for your support,
CustomerService_getCustomers_issue.log

Anthony Madrigal

unread,
Sep 22, 2016, 2:39:29 PM9/22/16
to AdWords API Forum
Hello Jorge,

Thanks for the information. Yes, currently you will only get back the Id of the MCC account whether you omit the clientCustomerId or not. We are currently working on making all the client customer Ids returned for future versions. 

jorge.ba...@orbitalads.io

unread,
Sep 23, 2016, 8:18:40 AM9/23/16
to AdWords API Forum
Thanks for confirm it, 


As a Workaround, (If anyone is interested ) 

We can use ManagedCustomerService.get , to achieve info about all Accounts Managed by and MCC . ( If you are implementing webFlow , be sure you include the clientCustomerId of your MCC in the SOAP Headers ) .

It would be something like this ( in Javascript )

    let selector = {
        fields: ['CustomerId', 'Name', 'CompanyName', 'CurrencyCode', 'AccountLabels'],
        ordering: [{field: 'Name', sortOrder: 'ASCENDING'}],
        paging: {startIndex: 0, numberResults: AdwordsConstants.RECOMMENDED_PAGE_SIZE}
    }

    managedCustomerService.get({serviceSelector: selector },(err,result) => {
      if(err) {
        console.error(err);
      } else {
        console.log(result);
      }
    });

Have a good day

Michael Query

unread,
Oct 23, 2017, 1:50:59 AM10/23/17
to AdWords API Forum
After recently getting approved for a Basic token, we had to remove the validateOnly setting on the AdWords Service to prevent from returning null on calls to getCustomers().
Reply all
Reply to author
Forward
0 new messages