---
title: [Optional] Customer AI Model
slug: tesco-hol-q12026/optional-customer-ai-model
docTags: 
createdAt: 2025-07-09T14:34:38.597Z
---

## Why Are We Using AI?

So far, we identified customers who have **already stopped purchasing Meal Deals** and added them to a win-back journey.

However, reacting after a habit is lost is expensive, we want to intervene earlier.

Customer AI allows Tesco to identify shoppers whose behaviour suggests they are **about to stop buying Meal Deals**, even though they have not lapsed yet. This enables preventative engagement instead of recovery marketing.

We will now build a model that detects customers at risk of breaking their Meal Deal habit.

With Customer AI, these insights are delivered automatically and are updated continuously as your data evolves.

### What the Model Predicts

:::BlockQuote
The likelihood a customer will purchase a Meal Deal in the next 30 days.
:::

Customers with a **low likelihood score** are considered at risk of lapsing and can be targeted earlier with incentives.

This complements the existing rule-based lapsed purchaser audience:

| Audience Type      | Detection Method | Purpose             |
| ------------------ | ---------------- | ------------------- |
| Lapsed Purchasers  | Behaviour rules  | Win back lost habit |
| At-Risk Purchasers | AI prediction    | Prevent habit loss  |

## Create the Meal Deal Risk Model

:::hint{type="info"}
To log into the Adobe Experience Platform, check the **Welcome!&#x20;**&#x73;ection.
:::

1. In the left rail, click on **Data Science** and choose **Services.**
2. On the **Services** overview page, click **Open** on the **Customer AI&#x20;**&#x70;roduct card.

### Create a new Model

1. Click **Create Instance.**
2. Enter a **name** for your model - E.g`Your Name Meal Deal Risk Model`.
3. Optionally, add a description: "Scores each customer profile by likelihood a customer will purchase a Meal Deal in the next 30 days".
4. Choose `Conversion` as the **Propensity Type&#x20;**&#x66;rom the drop down options.
5. Click **Save and continue.**

### Select the Data

Select the datasets containing customer purchase events. These datasets include transaction behaviour used to train the model to recognise changing purchase patterns over time.

We align datasets using a shared customer identifier so behaviour across channels contributes to one prediction.

1. Select the following datasets from the list:
   - Website Events: `Demo System - Event Dataset for Website (Global v1.1)`
   - Mobile App Events: `Demo System - Event Dataset for Mobile App (Global v1.1)`
   - POS Events: `Demo System - Event Dataset for POS (Global v1.1)`
2. You can join multiple datasets to one another based on the identity map (field). You must select an identity type (also known as an “identity namespace”) and an identity value within that namespace. In out example we'll use the `CRM ID`, present in all three datasets.
   - Click the **Identity** (`ECID`) of the first dataset, a popup will open.
   - Select `crmId (_demopotemea.identification.core.crmId)` from the **Identity&#x20;**&#x64;rop down.
   - Click **Save**.
   - Repeat for your other datasets to ensure the identities of all datasets match.

Click **Save and continue.**

