---
title: "Decision table inputs"
slug: "decision-table-inputs"
abstract: "Learn how decision table inputs define the data used to target visitors in component personalization."
---
# Decision table inputs

> [!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.

In [component personalization](https://doc.sitecore.com/sai/en/users/sitecoreai/personalize-and-test/component-personalization.html "Component personalization"), inputs define the data that personalization rules use to evaluate visitors and determine which component variant they see.

For example, you might use **Country** and **Device type** as inputs in the decision table if you want to target mobile visitors in specific countries.

> [!tip]
> Location-based personalization depends on available location data and may not always reflect a visitor’s exact physical location. VPNs, proxies, network routing, and upstream data sources can affect location accuracy.

When personalizing components in Page builder, you can use three input types in decision tables, described in the following sections: [Profile data](https://doc.sitecore.com/sai/en/users/sitecoreai/personalize-and-test/component-personalization/decision-tables/decision-table-inputs.html#profile-data "Profile data"), [Conditions](https://doc.sitecore.com/sai/en/users/sitecoreai/personalize-and-test/component-personalization/decision-tables/decision-table-inputs.html#conditions "Conditions"), and [Custom values](https://doc.sitecore.com/sai/en/users/sitecoreai/personalize-and-test/component-personalization/decision-tables/decision-table-inputs.html#custom-values "Custom values").

Each input appears as a column in the personalized component's decision table.

![Each input appears as a column in the personalized component's decision table.](https://doc.sitecore.com/api/markdown-image/sai/en/users/sitecoreai/images/DT_Input_options.png)

You can use a single input or combine multiple inputs to target specific audiences.

When you combine multiple inputs in a rule, a visitor must match all of them for the rule to apply.

## Profile data

Use existing visitor profile attributes in SitecoreAI as inputs in decision tables for component personalization.

The following profile attributes are available as inputs:

| Attribute | Description | Example values |
| --- | --- | --- |
| **Channel** | The platform or pathway that your audience uses to connect with your brand. | <ul><li>web</li><li>mobile</li><li>mobileApp</li><li>offline</li></ul> |
| **City** | The city associated with the visitor’s location. | <ul><li>Copenhagen</li><li>Dublin</li></ul> |
| **Continent** | The continent associated with the visitor’s location (using standard 2-letter codes). | <ul><li>AF - Africa</li><li>AN - Antarctica</li><li>AS - Asia</li><li>EU - Europe</li><li>NA - North America</li><li>OC - Oceania</li><li>SA - South America</li></ul> |
| **Country** | The country associated with the visitor’s location (in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format). | US, CA, IE, DK, DE |
| **Date of birth** | The visitor’s date of birth. | 04/28/2000 |
| **Device type** | The device used by the visitor. | <ul><li>Desktop</li><li>Mobile</li><li>Tablet</li></ul> |
| **Email** | The visitor’s email address. | user@sitecore.com |
| **First name** | The visitor’s first name. | John |
| **Gender** | The visitor’s gender. | <ul><li>Female</li><li>Male</li><li>Unknown</li></ul> |
| **Last name** | The visitor’s last name. | Doe |
| **Operating system** | The operating system used on the visitor’s device. | <ul><li>Windows</li><li>macOS</li><li>iOS</li><li>Android</li><li>Linux</li></ul> |
| **Referrer** | The source or website the visitor came from before visiting your site. | google.com |
| **Region** | The region or state associated with the visitor’s location. | Texas |
| **Type** | The visitor's profile type or status. | <ul><li>visitor</li><li>identified</li><li>retired</li></ul> |
| **UTM campaign** | The marketing campaign name captured from UTM (Urchin Tracking Module) parameters. | spring-sale |
| **UTM medium** | The marketing channel captured from UTM parameters. | email |
| **UTM source** | The traffic source captured from UTM parameters. | google |

## Conditions

SitecoreAI includes [out-of-the-box conditions](https://doc.sitecore.com/sai/en/users/sitecoreai/personalize-and-test/personalize/specifying-variables-for-conditions.html "Specifying variables for conditions") for common targeting scenarios, and you can create custom conditions for more advanced logic.

You can use these same conditions as inputs in decision tables for component personalization. When you select a condition, you configure how that input is evaluated.

For example, you can select the out-of-the-box **Country** condition to check whether a visitor is from *Denmark*. The condition input can evaluate to `true`, `false`, or `null`, which can then be used in a personalization rule.

## Custom values

Use custom values as inputs in decision tables for component personalization when the data you need is not available through profile data or conditions.

Using JavaScript, custom values can combine profile attributes, visitor behavior, and calculated logic into a single reusable value.

Custom values can be either [predefiend values](https://doc.sitecore.com/sai/en/users/sitecoreai/personalize-and-test/component-personalization/decision-tables/decision-table-inputs.html#out-of-the-box-ootb "Out-of-the-box (OOTB)") provided by SitecoreAI or [custom JavaScript values](https://doc.sitecore.com/sai/en/users/sitecoreai/personalize-and-test/component-personalization/decision-tables/decision-table-inputs.html#custom "Custom") that you create for your own targeting logic.

### Out-of-the-box (OOTB)

Use predefined custom values as inputs for common targeting scenarios.

- **First page** - the first page viewed in the visitor’s current session. Returns `null` if no matching page view is found.
- **Guest birthday** - whether the visitor’s birthday matches the current date.
- **Number of page views** - the total page views in the visitor’s current session
- **Top Affinity** - the highest affinity value in the visitor profile. Returns `null` if no valid affinities are found.

### Custom

[Create your own JavaScript-based custom values](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") when other input types do not provide the targeting flexibility you need.

This allows you to combine profile attributes, session activity, and visitor behavior into reusable values that match your business logic.

For example, the following custom value classifies visitors as *high*, *medium*, or *low* intent based on session count and page views:

```js
(function() {
  var sessionCount = profile?.sessions?.length ?? 0;
  var pageViewCount = profile?.traits?.session?.stats?.eventTypeCount?.pageView ?? 0;

  if (sessionCount >= 10 || pageViewCount >= 100) {
    return 'high';
  } else if (sessionCount >= 5 || pageViewCount >= 50) {
    return 'medium';
  } else {
    return 'low';
  }
})();

```