---
schema_version: "1"
id: 6f73de632fffde90d34ad61c11ebc921977218ea95f659d0d8f1661815989472
title: Customer Segmentation Via Geolocation in B2C Commerce
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/cc/264-0-0/b2c_customer_segmentation_via_geolocation.md
canonical_url: https://help.salesforce.com/s/articleView?id=cc.b2c_customer_segmentation_via_geolocation.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 2e75397749303df0839d6e45fb6d937cba578a36c05102a927f3bd598ba999c9
description: Define customer segments of registered and unregistered customers based on geolocation for targeted campaigns, micro-sites, and product lines.
products:
  - Commerce
  - B2C Commerce
release: "264"
---
# Customer Segmentation Via Geolocation in B2C Commerce

Define customer segments of registered and unregistered customers based on geolocation for targeted campaigns, micro-sites, and product lines.

To define customer groups in Salesforce B2C Commerce, create a dynamic customer group with the `Geolocation` attribute. In B2C Commerce, a customer's geolocation is based on the customer's IP address. The geolocation database that is integrated with B2C Commerce, the GeoLite database created by MaxMind, is available at http://www.maxmind.com.

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-cc-b2c_merchandiser_administrator-264-0-0-production-enus/ea76f372-6cfa-42a6-8e7c-05c6df7abed8/images/icon_note.png)

Note MaxMind distributes GeoLite databases under the _Creative Commons Attribution-ShareAlike 3.0 Unported License._

The Geolocation attribute group rule is one of many attributes you can use to define dynamic customer groups.

## Customer Segmentation

The customer segmentation attribute group rule, `Geolocation,` has the following attributes:

- Longitude (Integer)
- Latitude (Integer)
- City (String)
- Country Code (String)
- Country Name (String)
- Region (String)
- Area Code (String)
- US Metro Code (String)
- Postal Code (String)

## B2C Commerce Scripting API

Access customer geolocation through the B2C Commerce scripting API for other storefront scenarios, using the following:

- `dw.system.Request.getGeoLocation` method
- `dw.order.GeoLocation` class

The geolocation data is stored in the `order` object, via the `dw.order.Order.getGeoLocation` method.

## Import/Export

Geolocation details are included in the export `order.xsd.`