![](https://api.archbee.com/api/optimize/Kr9jNQk3X89PNSZafWHK9-9KNTCCHWsESdgqpc114t7-20250715-143816.gif)

### Define the Goal

Choose the event that represents a successful behaviour: **Meal Deal Purchase**

This tells the model what behaviour we want to predict. The model will learn patterns that occurr befor customers stop buying meal deals.

1. In the **Define your Goal&#x20;**&#x64;rop down, select **Combined Datasets.**
2. In the same box, type `eventType`, and select this from the dropdown options.
3. Set the ***eventType*** value to `equals` `commerce.purchases`

![](https://api.archbee.com/api/optimize/Kr9jNQk3X89PNSZafWHK9-baBQ4Bxvh61g8oM2hX85u-20250714-211603.gif)

Our Goal now represents a **purchase event**. This is all purchase events, so we need to refine this further to represent only **Meal Deal purchase events**.

To only include the meal deal purchases in the model:

1. Select **+Add event&#x20;**&#x66;rom underneath your first condition.
2. In the new dropdown, type `productListItems._demopotemea.core.mainCategory`, and select this from the dropdown options.
3. Set the value to `equals` `Meal Deal`

Your final goal condition should look like:

![](https://api.archbee.com/api/optimize/1Jp0iolWv35Z_mkI7oUiT/ifIfDIB20YhsqvSHRGlPn-20260223-172725.png)

:::hint{type="info"}
Leave the Default setting for the rest of the options on the **Define your goal&#x20;**&#x73;tep.

For information only:&#x20;

- The **Timeframe**, e.g. *30 days*. The model will evaluate whether a customer is likely to purchase a Meal Deal within the 30 days.
- By default, propensity scores are generated for all profiles unless an **eligible population&#x20;**&#x69;s specified. You can specify an eligible population by defining conditions to include or exclude profiles based on events. e.g. *only those who have purchased a meal deal previously.*
- This If you have additional information in addition to the standard event fields used by Customer AI to generate propensity scores, a **custom events** option is provided. Using this option allows you add additional events that you deem influential which may improve the quality of your model and help to provide more accurate results
- You can define important Profile dataset fields (with timestamps) in your data in addition to the standard event fields used by Customer AI to generate propensity scores. Using this option allows you to add **additional profile&#x20;**&#x61;ttributes that you deem influential which may improve the quality of your model and provide more accurate results

For more information about how to improve the accuracy of **Customer AI** models, visit the [Adobe Experience League](https://experienceleague.adobe.com/en/docs/experience-platform/intelligent-services/customer-ai/user-guide/configure).
:::

### Schedule Scoring

Customer AI periodically evaluates profiles and writes scores back to Real-Time Customer Profile. Scores are calculated between **0 and 1** and displayed as grouped ranges in the interface.

Lower score = higher risk of breaking the habit of purchasing meal deals.

1. Review the **set** **options** screen.
2. Leave the default model scoring frequency
   - *It will initate a scoring run when you first create your model*

:::hint{type="warning"}
Do not click **Finish** here, instead you can **Save** and exit.&#x20;

Model training can take several hours. For the purposes of this lab, a pre-trained model is already available and will be used in the next step.
:::

Once complete, you’ll see **model performance metrics** (e.g., accuracy, precision).

### Review & Activate Scores

1. Navigate back to the Services Overview page. On the **Services** overview page, click **Open** on the **Customer AI&#x20;**&#x70;roduct card.
2. You'll see a previously created **Service Instance**.
3. Click the **Meal Deal Risk Model.**

You'll see the following:&#x20;

![](https://api.archbee.com/api/optimize/Kr9jNQk3X89PNSZafWHK9-dOao7WEpaBVBp-QJWwSqE-20250714-221126.png)

This model was set up ahead of the Lab, to show the output of our Customer AI model.&#x20;

- The **Performance Summary** tab shows the actual conversion rates for each propensity bucket.
- **Scoring summary** displays the total number of profiles scored and categorizes them into buckets containing high, medium, and low propensity. Lower bucket = higher lapse risk
- The **Distribution of Scores** card gives you a visual summary of the population based on the score. The colors that you see in the Distribution of Scores card represent the type of propensity score generated. Hovering over any of the scoring distributions provides the exact count belonging to that distribution.
- For each score bucket, a card is generated that shows the top 10 **influential factors** for that bucket. The **influential factors** give you additional details on why your customers belong to various score buckets.
  - Hovering over any of the top influential factors further breaks down the data. You are provided an overview as to why certain profiles belong to a propensity bucket. Depending on the factor, you may be given number, categorical, or boolean values. The example below displays categorical values by region.

Scores are written back automatically to the profile after each scoring run, and can now be used for:

- Audience creation&#x20;
- Activation to Destinations (e.g., email, ads)

### Create an Audience of High Risk Profiles

Now that your model is trained and scores are available on customer profiles, let's create an Audience of customers with a **high likelihood to stop purchasing meal deals.**

1. In the left rail, click on **Customers** and choose **Audiences.**
2. Select **+ Create Audience**
   1. Choose **Build Rule**
   2. Clic&#x6B;**&#x20;Create.**
3. Name your audience: `[Your name] At risk of Meal Deal Lapse`.
4. Ensure you are on the **Attributes** tab in the Fields section.
5. In the text search field, type `CustomerAI`. Click into the CustomerAI folder to see the models.
6. Select the **Meal Deal Risk Model**.
7. You'll see a `Score` attribute. Drag the **Score** attribute onto the canvas where it says **Start Building**.
8. Set the condition to:&#x20;
   - Score is `less than or equal` to `0.3`
9. Click **Publish.**

Your final Audience definition should look like:&#x20;

![](https://api.archbee.com/api/optimize/Kr9jNQk3X89PNSZafWHK9-xIgUXYj4XOAX2Cu-_y4bh-20250715-144750.png)

Once the audience is evaluated, it's ready to be activated to **Destinations,&#x20;**&#x75;sed in **Adobe Journey Optimizer,&#x20;**&#x6F;r monitored for ongoing performance.

:::hint{type="success"}
Success! By the end of this exercise, you should now:

- Have a trained and activated **Customer AI model** for predicting meal deal lapse.
- See scores available on individual profiles.
- Be able to use scores to build Audiences

For more information on the AI Model used in this example, visit the [Adobe Experience League](https://experienceleague.adobe.com/en/docs/experience-platform/intelligent-services/customer-ai/model-detail).
:::

