Showing posts with label Page Builder. Show all posts
Showing posts with label Page Builder. Show all posts

Tuesday, 24 November 2026

SitecoreAI Component Personalization, Part 2: Testing, Activation, and Analytics

November 24, 2026 0

 


A team I worked with saved their decision table, published the page, and announced the campaign was live. Two days later the analytics were empty. Nobody had clicked Start personalization. Saving, publishing, and starting are three separate actions in SitecoreAI, and skipping any one of them means visitors never see your variants.

In Part 1, we designed the decision model: inputs, ordered rules, and variants. This part takes that configuration through testing, custom values, publishing, activation, analytics, and maintenance, step by step.

Before you begin

Component personalization is part of SitecoreAI's phased rollout, so the UI and availability can vary by environment.

Prerequisites

You need:

  • A component with a saved decision table and configured variants (covered in Part 1).
  • Visitor profiles you can test with, including at least one with incomplete data.
  • An agreed business KPI and an owner for the analytics review.
  • A named person who can start and pause personalization in production.

How it works


Three states are easy to blur together: a saved draft, a published page, and started personalization. Visitors only receive variants once the page is published and personalization is started. When something "isn't working" right after launch, check those two first.

Step 1: Test rules against visitor profiles

A rule that can match isn't enough. Because evaluation stops at the first match, you need to confirm that the intended rule wins when several could apply.

  1. Open the component's decision table.
  2. Select the option to test personalization rules.
  3. Choose a visitor profile.
  4. Run the test.



  5. Review which rule matches and the resulting variant.
  6. Repeat with the other scenario profiles.

Build your test set around these five scenarios:

Scenario

What it catches

Matches the first rule

Basic matching works

Matches a later rule

Earlier rules don't capture it by mistake

Could match more than one rule

Rule-order problems

Matches no rule

The fallback is shown

Incomplete or missing data

Assumptions about data availability

The overlap scenario finds the most bugs. A profile interested in SUV , should view SUV detail, not the broader General rule.

Test the fallback

Always include a no-match profile. When no rule matches, SitecoreAI shows the original component. Check that it suits your whole visitor population and doesn't carry campaign content meant for a narrower group.

Step 2: Create and test custom values

Custom values are JavaScript-based inputs that combine profile data, behavior, and calculated logic. Here's an illustrative pattern based on Sitecore's documented example, returning the last country user visited from in the visitor's latest session:

javascript

(function() {
  const selectedCountries = "[[countries | multienum(IN, US, UK) | { required: true }]]";
  const visitorCountry = profile?.sessions?.[0]?.geolocation?.country ?? "";

  if (!visitorCountry) {
    console.log("Visitor geolocation country is not available in the profile.");
    return false;
  }

  const countriesArray = selectedCountries.split(",");
  const isCountryMatched = countriesArray.includes(visitorCountry);

  console.log(`Visitor geolocation country: ${visitorCountry}, Selected countries: ${countriesArray}, Match found: ${isCountryMatched}`);
  return isCountryMatched;
})();

Confirm the runtime context and data shape in your environment before adapting it. The null and type checks aren't optional. Plenty of profiles have no sessions, and returning an explicit null is safer than assuming complete data.

Create the custom value

  1. In the decision table, add a Custom value input.
  2. Select Create new.
  3. On the Custom Values page, enter a name.
  4. Add the JavaScript, or use Code Assistant to generate a starting point.



  5. Add a description and tags.
  6. Select the return type: String, Number, Boolean, Date, or Array.
  7. Save.

Test it

  1. Open the custom value and select Test.
  2. Load a profile by client ID or profile ID, or generate a test profile where that's available.
  3. Run the test and inspect the response.



    >


     

  4. Repeat with a profile that has no sessions, and confirm you get null, not an error.

Review Code Assistant output carefully

