Retrieving the Zendesk user id of a caller
When an agent receives a call, the telephony system can use the caller's phone number to search for the caller in Zendesk Support. If a user profile exists with the caller's number, the system can link the call to the existing user in Support. If a profile doesn't exist, it can create one for the caller. See Creating a user profile for a caller.
Use the following Search endpoint to look for a user in Support with the caller's phone number:
The following query syntax searches for a specific user using the caller's phone number:
You can search for the caller's phone number or automatic number association (ANI).
The number should not contain any non-numeric characters like spaces, dashes, or parentheses. The '+' sign preceding a country code should not be included either. To specify a phone number in different formats, add a leading
* (asterisk) to the number.
The search returns a user who has any of the following numbers in their profile:
- +1 513.555.7611
- (513) 555-7611
- 513 555 7611
If custom fields have been defined for users in the Support account, consider searching the custom fields if they contain phone numbers. See Searching custom user and organization fields.
Because the search is an HTTP request, make sure to url-encode the search string before sending the request: