You are here:
Customer List Object Import/Export in B2C Commerce
The customerlist2.xsd contains the meta information and security preferences of the list itself, and all the customers. Each file represents one customer list if you perform a site export and select all the lists. Each file takes the name of the list itself, for example, SiteGenesis.xml for the SiteGenesis customer list. This topic applies to B2C Commerce.
The XML format for customer lists, customerlist2.xsd, is similar to the previous customerlist.xsd with added customer.xsd data. Site assignments to a customer list are imported as a site preference, similar to catalog, inventory list, and price book assignments. B2C Commerce exports the same customers for all sites assigned to the same customer list.
B2C Commerce exports assignments between customer lists and customers as part of customergroup.xsd. See the schemas for additional details.
The customer import logic verifies that an imported customer number isn’t identical to an existing buyer number. The system rejects a customer number that matches an existing buyer number. This behavior makes sure that customers can’t view orders not belonging to them. Salesforce recommends importing customers before importing orders.
Business Manager Import Location
Pipelets
ImportCustomerList
ExportCustomerList
Granularity: customer list
Customer Group Object Import/Export in B2C Commerce
You can use the elements in the customergroup.xsd and considerations when creating values for them. This topic applies to B2C Commerce.
Granularity: selected customer groups.
Business Manager Import Location
Pipelets
ImportCustomerGroups
ExportCustomerGroups
Granularity: passed customer groups.
System Customer Groups
System customer groups Registered, Unregistered, and
Everyone are imported as part of the standalone customer groups
import and as part of the site import.
They’re also included in site export (to view, select ). All data on an instance, including the custom attributes of system customer groups, is contained in a site export archive. The archive can be versioned or used to set up other instances in a realm.
Group Assignments Not Supported
Import & Export doesn't support customer to customer group assignments. Use the customer import & export for that purpose. For this reason, the customer to customer group assignments are preserved when you delete or replace a static customer group using the import.
Dynamic Customer Groups Using Session Custom Attributes
B2C Commerce applies a special conversion when importing dynamic customer groups with:
- A rule condition that evaluates on a session custom attribute
- The operator of the rule condition is
is equal - The condition values and the session custom attributes are numeric or Boolean-like data.
For numeric conditions, the following import:
<condition>
<attribute-path>session.custom.myAttribute</attribute-path>
<operator>is-equal</operator>
<string>1.0</string>
<string>2.0</string>
<string>3.0</string>
</condition>
Is converted to the following in an export:
<condition>
<attribute-path>session.custom.myAttribute</attribute-path>
<operator>is-equal</operator>
<number>1.0</number>
<number>2.0</number>
<number>3.0</number>
</condition>
For boolean conditions, the following import:
<condition>
<attribute-path>session.custom.myAttribute</attribute-path>
<operator>is-equal</operator>
<string>true</string>
</condition>
Is converted to the following in an export:
<condition>
<attribute-path>session.custom.myAttribute</attribute-path>
<operator>is-true</operator>
</condition>
Customer Object Import/Export in B2C Commerce
Use the elements in the customer.xsd and considerations when creating values for them. This topic applies to B2C Commerce.
Business Manager Import Location
Pipelets
ImportCustomers
ExportCustomers
Granularity: passed customers.
Element: Customer Address
Customer import never sets an address as the customer's default address if it's explicitly
marked as preferred='false'. To import
customers with no default address, set preferred to
false for all addresses.
Element: Customer Number
When importing customers, the customer number is optional.
If the import file provides the customer number, the import creates a customer using it and identifies that customer by the number when updating the record.
If the import file doesn't provide a customer number, the system identifies the customer by their login.
If the system doesn't find the customer, it creates a customer record using a system-generated customer number.
Data Group: Customer Lists
Site Import/Export supports the data group customer lists. B2C Commerce imports site assignments to a customer list as a site preference, similar to catalog, inventory list, and price book assignments. B2C Commerce exports the same customers for all sites assigned to the same customer list.
Element: Gender
If the gender element isn't present in the import file, gender isn't updated in the database. If gender is empty, gender is set to null in the database. If the gender element has the value of male or female in the import file, B2C Commerce stores male as one in the database and female as two. If the gender attribute has a numeric value, B2C Commerce stores the value in the database as is.
Element: Country-Code
The country-code child element of the address complex
type allows the import or export of country codes with one or two characters. Previous to
version 12.2, B2C Commerce imported or exported only two character country codes.
Customer addresses including an address ID with leading or trailing whitespace are properly exported. Previous to version 12.2, it wasn’t possible to export a customer address that included leading or trailing whitespace.
Dynamic Customer Group Import/Export in B2C Commerce
Dynamic customer groups can be imported and exported via the (existing) customer group import/export. This topic applies to B2C Commerce.
The customer import currently imports the explicit customer group assignments. Because membership in dynamic customer groups is calculated dynamically, the customer import denies assignments to dynamic customer groups and the export omits such assignments.
The customergroup.xsd schema has a rule element:
<xsd:complexType name="complexType.CustomerGroup" mixed="false">
<xsd:sequence>
<xsd:element name="description" type="xsd:string" minOccurs="0" maxOccurs="1" />
<!--- new element capturing the membership rule; if defined the customer group becomes a dynamic customer group. If not defined it becomes a customer group with explicit assignments--->
<xsd:element name="rule" type="Rule" minOccurs="0" maxOccurs="1" />
<xsd:element name="custom-attributes" type="sharedType.CustomAttributes" minOccurs="0" maxOccurs="1" />
</xsd:sequence>
<xsd:attribute name="group-id" type="simpleType.Generic.NonEmptyString.256" use="required" />
</xsd:complexType>
The schema also has the following complex types related to dynamic groups:
<xsd:complexType name="Rule" mixed="false">
<xsd:complexType name="ConditionGroups" mixed="false">
<xsd:complexType name="ConditionGroup" mixed="false">
<xsd:complexType name="DateCondition" mixed="false">
<xsd:complexType name="DateRange" mixed="false">
<xsd:complexType name="RelativeDateRange" mixed="false">
<xsd:complexType name="StringCondition" mixed="false">
<xsd:complexType name="IntCondition" mixed="false">
<xsd:complexType name="IntRange" mixed="false">
<xsd:complexType name="BooleanCondition" mixed="false">
Active data not provided by B2C Commerce must be imported. Active merchandising data doesn't have a schema. Instead, a merchant defines a feed format and can manually import a .csv file in Business Manager or automate the import using the new ImportActiveData pipelet.
To enable import for an active data attribute, assign it to a feed. An attribute can only be assigned to exactly one feed. A merchant can set up a maximum of five import feeds for the ProductActiveData object or the CustomerActiveData object, minus any feeds reserved for the system. There are no import modes for feeds.
Import files uploaded for import through Business Manager are stored in a new directory named activedata. This directory is placed in the following location relative to the existing Impex source directory in WebDAV:
/Sites/Impex/src/activedata/a-product-active-data-file.csv
Site Export includes XML files containing the non-system active data feeds for a site if you select that site for export. Site Import checks for files in an import archive with names and in locations that fit Site Export. If any are found, Site Import validates and imports them.
Customer Segmentation Import/Export in B2C Commerce
The CustomerGroup element in the slot.xsd schema supports customer segmentation. This topic applies to B2C Commerce.
<!- slot configuration ->
<xsd:complexType name="SlotConfiguration" mixed="false">
<xsd:sequence>
...
<xsd:element name="customer-groups" type="CustomerGroups" minOccurs="0" maxOccurs="1" />
...
</xsd:complexType>
<!- customer group ->
<xsd:complexType name="CustomerGroups" mixed="false">
<xsd:sequence>
<xsd:element name="customer-group" type="CustomerGroup" minOccurs="0" maxOccurs="unbounded" />
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CustomerGroup" mixed="false">
<xsd:attribute name="group-id" type="Generic.NonEmptyString.256" use="required" />
</xsd:complexType>

