> For the complete documentation index, see [llms.txt](https://docs.adobesandbox.com/comprehensive-technical-tutorial-archive/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.adobesandbox.com/comprehensive-technical-tutorial-archive/module5/ex1.md).

# 5.1 Customer AI - Data Preparation (Ingest)

In order for Intelligent Services to discover insights from your marketing events data, the data must be semantically enriched and maintained in a standard structure. Intelligent Services leverages Adobe's Experience Data Model (XDM) schemas in order to achieve this. Specifically, all datasets that are used in Intelligent Services must conform to the **Consumer Experience Event** XDM schema.

## 5.1.1 Create Schema

In this exercise, you'll create a schema that contains the **Consumer Experience Event mixin**, which is required by the **Customer AI** Intelligent Service.

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](/files/92n6hsetUxai3TUlDnwl)

Before you continue, you need to select a **sandbox**. The sandbox to select is named `--module10sandbox--`. You can do this by clicking the text **\[!UICONTROL 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](/files/m26Un7LA08irN3MC4uos)

From the left menu, click **Schemas** and go to **Browse**. Click **Create Schema**.

![Create new schema](/files/xjkELhqBdGqjQipuSnz8)

In the popup, select **XDM ExperienceEvent**.

![Create new schema](/files/4pZtzqTZVAKkbVnYbv8O)

You'll then see this.

![Create new schema](/files/am7RYhE23IqQOLCIhR4Y)

Search and select the following **Mixins** to add to this Schema:

* Consumer Experience Event

  ![New CEE schema](/files/13VTWqXCSprsPupYKS06)
* End User ID Details

  ![New CEE schema](/files/Mu7yuZGtTZbgwk6aLWoa)

Click **Add Field Groups**.

![Identity key defn](/files/g1sdNhpimsjKg8fYve59)

You'll then see this. Select the Mixin **End User ID Details**.

![Create new schema](/files/JGEykuBCxvDe3Tjobgyw)

Navigate to the field **endUserIDs.\_experience.emailid.id**.

![Create new schema](/files/Wbp3mDi3Wv7dzF9SAkJq)

In the right menu for the field **endUserIDs.\_experience.emailid.id**, scroll down and check the checkbox for **Identity**, check the checkbox for **Primary Identity** and select the **Identity namespace** of **Email**.

![Create new schema](/files/qFu2ekRIo3I9lhJfnz7n)

Navigate to the field **endUserIDs.\_experience.mcid.id**. Check the checkbox for **Identity** and select the **Identity namespace** of **ECID**. Click **Apply**.

![Create new schema](/files/aBeUQAGGVfN1mAoVZ3PX)

Give your schema a name now.

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

* `--demoProfileLdap-- - Demo System - Customer Experience Event`

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

* **vangeluw - Demo System - Customer Experience Event**

That should give you something like this. Click the **+ Add** button to add new **Mixins**.

![Create new schema](/files/3evzrvlVaiWZ2YcHr3Un)

Select the name of your schema. You should now enable your schema for **Profile**, by clicking the **Profile** toggle.

![Create new schema](/files/a0PgEzNo6T5TUnjb0sbP)

You'll then see this. Click **Enable**.

![Create new schema](/files/vh2IErohijvdN950Z5mB)

You should now have this. Click **Save** to save your schema.

![Create new schema](/files/AKTJUOOwmu2bnF7Na7cH)

## 5.1.2 Create Dataset

From the left menu, click **Datasets** and go to **Browse**. Click **Create dataset**.

![Dataset](/files/49n9pJAanqw0IW2JoaJa)

Click **Create dataset from schema**.

![Dataset](/files/p2mcpIUyaUnKFrlks1w5)

In the next screen, select the dataset you created in the previous exercise, which is named **\[!UICONTROL ldap - Demo System - Customer Experience Event]**. Click **Next**.

![Dataset](/files/ZoLvnwlf6ZAs0jn8kpFX)

As a name for your dataset, use `--demoProfileLdap-- - Demo System - Customer Experience Event Dataset`. Click **Finish**.

![Dataset](/files/EGWXGHRXYWGi5h3fgTqy)

Your dataset is now created. Enable the **Profile** toggle.

![Dataset](/files/o2zJkMDG1Nvd4tMBcnw1)

Click **Enable**.

![Dataset](/files/VfBngTmT0vqUm6dDRJQ7)

You should now have this:

![Dataset](/files/lDpeqm1CXoehWVuNDCxa)

You're now ready to start ingesting Consumer Experience Event data and start using the Customer AI service.

## 5.1.3 Download Experience Event test data

Once the **Schema** and **Dataset** are configured, you're now ready to ingest Experience Event data. Since Customer AI requires data across **2 quarters at least**, you'll need to ingest externally prepared data.

The data prepared for the experience events must comply to the requirements and schema of the [Consumer Experience Event XDM Mixin](https://github.com/adobe/xdm/blob/797cf4930d5a80799a095256302675b1362c9a15/docs/reference/context/experienceevent-consumer.schema.md).

Please download the file containing sample data from this location: <https://dashboard.adobedemo.com/data>. Click the **Download** button.

![Dataset](/files/sawco1sc6KzENYvmV6ID)

Alternatively, if you can't access the above link, you can download the file also from this location: <https://aepmodule10.s3-us-west-2.amazonaws.com/retail-v1-dec2020-xl.json.zip>.

You've now downloaded a file named **retail-v1-dec2020-xl.json.zip**. Place the file on your computer's desktop and unzip it, after which you'll see a file named **retail-v1.json**. You'll need this file in the next exercise.

![Dataset](/files/TjPUHPCrHLoAs7K8vFLq)

## 5.1.4 Ingest Experience Event test data

In Adobe Experience Platform, go to **Datasets** and open your dataset, which is named **ldap - Demo System - Customer Experience Event Dataset**.

![Dataset](/files/C82OhXm5iigxLvH1m94e)

In your dataset, click **Choose files** to add data.

![Dataset](/files/YWB6VQNgHBY7KoyaMd5D)

In the popup, select the file **retail-v1.json** and click **Open**.

![Dataset](/files/YZlKgHerpY00mBmvIZPs)

You'll then see the data being imported, and a new batch is created in the **Loading** state. Don't navigate away from this page until the file is uploaded.

![Dataset](/files/gl24chGByI8bS77rxLEu)

Once the file has been uploaded, you'll see the batch status change from **Loading** to **Processing**.

![Dataset](/files/9jwkWIgdBxPtetUEoXRu)

Ingesting and processing the data might take 10-20min.

Once data ingestion is successful, the batch status will change to **Success**.

![Dataset](/files/ihziS74jXQ0PnGt4HEFb)

![Dataset](/files/SxYWhxNl2W7ZgE7LqLF8)
