Skip to main content
Users
CloudPortalLogin
  • Powered byPowered by
Introduction to Sitecore CDP
Data availability
Managing your account
Managing system settings
Managing guests
Batch segmentation
Data browser
Audience export
Dashboards
Developer center
AI in CDP
Glossary
  • Sitecore CDP
  • Developer center
  • Session traits
  • Manage session traits

Manage session traits

This topic provides information on how to search, edit, pause, deactivate, duplicate, and delete a session trait, copy its ID, and copy its code to a new session trait.

Only team members with a Developer or Admin role in Sitecore Cloud Portal can manage session traits.

Search for a session trait

You can easily search for a session trait by selecting its type, searching by name or identifier, or using filters.

To search for a session trait:

  1. In the navigation pane, click Developer center > Session traits.

  2. On the Session Traits page, search for a session trait by its name, identifier, or content.

  3. Optionally, apply these filters to locate a session trait:

    • Tags - filter by one or more tags.

    • Status - filter on whether the session trait is activated, paused, or has a status of Draft.

    • Last Updated By - filter by the user who last updated the session trait. To sort the session traits list according to first or last updated, click Arrow on the column heading.

Copy code from a session trait

You can copy the JavaScript code of a session trait from the code editor and paste it into a new session trait.

To copy code from a session trait:

  1. From the Session Traits page, open the session trait from which you want to copy code.

  2. Click Copy Copy icon and paste the JavaScript code into the code editor of a new session trait.

Copy the friendly ID of a session trait

When you create a session trait, Sitecore CDP automatically creates a unique ID for it. You can easily copy this friendlyId from the Details pane.

To copy the friendly ID:

  1. From the Session Traits page, open the session trait you want to view.

  2. In the Details pane, click Copy icon to copy the Friendly ID of the session trait.

    Note

    You can use this ID to reference the session trait and access its value within Sitecore CDP.

Edit a session trait

You can continue editing a session trait while it is in Draft or Paused status.

To edit a session trait:

  1. From the Session Traits page, open the session trait you want to edit.

  2. Click Edit The edit icon.

  3. Make the necessary changes to the code and click Save.

Pause a session trait

You can pause an Active session trait to temporarily stop it from running at the end of each customer's session and storing any new data. Previous values calculated for the paused session trait will remain intact in the respective guest profiles.

To pause a session trait:

  1. From the Session Traits page, open the session trait you want to pause.

  2. Click Pause.

  3. In the confirmation dialog, click Pause.

Deactivate a session trait

You can deactivate a Paused session trait to delete all data associated with it for customer sessions that end after the session trait has been deactivated.

To deactivate a session trait:

  1. From the Session Traits page, open the session trait you want to deactivate.

  2. Click Horizontal ellipsis > Deactivate.

  3. In the confirmation dialog, click Deactivate.

Duplicate a session trait

You can duplicate a session trait in any status to copy its code, description, and tags into a new session trait.

To duplicate a session trait:

  1. From the Session Traits page, open the session trait you want to duplicate.

  2. Click Duplicate.

  3. Rename the duplicated session trait and click Create.

Delete a session trait

You can only delete a session trait if it is in Draft or Inactive status. Before proceeding, check all references to the session trait within Sitecore CDP to prevent data corruption.

Important

When you delete a session trait, it is removed from the Session Traits page. The session trait is also removed from the customer's guest profile after their next session ends. This action deletes the session trait object along with its friendlyId, name, value, and other attributes.

This action is permanent, and the session trait cannot be recovered.

To delete a session trait:

  1. From the Session Traits page, open the session trait you want to delete.

  2. Click Horizontal ellipsis > Delete.

  3. In the confirmation dialog, click Delete.

Do you have some feedback for us?

If you have suggestions for improving this article,

Privacy policySitecore Trust CenterCopyright © 1999-2026 Sitecore