---
title: "Interactive personalization"
slug: "interactive-personalization"
abstract: "Understand running interactive experiences and experiments in your web app to show personalized content to each site visitor."
---
# Interactive personalization

You can use the Cloud SDK [`personalize`](https://doc.sitecore.com/sdk/en/developers/005/cloud-sdk/cloud-sdk-reference/cloud-sdk-personalize.html "@sitecore-cloudsdk/personalize") package to run interactive personalizations ([interactive experiences](https://doc.sitecore.com/personalize/en/users/sitecore-personalize/en/introduction-to-interactive-experiences.html) and [interactive experiments](https://doc.sitecore.com/personalize/en/users/sitecore-personalize/en/introduction-to-interactive-experiences.html)) that are live in Sitecore Personalize. These personalizations are typically created by developers in Sitecore Personalize and delivered to site visitors via APIs. This type of personalization is used to show offers or operational messages with personalized, dynamic content usually retrieved from back-end systems to site visitors.

Cloud SDK developers can run a live interactive experience or experiment in their web app by using the [`personalize`](https://doc.sitecore.com/sdk/en/developers/005/cloud-sdk/cloud-sdk-reference/cloud-sdk-personalize/cloud-sdk-personalize-browser/functions/cloud-sdk-personalize-browser-personalize.html "personalize") function available in all modules of the [`personalize`](https://doc.sitecore.com/sdk/en/developers/005/cloud-sdk/cloud-sdk-reference/cloud-sdk-personalize.html "@sitecore-cloudsdk/personalize") package.

In the `personalize` package, the [`browser`](https://doc.sitecore.com/sdk/en/developers/005/cloud-sdk/cloud-sdk-reference/cloud-sdk-personalize/cloud-sdk-personalize-browser.html "@sitecore-cloudsdk/personalize/browser") module lets you run personalization from the browser, and the [`server`](https://doc.sitecore.com/sdk/en/developers/005/cloud-sdk/cloud-sdk-reference/cloud-sdk-personalize/cloud-sdk-personalize-server.html "@sitecore-cloudsdk/personalize/server") module lets you do it from the server. When you run the `personalize` function, you have to pass it the [personalize data object](https://doc.sitecore.com/sdk/en/developers/005/cloud-sdk/cloud-sdk-reference/cloud-sdk-personalize/cloud-sdk-personalize-browser/interfaces/cloud-sdk-personalize-personalizedata.html "PersonalizeData"). In this object, you have to provide the friendly ID[^UUID-101b62f6-b640-ed11-1057-29646ebb9fb7_N668cdaabae6a5] of the experience or experiment you want to run, and specify the channel. Optionally, you can specify more event and experiment data.

When you run an interactive personalization, two things happen:

- As part of the network request, a payload is sent to Sitecore. The payload contains the friendly ID of the experience or experiment you want to run, and other required and optional data that you included in the personalize data object. If the URL of the webpage where the `personalize` function runs contains UTM parameters, the payload will also contain the UTM parameters.
- The personalized content is returned as part of the API response. You can use the API response to display content to your site visitor or take other actions, depending on your application requirements.

## Example of interactive experience

In this example, you can display a personalized message to your site visitor depending on when they were first seen on your site.

Consider an interactive experience that is live in Sitecore Personalize. This experience has the friendly ID `interactive_1`, and its API response returns the date the site visitor was first seen on your site:

```typescript
{ "guestWasFirstSeen": "${guest.firstSeen}" }
```

You can run this experience on your site by running the asynchronous `personalize` function, passing in the friendly ID of the experience. The function returns the API response of the experience. You can save the return value into a variable, for example, `personalizeResponse`, then log the value to the console:

```typescript
// ...
import { personalize } from "@sitecore-cloudsdk/personalize/browser";
// ...

const personalizeResponse = await personalize({
  channel: "WEB",
  friendlyId: "interactive_1"
});

console.log("This experience is now running:", personalizeResponse);
```

The following is logged to the console:

```text
This experience is now running: {guestWasFirstSeen: "2026-01-06T11:`45:45`.798Z"}
```

> [!note]
> If the API response is `{"message":"No flow executed"}`, make sure to start the experience or experiment so it's live in Sitecore Personalize.

[^UUID-101b62f6-b640-ed11-1057-29646ebb9fb7_N668cdaabae6a5]: A [unique identifier](https://doc.sitecore.com/personalize/en/users/sitecore-personalize/en/manage-experiment-details.html) that Sitecore Personalize assigns to every experience and experiment. Cloud SDK developers use the friendly ID to run a specific interactive experience or interactive experiment.
