Set up data manually
In this section, you create the required identity namespaces and define the Luma sample data structure by creating the schemas.
Step 1: Create identity namespaces
In this step, you create identity namespaces for the Luma custom identity fields named lumaLoyaltyId, lumaCrmId, and lumaProductSKU. Identity namespaces play a critical role in building real-time customer profiles, as two matching values in the same namespace allow two data sources to form an identity graph.
Begin by creating a namespace for the Luma Loyalty ID schema:
-
In the Journey Optimizer user interface, go to Customer > Identities in the left navigation.
-
Select Create identity namespace.
-
Provide the following details:
table 0-row-3 1-row-3 Display Name Identity Symbol Type Luma Loyalty IDlumaLoyaltyIdCross-device ID -
Select Create.
-
Create two more namespaces following the same steps:
table 0-row-3 1-row-3 2-row-3 Display Name Identity Symbol Type Luma CRM IDlumaCrmIdCross-device ID Luma Product SKUlumaProductSKUNon-people identifier
Step 2: Create schemas
In this step, you define the structure of the sample data by creating six schemas:
Create Luma Loyalty Schema create-luma-loyalty-schema
This section describes how to create the Luma Loyalty schema and configure field groups.
Create the schema
-
Go to DATA MANAGEMENT > Schemas in the left navigation.
-
Select Create Schema on the top right.
-
From the drop-down menu, select XDM Individual Profile.
You select this option because you are modeling attributes of an individual customer (points, status, and so on).
Add existing field groups
Next, you are prompted to add field groups to the schema, using groups. You must add existing field groups and create a field group.
-
On the Schema page, if the Field groups modal did not automatically open, select Add.
-
On the Add Field groups page, enable the following field groups:
-
Demographic Details for basic customer data like name and birth date.
-
Personal Contact Details for basic contact details like email address and phone number.
-
Loyalty Details for the loyalty details such as points, joined date, or status. The loyalty field group is far down the list, so it is easiest to search for it.
-
-
Select Add field group to add all three field groups to the schema.
-
Select the top node of the schema.
-
Enter
Luma Loyalty Schemaas the Display name.
Create a field group create-field-group
To help ensure consistency across the schemas, 51黑料不打烊 recommends managing all system identifiers in a single group:
-
From the Composition section under Field groups, select Add.
-
Select Create new field group.
-
Add
Luma Identity Profile Field Groupas the Display name. -
Add
system identifiers for XDM Individual Profile classas the Description. -
Select Add field groups.
Add fields to the new field group
The new, empty field group is added to your schema. Using the + buttons, you can add new fields to any location in the hierarchy. In this case, you must add fields at the root level:
-
Select + next to the name of the schema.
This step adds a field under your tenant id namespace, to manage conflicts between your custom fields and any standard fields.
-
In the Field properties sidebar, add the details of the new field:
-
Field name:
systemIdentifier -
Display name:
System Identifier -
Type: Object
-
Assign field group: Luma identifiers
-
-
Select Apply.
Add two fields under the
systemIdentifierobject:table 0-row-3 1-row-3 2-row-3 Fieldname Display Name Type loyaltyIdLoyalty IdString crmIdCRM IdString
Set identities
You now have the namespace and the Luma Loyalty schema configured. Before you can ingest data, you must label the identity fields. Each schema used with Real-time Customer Profile is required to have a primary identity specified and each record ingested must have a value for that field.
-
Set the primary Identity:
From the Luma Loyalty Schema:
-
Select the Luma Identity Profile Field Group.
-
Select the loyaltyId field.
-
In the Field properties, enable the Identity box.
-
Enable the Primary Identity box.
-
Select the
Luma Loyalty Idnamespace from Identity namespaces dropdown menu. -
Select Apply.
-
-
Set a secondary identity:
From the Luma Loyalty Schema:
-
Select the Luma Identity Profile Field Group.
-
Select the
crmIdfield. -
In the Field properties, enable the Identity box.
-
Select the
Luma CRM Idnamespace from Identity namespaces dropdown. -
Select Apply.
-
Enable for profile and save the schema
-
Select the top node of the schema.
-
In the Field properties, enable Profile.
The schema should look like this:
-
Select Save.
Create Luma Product Catalog Schema create-luma-product-catalog-schema
-
Go to DATA MANAGEMENT > Schemas in the left navigation.
-
Select Create Schema (top right).
-
To create a class, select Browse all schema types from the drop-down menu.
-
Select Create new class.
-
Add the display name:
Luma Product Catalog Class. -
Assign class.
-
Create a Field group:
- Display name:
Luma Product Catalog Field Group
- Display name:
-
Add the following field to the Luma Product Catalog Field Group.
-
Field name:
product -
Display name:
Product -
Type: Object
-
Field group: Luma Product Catalog Field Group
-
-
Select Apply.
-
Add the following fields to the Product object:
table 0-row-3 1-row-3 2-row-3 3-row-3 4-row-3 5-row-3 6-row-3 7-row-3 8-row-3 9-row-3 10-row-3 Fieldname Display Name Type skuProduct SKUString nameProduct NameString categoryProduct CategoryString colorProduct ColorString sizeProduct SizeString priceProduct PriceDouble descriptionProduct DescriptionString imageUrlProduct Image URLString stockQuantityProduct Stock QuantityString urlProduct URLString -
Set the SKU as primary identity.
-
Add the Display name
Luma Product Catalog Field Groupto the field group. -
Select Save.
Create Luma Product Inventory Event Schema create-luma-product-inventory-event-schema
-
Go to DATA MANAGEMENT > Schemas in the left navigation.
-
Select the Create Schema button on the top right.
-
From the dropdown menu, select Browse all schema types.
-
Select Create new class.
-
Add the display name:
Luma Business Event Class. -
Select type: Time-series.
-
Assign class.
-
Create a field group:
- Display name:
Luma Product Inventory Event Details Field Group
- Display name:
-
Add the Display name
Luma Product Inventory Event Schemato the schema. -
Add the following field to the Luma Product Inventory Event Details Field Group:
-
Field name:
inventoryEvent -
Display name:
Inventory Event -
Type: Object
-
Field group:
Luma Product Inventory Event Details Field Group
-
-
Add the following fields to the
Product Inventory Event Detailsobject:table 0-row-3 1-row-3 2-row-3 Fieldname Display Name Type skuSKUString stockEventTypeStock Event TypeString -
to set the
stockEventTypeto Enum, select type:string. -
Scroll down to the bottom of the Field properties.
-
Enable Enum.
-
Enter values (label):
restock(Restock). -
Select Add row.
-
Enter values (label):
outOfStock(Out of Stock). -
Select Apply.
-
-
Set
inventory.Event.skufield as primary identity using the LumaProductSKU namespace. -
Select the
skufield and define a relationship to theproduct.skufield in the Luma Product catalog Schema Schema:-
Scroll down to the bottom of the Field properties.
-
Enable Relationship.
-
Reference schema: Luma Product Catalog Schema.
-
Reference identity namespace: LumaProductSKU.
-
-
Select Apply.
The schema should look like this:
-
-
Enable for Profile.
-
Select Save to save the schema.
Create additional schemas create-additional-schemas
Create the following additional schemas:
Luma Identity Profile Field GroupDemographic DetailsPersonal Contact DetailsOrchestration eventIDConsumer Experience EventAEP Web SDK ExperienceEventLuma Identity Profile Field GroupDemographic DetailsPersonal Contact DetailsProfile test detailsLuma Identity Profile Field GroupCommerce DetailsproductListItems.SKU:Reference schema
Luma Product Catalog SchemaReference identity namespace
lumaProductSKUproductListItems.SKU:Reference schema
Luma Product Catalog SchemaReference identity namespace
lumaProductSKUsystemIdentifier.crmIdsystemIdentifier.crmIdsystemIdentifier.LoyaltyIdNext steps
Now that you have created the data structure, you can create data sets and ingest sample data.