Code Assistant turns a natural-language prompt into JavaScript. Be specific about which fields to inspect, any time window, the conditions, and the expected return type including null. Sitecore warns that generated responses can vary and may not always be accurate. Treat the output as a first draft from a junior developer: read every line and test it against several profiles.

Publish the custom value

  1. Open the custom value.
  2. Select Publish and confirm.
  3. Check that its status is Published.
  4. Return to the decision table and select it as an input.

A saved draft isn't automatically available as a published input. If you can't select a custom value in the table, check its status first.

Step 3: Review and publish the page

Before publishing, check that:

  1. Each variant renders correctly.
  2. Text and imagery fit the intended scenario.
  3. Links and CTAs go to the right place.
  4. Mobile and desktop layouts both work.
  5. The original component is a valid no-match experience.
  6. This component doesn't conflict with other personalized areas on the page.

Then publish the page through your normal Page builder workflow.

Publishing doesn't start personalization. That's the next step.

Step 4: Start personalization

  1. Open the component personalization controls.
  2. Review the saved rules and variants.
  3. Select Start personalization.

     

  4. Confirm if prompted.
  5. Verify the personalization status.



Before you click in production, confirm you're on the right page and component and that the latest intended version is published. For time-sensitive campaigns, agree the start time with the campaign owner.

Step 5: Review analytics

Once visitors start seeing live variants, analytics become available.

  1. Open the personalization analytics for the component.
  2. Review rule execution counts and percentages.


  3. Ask these questions:
    • Which rule matches most often?
    • Are visitors reaching the targeted scenarios?
    • Is one rule capturing far more traffic than expected?
    • Are some variants getting almost no exposure?

Rule execution tells you about matching, not business impact. Compare it against the KPI you agreed before launch, such as CTA engagement. Without a KPI, you can claim activity, not success.

A rule capturing far more traffic than expected is usually a sign that it's too broad or sits too high in the table.

Step 6: Pause and maintain

Campaigns expire and data changes, so schedule reviews.

To stop an active personalization, use the documented pause control. Tell the content and campaign owners first, so everyone knows visitors will see the original component.

For each review, check:

  1. Is the campaign still valid?
  2. Are the profile attributes and conditions still populated?
  3. Do custom values still return the expected type?
  4. Have any rules become overlapping or redundant?
  5. Is the original component still the right fallback?
  6. Does the analytics picture still match the intended audience?

After any change, rerun your profile test scenarios and repeat the publish and start steps as the workflow requires.

Troubleshooting

The expected variant isn't displayed

Check in this order:

  1. Is personalization started?
  2. Is the page published?
  3. Does the profile contain the required data?
  4. Does the visitor satisfy every input in the rule?
  5. Is an earlier rule matching first?
  6. Is the intended variant configured and saved?

A custom value isn't available in the decision table

Check that it's published, has the expected return type, and exists in the environment you're working in.

A custom value returns null

Look at the test profile for missing sessions, missing traits, unexpected data types, or wrong assumptions about array order.

Analytics are empty

Confirm personalization is live and visitors are reaching it, then confirm you're looking at the right site, component, and scope.

Real project tips

Personalization doesn't create missing data. If country or an event-derived value isn't on the profile, no rule can target it reliably. Validate the data foundation before you touch the decision table.

Document every custom value. Record its business meaning, inputs, return type, null behavior, owner, and test cases. Without this, one team changes shared logic that another team's component depends on.

Remember page versions. Component personalization is shared across page versions, so a rule edit can affect the live version. Agree a change process before anyone edits rules on a draft.

Release checklist

Before starting a component personalization in production:



Summary

Component personalization is a small decisioning system attached to a component, and it needs to be operated like one. Test against representative profiles, validate the fallback, review custom JavaScript, publish the page, start personalization, and judge results against a real KPI.

Across both parts, the approach is the same: design the decision model carefully, then run it with testing, activation, measurement, and clear ownership.

Demo

To see these steps in practice, watch my webinar below. It includes a full demo of SitecoreAI personalization.



References

Component personalization

