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
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