Question
How does Zendesk capture the location of the customer? Can I get the customer's location through the API?
Answer
The system determines the location based on the IP address of the user and captures it at the moment of ticket creation. How you find the IP address depends on the type of ticket.
- In Support, find and open your customer ticket
- Hover the mouse over the last problematic message sent by the end user
- Next to that specific message bubble, click the ⋮ icon > View original email
- Click the Source tab > click ... > wait 5 seconds for the content to load
- In the content, the Received field will contain a potential IP address in this example format:
209.85.208.175- Only the IP in the Received header which includes a zendesk.com address format is not potentially spoofed, for example:
mail-pod-17.int.zendesk.com
- Only the IP in the Received header which includes a zendesk.com address format is not potentially spoofed, for example:
API
In tickets created through the API, you cannot capture the location of an end user or set up the location manually. The location in these tickets is the location of the server of the script that makes that call to the API. Instead, ask the developer of that script to verify possible logs on their end.
Live chat
With live chat, the location is also retrieved based on the IP address of the visitor. However, the location sometimes may not provide a specific city or even state as these are the only data available for that specific IP address.
Any other recent example
If you cannot find any IP address with the steps above, contact Zendesk customer support with a ticket URL to explore further logs that may be available. Provide a recent example, Zendesk can access these types of logs for only 2 to 3 weeks.
For related information, see this section: People advice and troubleshooting.