You can determine a customer IP address and lookup the geographical location of the customer based on the IP address.
If you create a dynamic customer group based on location, you can customize the promotions and storefront experience for the customer based on their general geographical location.
If you are using customer groups that depend on city or region, Salesforce recommends that you test sample IP addresses against the database before creating rules. This is because if the database is less precise in location than you expect, it is possible to create customer group rules that don't trigger correctly. Make sure that you have permissions to the IP Address Geolocation Data module before starting this topic.
The City, Region, Country, Postal Code, Metro Code, Latitude, and Longitude for the IP address in the database display. Note any discrepancies with the results you expect and use this when creating the customer group membership rules.
You can use rules to define customer groups by the geolocation data of the IP addresses of customers when they log in.
Type
, select Dynamic.
Geolocation information for a customer exists in the session, but is
not stored in B2C Commerce, so geographical customer groups are never
static.Membership Rule
field appears.You can create a promotion that uses a customer group as a qualifier. See Creating a Campaign and Creating a Promotion to learn how to assign a customer group to a campaign or promotion.
If you want to test the customer group in your website, make sure to include a group with your current location, so you can log in to the storefront and test the feature. You can use the storefront toolkit Site Preview Tool to test the customer groups you create.