Customer details from Customer Name with spaces

20 views
Skip to first unread message

Suresh Kumar Shenbagam

unread,
Nov 12, 2019, 6:36:54 AM11/12/19
to AdWords API and Google Ads API Forum

Hi,


How to get the customer details from customer name with spaces (Test Account).?


Code:


  SearchGoogleAdsRequest request1 =

        SearchGoogleAdsRequest.newBuilder()

            .setCustomerId(Long.toString(clientCustomerId))

            .setPageSize(PAGE_SIZE)

            .setQuery(query)

            .build();

SearchPagedResponse searchPagedResponse = googleAdsServiceClient.search(request1);


I tried to create a query for Search, but throwing the following error,
query: "SELECT customer.resource_name, customer.id FROM customer where customer.descriptive_name = Test Account"

error_code {
query_error: UNEXPECTED_INPUT
}
message: "Error in query: unexpected input =."
}


Please let me know how to retrieve customer information from customer name using Google Ads API Beta?



Suresh

Google Ads API Forum Advisor Prod

unread,
Nov 12, 2019, 3:32:00 PM11/12/19
to suresh.s...@cloudsense.com, adwor...@googlegroups.com

Hi Suresh,

Thanks for reaching out. As customer.descriptive_name is non-unique, it is not supposed to be used in the predicates. The correct way to specify a customer is to use customer.id field  in the WHERE statement. Please let me know if you have any further concerns.

Thanks and regards,
Xiaoming, Google Ads API Team


 

ref:_00D1U1174p._5001UJaNHa:ref
Reply all
Reply to author
Forward
0 new messages