The Context ID environment variable

The Context ID environment variable simplifies setting up and configuring XM Cloud solutions. It's a unified identifier that maps to all your configured resources, such as content, sites, files, forms, and integration settings. You include the Context ID in your development setup, and XM Cloud handles the rest. Context ID also handles potential future system configurations added to the XM Cloud solution, saving you additional configuration to support new features or integrations.

When you create an environment in XM Cloud, two context identifiers are created automatically:

  • Live Context ID - allows access to approved and published content.

  • Preview Context ID - allows access to all content, including drafts and unapproved content.

To simplify application setup, the JavaScript Rendering SDK (JSS) for Next.js includes support for the Context resources through the XM Cloud addon.

Note

Context ID is available only from JSS version 21.6 or later. If you are using an earlier JSS version, to start using Context ID, follow the upgrade guide.

Getting your context identifiers

Context ID environment variables in the XM Cloud Deploy app

You can copy both the live and preview context identifiers from the Deploy app. You can find them:

  • In the Projects tab, in the Environments table of the relevant project. Copy the value you need, Context ID (Preview) or Context ID (Live).

  • In the environment Details tab. Copy the Context ID (Preview) or Context ID (Live) .

Do you have some feedback for us?

If you have suggestions for improving this article,