Create promotions based on customer location, using IP address geolocation to determine a customer's geographical location.
If you create a dynamic customer group based on location, customize the promotions and storefront experience for the customer based on their general geographical location.
Salesforce B2C Commerce provides an IP geolocation database from MaxMind that all of your instances share. The database is updated as needed with the global releases. Information from the database can't be exported. Use the geolocation import/export schema only for the store geolocation database, which isn't based on IP address information.
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.
To test the customer group in your website, include a group with your current location, so you can log in to the storefront and test the feature. Use the storefront toolkit Site Preview Tool to test the customer groups you create.
- Test Rule Data
If you’re using B2C Commerce customer groups that depend on city or region, Salesforce recommends that you test sample IP addresses against the database before creating rules. If the database is less precise in location than you expect, it’s 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. - Create Geographical Customer Groups
Use rules to define customer groups by the geolocation data of the IP addresses of B2C Commerce customers when they log in.