Storefront implementations relying on request.geolocation may sporadically receive inaccurate location data or default US coordinates ("country": "US", "city": null, "postal": null, "latitude": 37.751, "longitude": -97.822).
This behavior is observed only when Hybrid Authentication is enabled. The issue occurs intermittently and is not easily reproducible or tied to a single user scenario, as incorrect IP addresses are being passed into the geolocation process, leading to invalid or null results.
Add Debug Logging: Add custom debug logging in your controller or script code to capture the properties dw.util.Geolocation class instance at runtime. Inspect the logged output to confirm whether request.geolocation evaluates to null or falls back to the default US payload:
{"country": "US",
"city": null,
"postal": null,
"latitude": 37.751,
"longitude": -97.822}
Check Business Manager Data: Verify in Business Manager if the geolocation data matches expectations:
Navigate to Merchant Tools > Site Preferences > Geolocation Lookup .
Enter the affected IP address to inspect the raw geolocation record returned by the system.
Refer to the Salesforce Documentation on Geolocation Lookup for IP Addresses for further verification details.
Compare Server Output vs. Business Manager:
If runtime request.geolocation matches Business Manager, but the location is still incorrect, test the IP address using the MaxMind GeoIP Web Services Demo. If MaxMind itself contains incorrect location mapping for the IP, submit a request via the MaxMind GeoIP Data Correction Request Form.
If runtime request.geolocation does NOT match Business Manager (e.g., Business Manager returns accurate location data for the IP, but storefront requests intermittently return default/null values), proceed to Step 2 to request the feature toggle.
Contact Salesforce Support to request the activation of the feature toggle designed for this issue.
Note: It is strongly recommended to first request activation and complete testing on a lower environment (Development/Staging) prior to enabling the toggle in Production.
Perform a test by simulating requests, if possible.
Confirm that request.geolocation functions (such as request.geolocation.postalCode) now return valid localized data.
Monitor logs to ensure the fallback default values do not recur.
MaxMind GeoIP Web Services Demo
MaxMind GeoIP Data Correction Request Form
Salesforce Help: Geolocation Lookup for IP Addresses in B2C Commerce
005389429

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.