Creating Customer Promotions Based on Customer Location
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.
Testing Rule Data
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.
- Select Administration > Operations > IP Address Geolocation Data.
- On the IP Address Geolocation Data page, enter an IP address and
click Find.
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.
Creating Geographical Customer Groups
You can use rules to define customer groups by the geolocation data of the IP addresses of customers when they log in.
- Select site > Customers > Customer Groups.
- On the Manage Customer Groups page, click New to create a new customer group.
- On the New Customer Groups page, enter the (mandatory) ID (for example, USA_NY_Customers).
- For
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. - Enter a description (for example, New York
Customers) and click Apply. The
Membership Rule
field appears. - Click Edit.
- In the Customer Group Include/Exclude window, click in the Attributes field. See Dynamic Customer Group Attributes for details on the available rules.
- Create a rule that uses the geolocation attributes. If you want to test the customer group, be sure to include a group with your current location, so you can log in and test the feature.
Creating a Promotion Based on a Customer Group
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.
Testing Customer Groups
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.