So unfortunately, to sum up, I guess your answer is:

No I cannot search customers by names as I used to do.

Can we call this a regression?


On Tuesday, April 23, 2019 at 7:50:03 PM UTC+2, googleadsapi-forumadvisor 
wrote:
>
> Hello Benjamin,
>
> Please find my response below:
>
>    - if I use the query you suggested based on customer_client, I get 
>    over 8k results, which is expected. Yet, as you know, I cannot get the 
>    descriptive names out of it, so I can't filter which is my goal
>    The CustomerClient 
>    
> <https://developers.google.com/google-ads/api/reference/rpc/google.ads.googleads.v1.resources#google.ads.googleads.v1.resources.CustomerClient>
>  resource 
>    will be having only the resources fields resource_name, client_customer, 
>    hidden and level only. It is not possible to fetch the descriptive name 
> via 
>    CustomerClient.
>    
>    - if I query `customer`, then I get only one result: the main MCC.
>    Because the customer resource always points to the client customer Id 
>    you are passing to the API call and fetches the details of that customer 
>    only. As you are making the API call using the MCC account id the customer 
>    resource always points to that MCC account. 
>    
>    - if I use ListAccessibleCustomers, I get 2 results
>    The ListAccessibleCustomers 
>    
> <https://developers.google.com/google-ads/api/reference/rpc/google.ads.googleads.v1.services#google.ads.googleads.v1.services.CustomerService.ListAccessibleCustomers>
>  will 
>    fetch only the resource names of the accounts that can be directly 
>    accessible with the OAuth credentials of the user making the API call. If 
>    you see 2 accounts that means you have access to only 2 accounts directly 
>    via that user.
>    
>    - if I do "SELECT customer_client.resource_name, 
>    customer_client.client_customer, customer.descriptive_name FROM 
>    customer_client", the only customer I get is the MCC
>    Since the customer resource is always pointing to the client customer 
>    Id you are passing to the API call, even when you include it with the 
>    Customer_client resource you will still get the Manager details from the 
>    fields of the customer resource. 
>    
>    - My initial question is unfortunately still open: how to search 
>    managed customers based on names please?
>    It is not possible to get the customers based on the names. Also, name 
>    is not a primary attribute of the customer.
>
> You could refer this guide 
> <https://developers.google.com/google-ads/api/docs/migration/services> to 
> see the equivalent services for AdWords API that are available in Google 
> Ads API. The query using CustomerClient will give all the resource names 
> of the accounts under a manager account. Using this you will get the 
> account hierarchy but to get the details of those customers you have make 
> another API call for each resource name using the customer 
> <https://developers.google.com/google-ads/api/docs/fields/customer>
>  resource.
>
> Sample customer query:
>
> "SELECT customer.resource_name, customer.descriptive_name, customer.id 
> <http://www.google.com/url?q=http%3A%2F%2Fcustomer.id&sa=D&sntz=1&usg=AFQjCNG1wYg6gAM_I2rzp8OFG8WhpGuY5Q>,
>  
> customer.test_account, customer.manager, customer.tracking_url_template 
> FROM customer" //Pass the customer Id that you found on the resource names 
> earlier by the CustomerClient.
>
> Please give it a try and let me know if you have any further questions.
>
> 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 
> <https://support.google.com/google-ads/contact/survey_transactional?caseid=0-9670000025618&hl=en&ctx=1>
>
> 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 adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@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+unsubscr...@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/206f211f-8193-4462-9846-74e46a4abf8a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
  • searchi... benjamin
    • RE... googleadsapi-forumadvisor via AdWords API and Google Ads API Forum
      • ... benjamin
        • ... googleadsapi-forumadvisor via AdWords API and Google Ads API Forum
          • ... benjamin
            • ... googleadsapi-forumadvisor via AdWords API and Google Ads API Forum
              • ... benjamin
                • ... googleadsapi-forumadvisor via AdWords API and Google Ads API Forum
                • ... vadim
                • ... googleadsapi-forumadvisor via AdWords API and Google Ads API Forum

Reply via email to