Try our conversational search powered by Generative AI!

Loading...
Applies to versions: 14 and higher
Other versions:
ARCHIVED This content is retired and no longer maintained. See the version selector for other versions of this topic.

Customers

Recommended reading 
Note: This documentation is for the preview version of the upcoming release of CMS 12/Commerce 14/Search & Navigation 14. Features included here might not be complete, and might be changed before becoming available in the public release. This documentation is provided for evaluation purposes only.

This topic introduces the Customer Management system in Optimizely Commerce. This is a central component that lets you work with organizations and contacts. From Customer Management, you also can create purchase orders for a customer account.

How it works

The following image illustrates Customer Management and the relationship among the various objects, and different types of relationships between Business Foundation (BF) objects. See Meta-class references

Customer Management Overview

Definitions:

  • Contact. Individual with a set of personalized information (name, address, email, and so on). A contact can be a customer or a user with Commerce Manager permissions to manage one or more systems.
  • Organization. Group or sub-group of contacts.
Note: Commerce Admin user role management is done from Permissions for functions in the Optimizely CMS Admin view.

Classes in this topic are available in the following namespaces:

  • Mediachase.BusinessFoundation.Data.Business
  • Mediachase.Commerce.Customers
  • Mediachase.Commerce.Security

Customer groups

Customer groups target multiple Customers and Organizations for pricing and promotions. Both the Customer and the Organization expose their own CustomerGroup information, and the Customer has a derived property, called EffectiveCustomerGroup, that combines the two with the priority on the Organization value. See Customer Groups.

EffectiveCustomerGroup is used in pricing and promotions instead of the regular CustomerGroup. The EffectiveCustomerGroup returns the CustomerGroup of the parent Organization, if the CustomerContact belongs to a parent Organization that belongs to a CustomerGroup. Otherwise, EffectiveCustomerGroup returns its own group.

Child organizations

Use EntityObject to access an organization's child organizations, a core BF object. The EntityObject is an important base class for CustomerContact, Organization, and any custom business objects you create. EntityObject has only a PrimaryKeyId property to retrieve the full organization object from the CustomerContext singleton.

List<Organization> PartnerOrganizations = new List<Organization>();
foreach (object child in PartnerOrganization.GetChildren())
  {
    EntityObject obj = child as EntityObject;
    Organization org = CustomerContext.Current.GetOrganizationById(obj.PrimaryKeyId.Value);

    if (org != null)
      {
        PartnerOrganizations.Add(org);
      }
  }
Do you find this information helpful? Please log in to provide feedback.

Last updated: Jul 02, 2021

Recommended reading