You are here:
Using Dynamic Customer Groups for Active Merchandising in B2C Commerce
Dynamic customer groups enable you to create customer segments for targeted campaigns, micro-sites, and product lines. This topic applies to B2C Commerce.
For example, customer groups can include specific geographies, gender or enterprise profiles such as loyalty or store shoppers. Present such groups with relevant content (for example, information on new product arrivals to customers who are brand conscious); or offer promotions based on previous purchases (for example, offer 10% off orders for first-time customers). Dynamic customer groups are based on data and metrics derived from customer profiles or session data, so that each customer group expands or contracts depending on which customers meet the criteria at any given time.
Updating Group Membership
Salesforce B2C Commerce updates group membership in the following situations:
- Upon customer visit: for dynamic groups, B2C Commerce updates the membership when a known customer returns to the storefront with a new session.
- Upon customer login: for dynamic groups, B2C Commerce updates the membership of the customer upon login.
- Upon customer logout: for dynamic groups, B2C Commerce updates the membership of the customer upon logout.
- Periodically during a customer's session: after B2C Commerce calculates a membership on login, it caches the membership internally during the customer's session. Cached memberships have a lifetime of 1 minute. After they expire, recalculation begins automatically, ensuring that memberships stay up to date during customer sessions.
Defining Included and Excluded Clauses
Dynamic customer group membership rules enable you to define included and excluded clauses for individual conditions. Though similar to B2C Commerce's product promotion rules, they’re closer to what iTunes uses to define "Smart Playlists" and Adobe Lightroom uses to define Smart Collections.
Example
A merchant wants to define the following dynamic customer group:
"Customers from the US from states Alaska, Florida, and Alabama, and from Canada from states British Columbia and Nova Scotia. Any customer must be 18 years or older."They specify the following rules:
| Include (Match All) | ||
| Country | contains | United States, Canada |
| State | contains | Alaska, Florida, Alabama, British Columbia, Nova Scotia |
| Age | is greater than or equal | 18 |
The following rule also works:
| Include One (Match all) | ||
| Country | is equal | United States |
| State | State | Alaska, Florida, Alabama |
| Include Two (Match all) | ||
| Country | is equal | Canada |
| State | State | British Columbia, Nova Scotia |
| Exclude (Match all) | ||
| Age | is less than | 18 |
"Customers from the US. Not for customers younger than 18 or of unknown age."
| Include (Match all) | ||
| Country | is equal | United States |
| Exclude (Match all) | ||
| Age | is less than | 18 |
| Age | doesn't exist |
Or, simply:
| Include (Match All) | ||
| Country | is equal | United States |
| Age | is greater than or equal | 18 |
Remember Me vs. Customer Segmentation
Using customer segmentation, you can direct promotions and slots to a customer if they are in an unknown/anonymous group; but you can't collect data on them. Data can only be collected on logged in customers.
The LastVisitTime timestamp is part of the Remember me feature. Remember me and customer segmentation are two different features.
- If a customer checks the Remember me checkbox in a storefront, B2C Commerce places an entry in the customer's cookie.
- When returning to the storefront, the customer must log in again on the My Account page. The email address and password fields are pre-filled on this page with information retained in the cookie. B2C Commerce updates the "lastVisitTime" timestamp, a record that tracks customer return behavior, with the current time.
B2C Commerce starts customer segmentation for this particular customer in the following situations:
- A new, unknown/anonymous customer enters the shop (for promotions and slotting only).
- Customer logs in with login and password.
- Customer returns to the storefront and the Remember me feature recognizes them as a known customer. A customer who is remembered is not automatically authenticated and must explicitly log in to access any personal information.
- Customer logs out.
Staging
Dynamic customer groups are part of the staging process, like any other customer group. Because B2C Commerce calculates memberships in dynamic groups in real-time, they aren’t persistent and therefore not subject to replication.

