Can’t seem to get any contact location data to stick in my requests. What am I doing wrong here? Note that the request does not fail with any sort of validation error but the values do not get updated.
Hi @matt-inkind, I ve managed to check your issue against our codebase and, I can see why the location data isn't sticking - the Intercom API doesn't support manually setting location fields directly.
The Issue
The `location` object you're sending in your request body isn't being processed because Intercom's contact API doesn't accept manual location data. The location fields in the response remain null because the system expects location information to come from a different source.
The Solution
Instead of trying to set location data manually, you need to provide an IP address that corresponds to the location you want. Intercom automatically derives location data from IP addresses using geolocation services.
Intercom's location system is designed around automatic geolocation rather than manual input. When you provide alast_seen_ipfield:
1. Automatic Lookup: Intercom uses the IP address to automatically determine the user's geographic location 2. Comprehensive Data: This populates not just country and city, but also region, country codes, continent codes, and coordinates 3. Data Integrity: It ensures location data is consistent and follows standard geographic databases
Alternative Approach
If you don't have access to appropriate IP addresses, you can store location information as custom attributes:
While this won't populate the standard location object in the response, it will store the location data in a way you can access and use for segmentation and filtering.
Key Takeaway
Intercom treats location as derived data rather than directly settable data. The system is designed to automatically populate location fields based on IP geolocation rather than accepting manual location input through the API.
Hi @matt-inkind, I ve managed to check your issue against our codebase and, I can see why the location data isn't sticking - the Intercom API doesn't support manually setting location fields directly.
The Issue
The `location` object you're sending in your request body isn't being processed because Intercom's contact API doesn't accept manual location data. The location fields in the response remain null because the system expects location information to come from a different source.
The Solution
Instead of trying to set location data manually, you need to provide an IP address that corresponds to the location you want. Intercom automatically derives location data from IP addresses using geolocation services.
Intercom's location system is designed around automatic geolocation rather than manual input. When you provide alast_seen_ipfield:
1. Automatic Lookup: Intercom uses the IP address to automatically determine the user's geographic location 2. Comprehensive Data: This populates not just country and city, but also region, country codes, continent codes, and coordinates 3. Data Integrity: It ensures location data is consistent and follows standard geographic databases
Alternative Approach
If you don't have access to appropriate IP addresses, you can store location information as custom attributes:
While this won't populate the standard location object in the response, it will store the location data in a way you can access and use for segmentation and filtering.
Key Takeaway
Intercom treats location as derived data rather than directly settable data. The system is designed to automatically populate location fields based on IP geolocation rather than accepting manual location input through the API.