Thursday, 12 November 2026

SitecoreAI Component Personalization, Part 1: Decision Tables and Rule Design

November 12, 2026 0

 


A business owner asks for "a different hero banner for visitors from India." Simple enough. Two weeks later the request has grown: India on mobile, India on desktop, US on mobile, and returning visitors anywhere. Then someone notices that Indian mobile visitors are seeing the generic India banner, not the mobile one. Nothing is broken. The rules are just in the wrong order.

Component personalization in SitecoreAI is built for this kind of requirement: change one component while the rest of the page stays the same. This guide covers the design half of the work, step by step: choosing the scope, defining inputs, building and ordering rules, and configuring variants. Part 2 will cover testing, publishing, activation, analytics, and custom-value governance.

Before you begin

Sitecore documents component personalization as a phased rollout. Confirm it's enabled in your environment before you include it in a delivery commitment.

Prerequisites

Confirm each of these before creating a single rule:

  1. Environment availability: component personalization is enabled for your organization.
  2. Site implementation: your site setup and front-end integration support it.
  3. Visitor data: the profile attributes and conditions you plan to target are actually populated.
  4. Component design: you know which component changes and which variants each scenario needs.
  5. Fallback experience: you've decided what visitors see when no rule matches.
  6. Success measure: the business has agreed on a KPI, such as CTA click-through or form starts.

Item 3 causes the most rework. A country rule is only as reliable as the location data behind it. VPNs, proxies, and network routing all affect it, so treat inferred location as a strong hint, not a guarantee.

How it works



Everything revolves around the decision table, which has three parts:

  • Inputs: the visitor data used during evaluation. Each input is a column.
  • Rules: rows of comparisons that decide whether a visitor matches a scenario.
  • Outputs: the component variant mapped to each rule.

The detail developers most often miss is that evaluation stops at the first match. Rule order isn't a visual preference in the editor. It's part of the business logic.

Step 1: Decide between component and page personalization

Before opening Page builder, decide on the scope.

  1. Write down exactly what changes for the target visitor.
  2. If it's one component (a message, image, CTA, or content block), start with component personalization.
  3. If several parts of the page must change together as one coordinated experience, use page personalization instead.

Requirement

Better starting point

Change only the homepage hero for one country

Component

Change a banner CTA for returning visitors

Component

Use a custom calculated value to pick a banner variant

Component

Change hero, navigation emphasis, and product grid together

Page

Deliver one coordinated page experience to a visitor group

Page

Don't pick component personalization just because it feels more flexible. I've seen teams personalize four components independently, then struggle to explain why a visitor saw a India hero next to a US promotion. When parts of a page must agree, use page personalization.

Step 2: Select the component

  1. Open the page in Page builder.
  2. Select the component, for example a Page Header or promotional banner.
  3. In the component context toolbar, select Add personalization rules to component.


The decision-table dialog opens for that component.

Rules and variants apply to this component instance only. They don't automatically personalize every component of the same type across the site.

Watch out for page versions

Sitecore documents that component personalization is shared across page versions. Edit the rules in one version and the change applies to the others, including the live version.

A draft version or another language is not a safe sandbox. Coordinate rule changes with whoever owns the live experience.

Step 3: Define decision-table inputs

Inputs define what the rules can evaluate. SitecoreAI supports three types.

Profile data uses attributes already stored on the visitor profile, such as country, city, or channel. Use it when the targeting value already exists.

Input:  Country
Rule:   Country equals IN
Output: India campaign banner

The IN value is illustrative. Use the value format your environment's profile data actually supplies. Check a real profile under Optimization > Profiles before you type any values into a rule.

Conditions are true/false evaluations, either out-of-the-box or custom. "Is this a returning visitor?" is a typical example. Use a condition when the logic already exists as something reusable.

Custom values are JavaScript-based inputs that combine attributes, behavior, and calculated logic into one value, such as high, medium, or low intent. Use them only when profile data and conditions can't express the requirement. Part 2 covers them in detail.

