---
title: "Personalize a component"
slug: "personalize-a-component"
abstract: "Use component personalization to control what content appears in specific parts of a page based on who is visiting."
---
# Personalize a component

> [!important]
> Feature availability is part of a phased rollout. Your organization may not see this functionality yet. It will become available when your environment is included in the rollout.

Use [component personalization](https://doc.sitecore.com/sai/en/users/sitecoreai/personalize-and-test/component-personalization.html "Component personalization") to show different component variants to different visitors based on targeting criteria such as visitor profile data, conditions, or custom values.

To do this, configure the component’s decision table by defining inputs, creating rules, and configurng the corresponding component variant for each rule.

To personalize a component in SitecoreAI:

1. [Select a component to personalize](https://doc.sitecore.com/sai/en/users/sitecoreai/personalize-and-test/component-personalization/personalize-a-component.html#select-a-component-to-personalize "Select a component to personalize")
2. [Define decision table inputs](https://doc.sitecore.com/sai/en/users/sitecoreai/personalize-and-test/component-personalization/personalize-a-component.html#define-decision-table-inputs "Define decision table inputs")
3. [Create personalization rules](https://doc.sitecore.com/sai/en/users/sitecoreai/personalize-and-test/component-personalization/personalize-a-component.html#create-personalization-rules "Create personalization rules")
4. [Configure variants for each rule](https://doc.sitecore.com/sai/en/users/sitecoreai/personalize-and-test/component-personalization/personalize-a-component.html#configure-variants-for-each-rule "Configure variants for each rule")

## Select a component to personalize

Select the page component you want to personalize. The personalization rules and component variants you configure apply only to this component.

> [!warning]
> Component personalization is shared across page versions. If you edit personalization rules in one page version, the changes also apply to other versions, including the live version.

To select a component:

1. In the Page builder **Editor** mode, open the page containing the component you want to personalize.
2. Select the component (for example, the *Page Header*).
3. In the context toolbar, click **Add personalization rules to component** ![addpersonalization.png](https://doc.sitecore.com/api/markdown-image/sai/en/users/sitecoreai/images/addpersonalization.png).

    ![Select a component and then click Add personalization rules to component in the context toolbar.](https://doc.sitecore.com/api/markdown-image/sai/en/users/sitecoreai/images/Selectcomponent.png)

The decision table dialog for the selected component opens. Here, you can define the decision table inputs and rules.

## Define decision table inputs

Decision table [inputs](https://doc.sitecore.com/sai/en/users/sitecoreai/personalize-and-test/component-personalization/decision-tables/decision-table-inputs.html "Decision table inputs") define the data (such as location, device type, birthday) that personalization rules use to evaluate visitors and determine which component variant they see.

To define decision table inputs:

1. In the decision table dialog, on the **Builder** tab, click **Create new table**.

    Alternatively, click **Clone existing table** and select a decision table to copy. The copied table opens immediately, and you can edit it as needed.

2. For a new table, select an [input type](https://doc.sitecore.com/sai/en/users/sitecoreai/personalize-and-test/component-personalization/decision-tables/decision-table-inputs.html "Decision table inputs"):
    - **Profile data** - visitor profile attributes stored in SitecoreAI.
    - **Condition** - out-of-the-box or custom conditions in in SitecoreAI..
    - **Custom value** - JavaScript-based values created for advanced targeting scenarios beyond profile data or conditions.
3. Depending on the selected type, configure the input as follows:
    - **Profile data** - select a [profile](https://doc.sitecore.com/sai/en/users/sitecoreai/personalize-and-test/component-personalization/decision-tables/decision-table-inputs.html#profile-data "Profile data") attribute to use, such as *Country*, *Gender*, or *Email*.
    - **Condition** - do one of the following:
        - Select an [out-of-the-box condition](https://doc.sitecore.com/sai/en/users/sitecoreai/personalize-and-test/personalize/specifying-variables-for-conditions.html "Specifying variables for conditions") or a [custom condition](https://doc.sitecore.com/sai/en/users/sitecoreai/personalize-and-test/personalize/create-a-custom-condition.html).
        - Click **Create new** to [build a new custom condition](https://doc.sitecore.com/sai/en/users/sitecoreai/personalize-and-test/personalize/create-a-custom-condition.html "Create a custom condition").

        Then, specify the details of the selected condition. For example, for the **Country** condition, you can configure it as *Country is not Denmark*.

        For more information about the available conditions and their details, see [Condition templates](https://doc.sitecore.com/sai/en/users/sitecoreai/personalize-and-test/personalize/specifying-variables-for-conditions.html "Specifying variables for conditions").

    - **Custom value** - select an out-of-the-box [custom value](https://doc.sitecore.com/sai/en/users/sitecoreai/personalize-and-test/component-personalization/decision-tables/decision-table-inputs.html#custom-values "Custom values") such as *First Page* or *Top Affinity* or a a custom value, or click **Create new** to [create a new custom value](https://doc.sitecore.com/sai/en/users/sitecoreai/personalize-and-test/component-personalization/decision-tables/decision-table-inputs/create-custom-values.html "Create custom values").
4. Click **Save**. The selected input appears as a new column in the decision table.
5. To add more inputs to the decision table, click **Add column** and repeat these steps.

    Multiple inputs are combined using an `AND` condition.

    For example, you can target visitors by both city and gender. These inputs appear as separate columns in the decision table.

    ![Inputs you select appear as separate columns in the decision table.](https://doc.sitecore.com/api/markdown-image/sai/en/users/sitecoreai/images/Addrules.png)

## Create personalization rules

Personalization [rules](https://doc.sitecore.com/sai/en/users/sitecoreai/personalize-and-test/component-personalization/decision-tables/decision-table-rules.html "Decision table rules") in the decision table define how visitors are matched to different component variants based on the inputs you configured.

To create personalization rules:

1. In the first row of the decision table, click **Add**.
2. For each input column, select a [comparator](https://doc.sitecore.com/sai/en/users/sitecoreai/personalize-and-test/component-personalization/decision-tables/decision-table-rules.html#available-decision-table-comparators "Available decision table comparators"), enter the comparison value, then click **Confirm**.

    For example, to target male visitors from Copenhagen, configure the relevant input columns as follows:

    - **City** is equal to `Copenhagen`
    - **Gender** is equal to `Male`

    This combination appears as a rule in the decision table.

    ![A row corresponds to a rule in the decision table after you select a comparator and a value for each column.](https://doc.sitecore.com/api/markdown-image/sai/en/users/sitecoreai/images/Addvalues.png)

3. To add more personalization rules, click **Add Rule** and repeat these steps.
4. Optionally, you can:
    - [Manage inputs and rules in the decision table](https://doc.sitecore.com/sai/en/users/sitecoreai/personalize-and-test/component-personalization/decision-tables/manage-decision-table-inputs-and-rules.html "Manage decision table inputs and rules") to reorder, delete, duplicate or fill them with default values.
    - [Test personalization rules](https://doc.sitecore.com/sai/en/users/sitecoreai/personalize-and-test/component-personalization/test-the-component-personalization.html "Test the component personalization") against a visitor profile to verify behavior.
5. Click **Save & close**.

After saving, the page displays the original component and the personalization is marked with a *Draft* status.

## Configure variants for each rule

Each personalization rule creates a corresponding component variant. After saving your personalization inputs and rules, configure the component variant shown to visitors who match each rule.

To configure component variants:

1. In the right pane, select the component variant you want to configure.

    For example, select the first variant below the **Original** component.

2. For each component variant, choose one of the following options to configure its content:

    ![For each variant, you can choose to duplicate the original component, hide it, or swap with another compatible component.](https://doc.sitecore.com/api/markdown-image/sai/en/users/sitecoreai/images/Configurevariant.png)

    - **Duplicate original** - create a copy of the original component as a starting point.
    - **Hide component** - do not display the component for this variant.
    - **Swap component** - replace the component with another compatible component.
3. Update the content and design as needed.
4. Repeat these steps until all component variants are configured.
5. Optionally, click the preview icon :mdiEyeOutline: to preview a variant.

When you are ready, publish the page and [start the personalization](https://doc.sitecore.com/sai/en/users/sitecoreai/personalize-and-test/component-personalization/start-the-component-personalization.html "Start the component personalization") to make the component variants available to visitors.