---
title: Customer groups
slug: commerce-connect-15/docs/customer-groups
docTags: 
createdAt: 2026-07-30T20:34:43.000Z
---

Customer groups let you manage contacts and apply group-specific pricing and personalization.

Create customer groups from the **Create Customer** or **Create Organization** view under the **Customers** tab. When on the **Create Customer** or **Create Organization** page, select the **Customers** (users) or organizations that are associated with a customer group. When working with variants, assign special prices for selected customer groups.

Classes in this topic are available in the following namespaces:

- `Mediachase.Commerce.Customers`
- `Mediachase.BusinessFoundation.Common`

`CustomerGroup` is available as a field for both customer and organization records. The `CustomerContact` class exposes this field as `CustomerGroup`, and the `Organization` class exposes it as `OrgCustomerGroup`, with get and set public accessors available for both. These fields use a descriptive string value representation of the `CustomerGroup` to which a customer or organization belongs.

Internally, the field stores the strings as integers that map to the string values, so the acceptable values are limited by that mapping. But the acceptable values can be expanded at runtime. This capability is provided through the Business Foundation (BF) library. The acceptable values are shared between the two fields as the `ContactGroup MetaEnum` type. See [MetaEnum class](docId\:Yc9VZrlx433fkOONn2MQA) to learn about working with the BF dynamic enum implementation.

As a BF field, `CustomerGroup` does not exist in the database in the initial installation but is added when you run `AutoInstallMetaDataModule` during initial site load. The default values available in the field are included in code in the `enum CustomerGroup.eContactGroup`, although the enum is of limited use otherwise. The `eContactGroup` enum is fixed at compile time and does not change at runtime when the list is edited in the application or in code by external processes.

The accessor properties on the `Organization` and `CustomerContact` are the preferred means of accessing these data. If you need to access the values directly, use `EntityObjectHelper.GetStringEntityEnumPropertyValue()`. The field name for the `CustomerContact` version of the BF field is stored as a constant in `ContactEntity.FieldCustomerGroup`, and the equivalent field name for the Organization Business Foundation field is stored as a constant in `OrganizationEntity.FieldOrgCustomerGroup`.

The `CustomerContact` class has an additional get-only property, `EffectiveCustomerGroup`, which combines these data.

- If the `CustomerContact` is associated with an `Organization`, and that organization has a `CustomerGroup` assigned, then `EffectiveCustomerGroup` returns the `Organization`'s `CustomerGroup`.
- If no `Organization` is assigned to the `CustomerContact` or if the assigned `Organization` does not have a `CustomerGroup` assigned, then `EffectiveCustomerGroup` returns the `CustomerGroup` recorded on the `CustomerContact` record itself, if any.

This evaluation is not recursive on the `Organization` hierarchy, so only the `Organization` to which the `CustomerContact` belongs directly is considered. Any parent `Organizations` of that `Organization` are ignored.

:::hint{type="info"}
**Note**
Pricing evaluates customer group membership based on `EffectiveCustomerGroup`, so use `EffectiveCustomerGroup` instead of `CustomerGroup` where possible.
:::

For information about contacts and organization in the user interface, see [Contacts](docId\:p1YLd-1Rwcm2jBY-nJmaM) and [Organizations](docId\:Jqji-moM08meofAWjjPDL) in the [Customers (UI)](docId\:WBKc5_TBeKC6v-EdEVtEB) section.