Configure the inputs

  1. In the decision-table dialog, open the Builder tab.
  2. Select Create new table, or clone an existing table as a starting point.


  3. Choose the input type: Profile data, Condition, or Custom value.


  4. Select the attribute, condition, or custom value.


  5. Configure its details where prompted.
  6. Select Save.
  7. Use Add column to add more inputs.


Inputs in the same rule are combined with AND. Country = IN and Device type = mobile means the visitor must match both. There's no OR inside a row. If you need OR, that's a separate rule.

Step 4: Create personalization rules

Each row in the table is a rule.

  1. In the first row, select Add.
  2. For each input column, choose a comparator.
  3. Enter the comparison value.


  4. Confirm the comparison.
  5. Select Add Rule to create more rows.
  6. Save the decision table when the rule set is ready.


A regional mobile campaign might look like this:

CountryDevice typeResult
INmobileIndia mobile banner
INdesktopIndia desktop banner
USdesktopUS desktop banner

Rule order is priority

Now consider this order:

  1. Country = IN AND Device = mobile
  2. Country = IN AND Device = desktop
  3. Country = US AND Device = desktop

An Indian mobile visitor matches rules 1 and 2. Evaluation runs top to bottom, so rule 1 wins. Swap rules 1 and 2, and every Indian mobile visitor gets the generic Indian banner. That's exactly the bug from the opening of this post.

The rule of thumb: most specific first, broadest last. When I review a decision table, I don't just check that each row is correct. I check every pair of rows for overlap and ask which one a visitor matching both would see.

Step 5: Configure component variants

After saving the decision table, configure the variant for each rule in Page builder.

  1. Select the rule you want to configure.


  2. Choose how the variant starts:
    • Duplicate original: start from a copy of the original component.
    • Hide component: show nothing for this rule.
    • Swap component: replace it with another compatible component.


  3. Update the content and design for that variant.
  4. Use the preview control to inspect the result.
  5. Repeat for each rule.

Don't forget the original component. It's shown whenever no rule matches, which for a regional campaign is most of your traffic. Review it with the same care as the variants.

Step 6: Save and review the draft

  1. Save and close the decision table.
  2. Review the component's personalization status.
  3. Confirm every rule maps to the intended variant.
  4. Confirm the original component still works as the fallback.
  5. Preview each variant and check content, layout, links, and responsive behavior.

At this point the personalization is a draft. Saving the decision table doesn't make it live for visitors. Part 2 covers publishing and activation.

Common mistakes

Designing rules before checking the data. If the attribute isn't populated, the rule never matches.

Broad rules above specific ones. The broad rule captures visitors first and the specific variant never shows.

Expecting OR within a row. Columns in a row are always AND.

Treating a non-live page version as isolated. Personalization is shared across versions, including live.

Architect's design checklist

Before handing the configuration to testing, confirm:

  1. Inputs are based on data that actually exists.
  2. Multiple inputs are intentionally combined with AND.
  3. Rules are ordered from most specific to broadest.
  4. Overlapping rules have been reviewed in pairs.
  5. The original component is a valid fallback.
  6. Variants preserve accessibility, responsive behavior, and working links.
  7. Page-version implications have been discussed with content owners.
  8. The business owner agrees on the target audience and KPI.

A valid decision table can still produce the wrong experience. Walk through visitors who match several rules and visitors who match none.

Summary

Component personalization lets you vary one component without touching the rest of the page, and it's built on three things: inputs, ordered rules, and variants. Most of the important decisions happen before activation. Pick the right scope, confirm the data exists, order overlapping rules deliberately, and give the original component the same attention as the variants.

In Part 2, we'll take this configuration through testing, publishing, activation, analytics, and the operational controls that keep it maintainable.

Demo

To see these steps in practice, watch my webinar below. It includes a full demo of SitecoreAI personalization.



References

Component personalization