# 2.2 Configure Schemas and Set Identifiers

In this exercise, you'll configure the required XDM schemas to classify profile information and customer behavior. In every XDM schema, you'll also have to configure a primary identifier to link all the information to.

## Story

Before you start configuring XDM Schema's and setting Primary Identifiers, we need to think about the business context of what we're trying to do:

* You want data
* You want to link data to a customer
* You want to build a progressive, Real-time Customer Profile

There are 2 types of data that we want to capture:

* Who is this customer?
* What does this customer do?

However, the question **Who is this customer?** is a very open question that has many answers. When your company wants to see this question answered, you're looking for demographic information like First Name, Last Name and Address. But also for contact information like an Email Address or a Mobile Phone Number. And also for information linked to Language, OptIn/OptOut and maybe even Profile Pictures. And finally, what you really need to know, is how we'll be identifying this customer in the various systems that your company uses.

The same thing goes for the question **What does this customer do?**. It's a very open question with many answers. When your company wants to see this question answered, you're looking for any interaction a customer has has had with any of your online and offline properties. Which pages or products have been visited? Has this customer added a product to his cart or even purchased an item? What device and browser has been used to browse the website? What kind of information is this customer looking for and how can we use that to configure and deliver a delightful experience to this customer? And finally, what we really need to know, is how we'll be identifying this customer in the various systems that your company will use.

## 2.1.1 - Who is this customer

Capturing the answer to **Who is this customer?** for your company is done through the Login/Registration-page.

