Loading
Salesforce Enforces New Security Requirements in Summer 2026Read More

Intermittent US Default or Null request.geolocation Data with Hybrid Authentication in B2C Commerce

Publish Date: Jul 22, 2026
Description

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.

Resolution

1. Verify the Issue

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

    1. Navigate to Merchant Tools > Site Preferences > Geolocation Lookup .

    2. Enter the affected IP address to inspect the raw geolocation record returned by the system.

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

2. Request Feature Toggle Activation

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.

3. Test and Monitor

  1. Perform a test by simulating requests, if possible.

  2. Confirm that request.geolocation functions (such as request.geolocation.postalCode) now return valid localized data.

  3. Monitor logs to ensure the fallback default values do not recur.

Knowledge Article Number

005389429

 
Loading
Salesforce Help | Article