![Data Ingestion](https://858372621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpBC8bA57il8Sj47B7QPJ%2Fuploads%2Fgit-blob-bc5843e40e3bd44f91f8d36d655a629f019541fd%2Fpv10.png?alt=media)

From a Schema perspective, we look at this as a **Class**. The question: **Who is this customer?** is something that we define in the Class **XDM Individual Profile**.

So when you create an XDM Schema to capture the answer to **Who is this customer?**, first of all, you'll need to create and define 1 schema that references the class **XDM Individual Profile**.

To specify what kind of answers can be given to that question, you'll need to define \[!UICONTROL Field Groups]. \[!UICONTROL Field Groups] are extensions of the Profile-class, and have very specific configurations. For instance, demographic information like First Name, Last Name, Gender and Birthday are part of the Field Group: **Demographic Details**.

Secondly, your company needs to decide how to identify this customer. In the case of your company, the main identifier for a known customer might be a specific customer ID, like for instance an email address. But technically, there are other ways of identifying a customer at your company, like using a mobile phone number. In this lab, we'll define the email address as the primary identifier and the phone number as a secondary identifier.

Lastly, it's important to distinguish the channel on which data was captured. In this case, we'll be talking about Website Registrations and the schema that needs to be defined needs to reflect **where** the registration data was captured. The channel will also have an important role in influencing what data is captured. As such, it's a best practice to define schema's for every combination of channel, primary identifier and type of data collected.

Based on the above, you'll need to configure a Schema in Adobe Experience Platform.

Log in to Adobe Experience Platform by going to this URL: <https://experience.adobe.com/platform>.

After logging in, you'll land on the homepage of Adobe Experience Platform.

![Data Ingestion](https://858372621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpBC8bA57il8Sj47B7QPJ%2Fuploads%2Fgit-blob-d3766e8abcdcae565589d172ff39148a026b3712%2Fhome.png?alt=media)

Before you continue, you need to select a **sandbox**. The sandbox to select is named `--module2sandbox--`. You can do this by clicking the text **Production Prod** in the blue line on top of your screen. After selecting the appropriate sandbox, you'll see the screen change and now you're in your dedicated sandbox.

![Data Ingestion](https://858372621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpBC8bA57il8Sj47B7QPJ%2Fuploads%2Fgit-blob-f8fe0607dc3e272ebd2416a98220bb1d82c1a166%2Fsb1.png?alt=media)

In Adobe Experience Platform, click on **Schemas** in the menu on the left side of your screen. You'll see the list of available Schemas.

![Data Ingestion](https://858372621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpBC8bA57il8Sj47B7QPJ%2Fuploads%2Fgit-blob-3aba19fb85bf7e3a1aec9722d67122f7e9d126e4%2Fmenuschemas.png?alt=media)

You should create a new schema. To create a new schema, click on the button **+ Create Schema** and select **XDM Individual Profile**.

![Data Ingestion](https://858372621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpBC8bA57il8Sj47B7QPJ%2Fuploads%2Fgit-blob-d7cd26b0778213ea10babbe1f2fdeeccaf26bdcd%2Fcreateschema.png?alt=media)

After clicking the **+ Create Schema** button, a new schema is created and you'll be prompted to select or create **field groups**.

![Data Ingestion](https://858372621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpBC8bA57il8Sj47B7QPJ%2Fuploads%2Fgit-blob-b465a9140efe8985d114d533c5656bdbfa3f7da4%2Femptyschema.png?alt=media)

Now you need to define what an answer to the question **Who is this customer?** should look like. In the introduction of this lab, we noted the need for following attributes to define a customer:

* Demographic information like First Name, Last Name and Address
* Contact information like a Home Address, Email Address or a Mobile Phone Number
* Other Information linked to Language, OptIn/OptOut and maybe even Profile Pictures.
* Primary Identifier for a customer

To make that information part of your schema, you need to add the following Field Groups to your schema:

* Demographic Details (Demographic Information)
* Personal Contact Details (Contact Information)
* Preference Details (Other Information)
* your company's custom Profile Identification Field Group (Primary and Secondary Identifiers)

In the **Add Field Group** screen, select the Field Group **Demographic Details**, **Personal Contact Details** and **Preference Details**.

![Data Ingestion](https://858372621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpBC8bA57il8Sj47B7QPJ%2Fuploads%2Fgit-blob-92fd5d5dd68f9711b69bc07480727847c08b8e83%2Fppfd.png?alt=media)

Click the **Add Field Groups** button to add the Field Group to your schema.

![Data Ingestion](https://858372621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpBC8bA57il8Sj47B7QPJ%2Fuploads%2Fgit-blob-d017c3589895800e5a32f45b58f48dd5999fc7de%2Faddmixin1.png?alt=media)

You'll now have this:

![Data Ingestion](https://858372621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpBC8bA57il8Sj47B7QPJ%2Fuploads%2Fgit-blob-ab301dd4d2144c0a00fbc7758d882bd0ebcd5866%2Fschemathis.png?alt=media)

Next, you need a new Field Group to capture the **Identifier** used for data collection. As you've seen in the previous exercise, there's a concept of Primary and Secondary Identifiers. A Primary Identifier is the most important one, as all collected data will be linked to this Identifier.

You will now create your own custom Field Group and as such, you'll be extending the XDM Schema to meet your own company's requirements.

Click the **+ Add** button to start adding a Field Group.

![Data Ingestion](https://858372621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpBC8bA57il8Sj47B7QPJ%2Fuploads%2Fgit-blob-91b4256bcdbcf73a6bbbe12fb864ef76cf31e074%2Faddmixin2.png?alt=media)

Instead of reusing an existing Field Group, you'll now create your own Field Group. You can do that by selecting **Create New Field Group**.

![Data Ingestion](https://858372621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpBC8bA57il8Sj47B7QPJ%2Fuploads%2Fgit-blob-7f896eab929500f774a2e1d9b9293002a376d425%2Fcreatemixin.png?alt=media)

You now need to provide a **Display Name** and **Description** for your new Field Group.

As the name for our schema, we'll use this: `--demoProfileLdap-- - Profile Identification Field Group`

As an example, for ldap **vangeluw**, this should be the name of the schema:

**vangeluw - Profile Identification Field Group**

That should give you something like this:

![Data Ingestion](https://858372621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpBC8bA57il8Sj47B7QPJ%2Fuploads%2Fgit-blob-d3320a639cab05b2bcb0156f4196405b16f3af1c%2Fmixinname.png?alt=media)

Click the **Add Field Groups** button to add the newly created Field Group to your schema.

![Data Ingestion](https://858372621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpBC8bA57il8Sj47B7QPJ%2Fuploads%2Fgit-blob-d017c3589895800e5a32f45b58f48dd5999fc7de%2Faddmixin1.png?alt=media)

You should now have this schema structure in place.

![Data Ingestion](https://858372621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpBC8bA57il8Sj47B7QPJ%2Fuploads%2Fgit-blob-f53b6938a10167bddc196bbb25dd95f267888ea1%2Fschemastructurem.png?alt=media)

Your new Field Group is still empty, so now you'll have to add fields to that Field Group. In the Field Group-list, click your custom Field Group.

![Data Ingestion](https://858372621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpBC8bA57il8Sj47B7QPJ%2Fuploads%2Fgit-blob-f53b6938a10167bddc196bbb25dd95f267888ea1%2Fschemastructurem.png?alt=media)

You now see a number of new buttons appear.

On the top-level of your Schema, click the **+ Add Field** button.

![Data Ingestion](https://858372621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpBC8bA57il8Sj47B7QPJ%2Fuploads%2Fgit-blob-b68d69e926997bf7b2c8ff2edc6aae888c6c4c3c%2Fclickaddfield.png?alt=media)

After clicking the **+ Add Field** button, you now see a new **object** in your schema. This object represents a custom **object** in your Schema and is named after your Adobe Experience Platform Tenant ID. Your Adobe Experience Platform tenant id is `--aepTenantId--`.

![Data Ingestion](https://858372621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpBC8bA57il8Sj47B7QPJ%2Fuploads%2Fgit-blob-35d861daed5b0efbe09d09c719c24c2dddd8f008%2Ftenant.png?alt=media)

You'll now add a new object under that tenant. To do that, click the field **New Field** under the tenant-object.

![Data Ingestion](https://858372621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpBC8bA57il8Sj47B7QPJ%2Fuploads%2Fgit-blob-5925c2fdfb131ae7cf2e69b48f34cf5ff0e84f48%2Ftenantfield.png?alt=media)

Use these object-definitions:

* Field name: **identification**
* Display name: **identification**
* Type: **Object**

![Data Ingestion](https://858372621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpBC8bA57il8Sj47B7QPJ%2Fuploads%2Fgit-blob-19cffd5c7fdb4bbf1960930d78909021ef17d539%2Ftenantfielddef.png?alt=media)

Click **Apply** to save your changes.

![Data Ingestion](https://858372621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpBC8bA57il8Sj47B7QPJ%2Fuploads%2Fgit-blob-dfc32578e7edc9769f1acdde884a1bf5cb456363%2Fapply.png?alt=media)

After clicking **Apply**, you now see your **identification** object in the Schema.

![Data Ingestion](https://858372621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpBC8bA57il8Sj47B7QPJ%2Fuploads%2Fgit-blob-44d523053234157c612cd796671a72e44b183b9b%2Fschemaid.png?alt=media)

You'll now add 3 new fields under the **identification** object:

* ecid:
  * Field name: **ecid**
  * Display name: **ecid**
  * Type: **String**
* emailId
  * Field name: **emailId**
  * Display name: **emailId**
  * Type: **String**
* mobilenr
  * Field name: **mobilenr**
  * Display name: **mobilenr**
  * Type: **String**

Each field will be defined as type **String** and we'll configure these fields as **Identities**. For the Schema **Website Registration Schema**, we assume that a customer will always be identified by their email-address, which means that you have to configure the field **emailId** as a **primary** identifier, and the other fields as **secondary** identifiers.

To add the fields, click the **+** button next to the **identification** object.

![Data Ingestion](https://858372621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpBC8bA57il8Sj47B7QPJ%2Fuploads%2Fgit-blob-aee8a2ed7bc00bd59d35be931fa3fd708b5ceaa0%2Fschemaid2.png?alt=media)

You now have an empty field. You need to configure the above 3 fields as indicated.

![Data Ingestion](https://858372621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpBC8bA57il8Sj47B7QPJ%2Fuploads%2Fgit-blob-f793c497c308b614bd6290c0ce2638858b5efe16%2Femptyfield.png?alt=media)

This is how each field should look after your initial field configuration.

Click the **+** button next to the **identification** object to create a new field and fill out the fields as indicated.

* ecid

![Data Ingestion](https://858372621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpBC8bA57il8Sj47B7QPJ%2Fuploads%2Fgit-blob-d4847c238195b30885fe606d2b8812865c74dbf5%2Fecidfield.png?alt=media)

To save your field, scroll down in the **Field Properties** until you see the button **Apply**. Click the Apply\*\* button.

![Data Ingestion](https://858372621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpBC8bA57il8Sj47B7QPJ%2Fuploads%2Fgit-blob-dfc32578e7edc9769f1acdde884a1bf5cb456363%2Fapply.png?alt=media)

Click the **+** button next to the **identification** object to create a new field and fill out the fields as indicated.

* emailId

![Data Ingestion](https://858372621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpBC8bA57il8Sj47B7QPJ%2Fuploads%2Fgit-blob-f26cd9ec04c456de37dd6b9f0cd38bf5b169fc39%2Femailidfield.png?alt=media)

To save your field, scroll down in the **Field Properties** until you see the button **Apply**. Click the **Apply** button.

![Data Ingestion](https://858372621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpBC8bA57il8Sj47B7QPJ%2Fuploads%2Fgit-blob-dfc32578e7edc9769f1acdde884a1bf5cb456363%2Fapply.png?alt=media)

Click the **+** button next to the **identification** object to create a new field and fill out the fields as indicated.

* mobilenr

![Data Ingestion](https://858372621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpBC8bA57il8Sj47B7QPJ%2Fuploads%2Fgit-blob-8e771fcd2ed041248357e2f90981a5e5d3741d57%2Fmobilenrfield.png?alt=media)

To save your field, scroll down in the **Field Properties** until you see the button **Apply**. Click the **Apply** button.

![Data Ingestion](https://858372621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpBC8bA57il8Sj47B7QPJ%2Fuploads%2Fgit-blob-dfc32578e7edc9769f1acdde884a1bf5cb456363%2Fapply.png?alt=media)

You now have 3 fields, but these fields haven't been defined as **Identity**-fields yet.

![Data Ingestion](https://858372621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpBC8bA57il8Sj47B7QPJ%2Fuploads%2Fgit-blob-19a25d9e95881437973b1b7c7b4f8b097fd28746%2F3fields.png?alt=media)

To start defining these fields as **Identity**-fields, follow these steps:

* Select the field **emailId**.
* On the right side, in the field properties, scroll down until you see **Identity**. Check the checkbox for **Identity**.

  ![Data Ingestion](https://858372621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpBC8bA57il8Sj47B7QPJ%2Fuploads%2Fgit-blob-4195318c4c44531eeae5cb9b5f8aceb2090cb18f%2Femailidid.png?alt=media)
* Now check the checkbox for **Primary Identity**.

  ![Data Ingestion](https://858372621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpBC8bA57il8Sj47B7QPJ%2Fuploads%2Fgit-blob-47795c48d2cc91e27a72bdafcff47566c747e267%2Femailidprimid.png?alt=media)
* Lastly, select the namespace **Email** from the list of **Namespaces**. A Namespace is used by the Identity Graph in Adobe Experience Platform to classify identifiers in namespaces and define the relationship between those namespaces.

  ![Data Ingestion](https://858372621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpBC8bA57il8Sj47B7QPJ%2Fuploads%2Fgit-blob-47d8c32a1ff1a7449d8335d3653522153b405478%2Femailidprimidns.png?alt=media)
* Finally, click **Apply** to save your changes.

  ![Data Ingestion](https://858372621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpBC8bA57il8Sj47B7QPJ%2Fuploads%2Fgit-blob-dfc32578e7edc9769f1acdde884a1bf5cb456363%2Fapply.png?alt=media)

Next, you have to define the other fields for **ecid** and **mobilenr** as secondary identifiers.

* Select the field **ecid**.
* On the right side, in the field properties, scroll down until you see **Identity**. Check the checkbox for **Identity**.

  ![Data Ingestion](https://858372621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpBC8bA57il8Sj47B7QPJ%2Fuploads%2Fgit-blob-fbaa5f0ee3c1641d305116571f3f015adb767aa2%2Fecidid.png?alt=media)
* Next, select the namespace **ECID** from the list of **Namespaces**. A \[!UICONTROL Namespace] is used by the Identity Graph in Adobe Experience Platform to classify identifiers in namespaces and define the relationship between those namespaces.

  ![Data Ingestion](https://858372621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpBC8bA57il8Sj47B7QPJ%2Fuploads%2Fgit-blob-0572c408b9fe52e4ac0b9fc20081b5aba8f9ed24%2Fecidprimidns.png?alt=media)
* Click **Apply** to save your changes.

  ![Data Ingestion](https://858372621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpBC8bA57il8Sj47B7QPJ%2Fuploads%2Fgit-blob-dfc32578e7edc9769f1acdde884a1bf5cb456363%2Fapply.png?alt=media)
* Select the field **mobilenr**.
* On the right side, in the field properties, scroll down until you see **Identity**. Check the checkbox for **Identity**.

  ![Data Ingestion](https://858372621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpBC8bA57il8Sj47B7QPJ%2Fuploads%2Fgit-blob-455a19af3a5cc136e006d8943e48fc9d2c6ee811%2Fmobid.png?alt=media)
* Make sure to select the namespace **Phone** from the list of **Namespaces**. A Namespace is used by the Identity Graph in Adobe Experience Platform to classify identifiers in namespaces and define the relationship between those namespaces.

  ![Data Ingestion](https://858372621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpBC8bA57il8Sj47B7QPJ%2Fuploads%2Fgit-blob-c9737d5cac10123a6697949f950d56ec2858ab3f%2Fmobprimidns.png?alt=media)
* Click **Apply** to save your changes.

  ![Data Ingestion](https://858372621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpBC8bA57il8Sj47B7QPJ%2Fuploads%2Fgit-blob-dfc32578e7edc9769f1acdde884a1bf5cb456363%2Fapply.png?alt=media)

The **identification** object should now look like this, with the 3 id-fields now also showing a **fingerprint** icon to show that they have been defined as identifiers.

![Data Ingestion](https://858372621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpBC8bA57il8Sj47B7QPJ%2Fuploads%2Fgit-blob-1f7bdb1bbaa19af60b0e9dc96143848abfe9f847%2Fapplyiden.png?alt=media)

Let's now give your schema a name. Select the field **Untitled schema**.

![Data Ingestion](https://858372621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpBC8bA57il8Sj47B7QPJ%2Fuploads%2Fgit-blob-5195411700610eb70ac35752c86718fa0746a35b%2Fschemaname1.png?alt=media)

As the name for our schema, you'll use this:

`--demoProfileLdap-- - Demo System - Profile Schema for Website`

Replace **ldap** by your specific ldap. As an example, for ldap **vangeluw**, this should be the name of the schema:

**vangeluw - Demo System - Profile Schema for Website**

That should give you something like this:

![Data Ingestion](https://858372621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpBC8bA57il8Sj47B7QPJ%2Fuploads%2Fgit-blob-f191e0b07a71fda6840547f6d3df78e11ac3074d%2Fschemaname.png?alt=media)

You have now defined a Schema, linked existing and newly created Field Groups and have defined identifiers.

Click **Save** to save your changes.

![Data Ingestion](https://858372621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpBC8bA57il8Sj47B7QPJ%2Fuploads%2Fgit-blob-e7f4062a1fcd884d707446df249f9c13b3c31e40%2Fsave.png?alt=media)

The last thing to do here, is to activate the Schema to be linked to the **Profile**. By enabling your schema for Profile, you're making sure that all data sent to Adobe Experience Platform against this schema will be part of the Real-time Customer Profile environment, which makes sure that all that data can be used in real-time for querying, segmentation and activation.

To do this, let's select the name of your schema.

![Data Ingestion](https://858372621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpBC8bA57il8Sj47B7QPJ%2Fuploads%2Fgit-blob-d5ea3095e11e6bbbd84dfc6a664ca7e1411f7863%2Fschemastructure.png?alt=media)

In the right tab of your schema, you'll see a **Profile toggle**, which is currently deactivated.

![Data Ingestion](https://858372621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpBC8bA57il8Sj47B7QPJ%2Fuploads%2Fgit-blob-b90500f94cf3c7e7547d9cc678b8cb471f0d833d%2Fupswitcher.png?alt=media)

Activate the \[!UICONTROL Profile] - switch by clicking it.

You'll see this message:

![Data Ingestion](https://858372621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpBC8bA57il8Sj47B7QPJ%2Fuploads%2Fgit-blob-66aee1721ad2af527e6f7022f798241d14af0b40%2Fsure.png?alt=media)

Click **Enable** to enable this schema for Profile.

Your Schema is now configured to be part of the Real-time Customer Profile.

![Data Ingestion](https://858372621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpBC8bA57il8Sj47B7QPJ%2Fuploads%2Fgit-blob-a1e8b74b83072d937380c65e4feef916cc8ab113%2Fsurey.png?alt=media)

Finally, click **Save** to save your schema.

![Data Ingestion](https://858372621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpBC8bA57il8Sj47B7QPJ%2Fuploads%2Fgit-blob-e7f4062a1fcd884d707446df249f9c13b3c31e40%2Fsave.png?alt=media)

### 2.1.2 - What does this customer do

Capturing the answer to the question **What does this customer do?** for your company is done through for instance a product view on a product page.

![Data Ingestion](https://858372621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpBC8bA57il8Sj47B7QPJ%2Fuploads%2Fgit-blob-74c8da34d6825ba9d437fd8a0061181d49da0dde%2Fpv7.png?alt=media)

From a schema perspective, we look at this as a **Class**. The question: **What does this customer do?** is something that we've defined in the class **ExperienceEvent**.

So when you create an XDM Schema to capture the answer to **What does this customer do?**, first of all, you'll need to create and define 1 schema that references the class **ExperienceEvent**.

To specify what kind of answers can be given to that question, you'll need to define Field Group. Field Groups are extensions of the ExperienceEvent-class, and have very specific configurations. For instance, information about what kind of products a customer viewed or added to their cart is part of the Field Group **Commerce Details**.

Secondly, your company needs to decide how you'll identify the behavior of this customer. Since we're talking about interactions on a website, it's possible that your company knows the customer but it's equally possible that an unknown, anonymous visitor is active on the website. So we can't use an identifier like email-address. In this case, your company will probably decide to use the Experience Cloud ID (ECID) as the primary identifier.

Lastly, it's important to distinguish the channel on which data was captured. In this case, we'll be talking about Website Interactions and the schema that needs to be defined needs to reflect **where** the interaction data was captured. The channel will also have an important role in influencing what data is captured. As such, it's a best practice to define schema's for every combination of channel, primary identifier and type of data collected.

Based on the above, you'll need to configure a schema in Adobe Experience Platform.

After logging in, you'll land on the homepage of Adobe Experience Platform.

![Data Ingestion](https://858372621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpBC8bA57il8Sj47B7QPJ%2Fuploads%2Fgit-blob-d3766e8abcdcae565589d172ff39148a026b3712%2Fhome.png?alt=media)

Before you continue, you need to select a **sandbox**. The sandbox to select is named `--module2sandbox--`. You can do this by clicking the text **Production Prod** in the blue line on top of your screen. After selecting the appropriate sandbox, you'll see the screen change and now you're in your dedicated sandbox.

![Data Ingestion](https://858372621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpBC8bA57il8Sj47B7QPJ%2Fuploads%2Fgit-blob-f8fe0607dc3e272ebd2416a98220bb1d82c1a166%2Fsb1.png?alt=media)

In Adobe Experience Platform, click on **Schemas** in the menu on the left side of your screen.

![Data Ingestion](https://858372621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpBC8bA57il8Sj47B7QPJ%2Fuploads%2Fgit-blob-3aba19fb85bf7e3a1aec9722d67122f7e9d126e4%2Fmenuschemas.png?alt=media)

In \[!UICONTROL Schemas], you'll see all existing schemas.

![Data Ingestion](https://858372621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpBC8bA57il8Sj47B7QPJ%2Fuploads%2Fgit-blob-74565bc764187eace0f0be78f521ba77a5da3c60%2Fschemasee.png?alt=media)

You should create a new schema. To create a new schema, click on the button **+ Create Schema** and select **XDM ExperienceEvent**.

![Data Ingestion](https://858372621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpBC8bA57il8Sj47B7QPJ%2Fuploads%2Fgit-blob-86935dc845ff054da6f3b80de15544af683f3780%2Fcreateschema1.png?alt=media)

After clicking the **+ Create Schema** button, a new schema is created and you'll be prompted to select or create **field groups**.

![Data Ingestion](https://858372621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpBC8bA57il8Sj47B7QPJ%2Fuploads%2Fgit-blob-3229ff79c7b00b48e48f66dac7684a1a0007f99c%2Femptyschemaee.png?alt=media)

Now you need to define what an answer to the question **What does this customer do?** should look like. In the introduction of this lab, we noted the need for following attributes to define what a customer does:

* Which pages or products have been visited?
* Has this customer added a product to his cart or even purchased an item?
* What device and browser has been used to browse the website?
* What kind of information is this customer looking for and how can we use that to configure and deliver a delightful experience to this customer?
* Primary Identifier for a customer

To make that information part of your schema, you need to add the following Field Group to your schema:

* Web Details
* Commerce Details
* Environment Details
* your company's custom Profile Identification Field Group (Primary and Secondary Identifiers)

In the **Add Field Group** screen, select the Field Groups **Web Details**, **Commerce Details** and **Environment Details**.

![Data Ingestion](https://858372621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpBC8bA57il8Sj47B7QPJ%2Fuploads%2Fgit-blob-86ed834223827c81f4e33a46d741a46eca4a819e%2Feeed.png?alt=media)

Click the **Add Field Groups** button to add the Field Group to your schema.

![Data Ingestion](https://858372621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpBC8bA57il8Sj47B7QPJ%2Fuploads%2Fgit-blob-d017c3589895800e5a32f45b58f48dd5999fc7de%2Faddmixin1.png?alt=media)

You'll then have this:

![Data Ingestion](https://858372621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpBC8bA57il8Sj47B7QPJ%2Fuploads%2Fgit-blob-a6391195f3a0283e6294fedcdcccbc4266b02d2c%2Feethis.png?alt=media)

Next, you need to create a new Field Group to capture the **Identifier** used for data collection. As you've seen in the previous exercise, there's a concept of Primary and Secondary Identifiers. A Primary Identifier is the most important one, as all collected data will be linked to this Identifier.

You will now create your own custom Field Group and as such, you'll be extending the XDM Schema to meet your own company's requirements.

A Field Group is linked to a \[!UICONTROL Class], so that means that you can't simply reuse the previously created Field Group.

Click the **+ Add** button to start adding a Field Group.

![Data Ingestion](https://858372621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpBC8bA57il8Sj47B7QPJ%2Fuploads%2Fgit-blob-e244b225ab671dc0b623667531022d8852ae25d0%2Faddmixinee2.png?alt=media)

Instead of reusing an existing Field Group, you'll now create your own Field Group. You can do that by selecting **Create New Field Group**.

![Data Ingestion](https://858372621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpBC8bA57il8Sj47B7QPJ%2Fuploads%2Fgit-blob-7f896eab929500f774a2e1d9b9293002a376d425%2Fcreatemixin.png?alt=media)

You now need to provide a **Display Name** and **Description** for your new Field Group.

As the name for your Field Group, use this:

`--demoProfileLdap-- - ExperienceEvent Identification Field Group`

As an example, for ldap **vangeluw**, this should be the name of the schema:

**vangeluw - ExperienceEvent Identification Field Group**

That should give you something like this:

![Data Ingestion](https://858372621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpBC8bA57il8Sj47B7QPJ%2Fuploads%2Fgit-blob-c1a80cb41f56ffbabfc485870aee1d5491a9f85c%2Fmixinnameee.png?alt=media)

Click the **Add Field Group** button to add the newly created Field Group to your schema.

![Data Ingestion](https://858372621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpBC8bA57il8Sj47B7QPJ%2Fuploads%2Fgit-blob-d017c3589895800e5a32f45b58f48dd5999fc7de%2Faddmixin1.png?alt=media)

You should now have this Schema structure in place.

![Data Ingestion](https://858372621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpBC8bA57il8Sj47B7QPJ%2Fuploads%2Fgit-blob-830865d1a4cbacac3da502694a4c537a756be4c6%2Fschemastructuremee.png?alt=media)

Your new Field Group is still empty, so now you'll have to add fields to that Field Group. In the Field Group-list, click your custom Field Group.

![Data Ingestion](https://858372621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpBC8bA57il8Sj47B7QPJ%2Fuploads%2Fgit-blob-b8a199e090c9ce2ad76e8723f8657285a271d146%2Fschemastructuremee1.png?alt=media)

You now see a number of new buttons appear.

On the top-level of your Schema, next to your Schema - name, click the **+** button.

![Data Ingestion](https://858372621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpBC8bA57il8Sj47B7QPJ%2Fuploads%2Fgit-blob-130a277e58871c2a600e67756289cfa396d764af%2Fclickaddfieldee.png?alt=media)

After clicking the **+** button, you now see a new **object** in your schema. This object represents a custom **object** in your Schema and is named after your Adobe Experience Platform Tenant ID. Your Adobe Experience Platform tenant id is `--aepTenantId--`.

![Data Ingestion](https://858372621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpBC8bA57il8Sj47B7QPJ%2Fuploads%2Fgit-blob-05326315c5fafd1f9c5491b2e595bd6c36ec265b%2Ftenantee.png?alt=media)

You'll now add a new object under that tenant. To do that, click the field **New Field** under the tenant-object.

![Data Ingestion](https://858372621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpBC8bA57il8Sj47B7QPJ%2Fuploads%2Fgit-blob-ec4fa418d988b53eed8d0d792e38d34f9cd415f0%2Ftenantfieldee.png?alt=media)

Use these object-definitions:

* Field name: **identification**
* Display name: **identification**
* Type: **Object**

![Data Ingestion](https://858372621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpBC8bA57il8Sj47B7QPJ%2Fuploads%2Fgit-blob-94f8050fbabb4f4c5de5adb131e95c12e54eeca7%2Ftenantfielddefee.png?alt=media)

Scroll down and click **Apply** to save your changes.

![Data Ingestion](https://858372621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpBC8bA57il8Sj47B7QPJ%2Fuploads%2Fgit-blob-dfc32578e7edc9769f1acdde884a1bf5cb456363%2Fapply.png?alt=media)

After clicking **Apply**, you now see your **identification** object in the Schema.

![Data Ingestion](https://858372621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpBC8bA57il8Sj47B7QPJ%2Fuploads%2Fgit-blob-1033ea6ef40d8a609d15baf10322e0659b03a31a%2Fschemaidee.png?alt=media)

You'll now add 1 new field under the **identification** object.

Click the **+** button next to the **identification** object to create a new field.

![Data Ingestion](https://858372621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpBC8bA57il8Sj47B7QPJ%2Fuploads%2Fgit-blob-c88576ed3386c88e5a62f110d1292aa785ffc076%2Fschemaideeplus.png?alt=media)

The ECID-field will be defined as type **String** and you'll configure this field as an **Identity**. For the Schema **Demo System - Event Schema for Website**, we assume that a customer will always be identified by their ECID, which means that you have to configure the field **ECID** as a **primary** identifier

You now have an empty field. You need to configure the above field as indicated.

* ecid:
  * Field name: **ecid**
  * Display name: **ecid**
  * Type: **String**

This is how the ecid-field should look after your initial field configuration:

![Data Ingestion](https://858372621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpBC8bA57il8Sj47B7QPJ%2Fuploads%2Fgit-blob-9df6d376888900539eef346e6f2f68d56aebb22b%2Fecidfieldee.png?alt=media)

Scroll down and click **Apply**.

![Data Ingestion](https://858372621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpBC8bA57il8Sj47B7QPJ%2Fuploads%2Fgit-blob-dfc32578e7edc9769f1acdde884a1bf5cb456363%2Fapply.png?alt=media)

You now have a new field, but this field hasn't been defined as an **Identity**-field yet.

![Data Ingestion](https://858372621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpBC8bA57il8Sj47B7QPJ%2Fuploads%2Fgit-blob-9c70b7adc006fad5812b7383c1811e81162566cd%2F3fieldsee.png?alt=media)

To start defining these fields as **Identity**-fields, follow these steps:

* Select the field **ecid**.
* On the right side, in the field properties, scroll down until you see **Identity**. Check the checkbox for **Identity**.

![Data Ingestion](https://858372621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpBC8bA57il8Sj47B7QPJ%2Fuploads%2Fgit-blob-770529f5e92e487b8f0d7537872de6e88f82d517%2Fecididee.png?alt=media)

* Now check the checkbox for **Primary Identity**.

![Data Ingestion](https://858372621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpBC8bA57il8Sj47B7QPJ%2Fuploads%2Fgit-blob-d4ee1095b0d9431f89db95940cb29960046fbcda%2Fecidprimidee.png?alt=media)

* Lastly, select the namespace **ECID** from the list of **Namespaces**. A Namespace is used by the Identity Graph in Adobe Experience Platform to classify identifiers in namespaces and define the relationship between those namespaces.

  ![Data Ingestion](https://858372621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpBC8bA57il8Sj47B7QPJ%2Fuploads%2Fgit-blob-cfb06be8ec7b3df0227b8824a1f787349347f07d%2Fecidprimidnsee.png?alt=media)
* Finally, click **Apply** to save your changes.

  ![Data Ingestion](https://858372621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpBC8bA57il8Sj47B7QPJ%2Fuploads%2Fgit-blob-dfc32578e7edc9769f1acdde884a1bf5cb456363%2Fapply.png?alt=media)

The **identification** object should now look like this, with the ecid-field now also showing a **fingerprint** icon to show that they have been defined as identifiers.

![Data Ingestion](https://858372621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpBC8bA57il8Sj47B7QPJ%2Fuploads%2Fgit-blob-944b35c7757211f9a2cb4c7a26ead7d5a4c2e6af%2Fapplyidenee.png?alt=media)

Let's now give your schema a name. Select the field **Untitled schema**.

![Data Ingestion](https://858372621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpBC8bA57il8Sj47B7QPJ%2Fuploads%2Fgit-blob-6a181e2e4d41021250a0ea0ed20bd42122fc9b4f%2Fschemaname1ee.png?alt=media)

As the name for our schema, we'll use this: `--demoProfileLdap-- - Demo System - Event Schema for Website`

As an example, for ldap **vangeluw**, this should be the name of the schema:

**vangeluw - Demo System - Event Schema for Website**

That should give you something like this:

![Data Ingestion](https://858372621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpBC8bA57il8Sj47B7QPJ%2Fuploads%2Fgit-blob-ceb7c5d937bb3937d713ab0af1b1063516aa4f99%2Fschemanameee.png?alt=media)

Click **Save** to save your changes.

![Data Ingestion](https://858372621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpBC8bA57il8Sj47B7QPJ%2Fuploads%2Fgit-blob-e7f4062a1fcd884d707446df249f9c13b3c31e40%2Fsave.png?alt=media)

It's important to note that when eventually ingesting data against this schema, that some fields are required. For instance, the fields **\_id** and **timestamp** are required fields.

* \_id needs to contain a unique id for a specific data ingestion
* timestamp needs to be the timestamp of this hit, in the format **"YYYY-MM-DDTHH:MM:SSSZ"**, like for instance: **"2019-04-08T07:20:000Z"**

You have now defined a schema, linked existing and newly created Field Groups and have defined identifiers.

The last thing to do here, is to activate the Schema to be linked to the **Profile**. By enabling your schema for Profile, you're making sure that all data sent to Adobe Experience Platform against this schema will be part of the Real-time Customer Profile, which makes sure that all that data can be used in real-time for querying, segmentation and activation.

To do this, let's select the name of your schema.

![Data Ingestion](https://858372621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpBC8bA57il8Sj47B7QPJ%2Fuploads%2Fgit-blob-2abe985331ff4f94c8060c7387b54a75bb564a2e%2Fschemastructureeee.png?alt=media)

In the right tab of your schema, you'll see a **Profile] toggle**, which is currently deactivated.

![Data Ingestion](https://858372621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpBC8bA57il8Sj47B7QPJ%2Fuploads%2Fgit-blob-5909ea086140edd001d299ce493cb4c66797617c%2Fupswitcheree.png?alt=media)

Activate the Profile - switch by clicking it.

You'll see this message:

![Data Ingestion](https://858372621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpBC8bA57il8Sj47B7QPJ%2Fuploads%2Fgit-blob-66aee1721ad2af527e6f7022f798241d14af0b40%2Fsure.png?alt=media)

Click **Enable** to enable this schema for Profile.

Your schema is now configured to be part of the Real-time Customer Profile.

![Data Ingestion](https://858372621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpBC8bA57il8Sj47B7QPJ%2Fuploads%2Fgit-blob-a1e8b74b83072d937380c65e4feef916cc8ab113%2Fsurey.png?alt=media)

Finally, click **Save** to save your schema.

![Data Ingestion](https://858372621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpBC8bA57il8Sj47B7QPJ%2Fuploads%2Fgit-blob-e7f4062a1fcd884d707446df249f9c13b3c31e40%2Fsave.png?alt=media)

You've now finished building schemas that are activated to be used in the Real-time Customer Profile.

Let's have a look at datasets in the next exercise.
