Preparing for development with the Cloud SDK

Version:

Before you can use the Cloud SDK, make sure that you have a compatible app and the required licenses, and that you prepare your development environment.

Check that you have the following, before getting started:

  • A JSS Next.js app hosted on SitecoreAI, based on the XM Cloud foundation template.

  • JSS version 21.6.0 or later.

  • A SitecoreAI license.

  • Optionally, for additional capabilities:

    • A Sitecore Personalize license.

XM Cloud is now SitecoreAI

Some code examples, images, and UI labels may still use XM Cloud while engineering assets are being updated.

Checking compatibility

To use the Cloud SDK, you need a JSS Next.js app hosted on SitecoreAI. If you have a different technology stack, you cannot use the Cloud SDK. Instead, use the Engage SDK to implement tracking, analytics, and personalization in your app.

Your SitecoreAI project must be created from the XM Cloud foundation template running JSS version 21.6.0 or later and be deployed on SitecoreAI. The Cloud SDK is only compatible with JSS version 21.6.0 and later.

XM Cloud is now SitecoreAI

Some code examples, images, and UI labels may still use XM Cloud while engineering assets are being updated.

Checking licenses

To use the Cloud SDK, you need a SitecoreAI license. You'll also need additional licenses to use certain Cloud SDK packages:

  • The events package does not require a Sitecore CDP license, but having a Sitecore CDP license will let your organization access more detailed tracking and analytics data.

  • The personalize package requires a Sitecore Personalize license to run Sitecore Personalize personalizations. However, the personalization Cloud SDK capabilities that run automatically in JSS Next.js apps do not require such a license.

Prepare your development environment

The XM Cloud foundation template includes a SitecoreAI instance and a JSS Next.js app including the JSS XM Cloud add-on. This add-on contains the Cloud SDK and is preconfigured with certain Cloud SDK capabilities that run automatically in JSS Next.js apps, with no coding required.

XM Cloud is now SitecoreAI

Some code examples, images, and UI labels may still use XM Cloud while engineering assets are being updated.

First, as part of getting started with front-end development in SitecoreAI, set up your local development environment. This involves setting environment variables in the sxastarter rendering app, for example, your Context ID and the name of the site, which are required for the Cloud SDK to work.

After setting up your local development environment, you can start using the Cloud SDK. All your development work with the Cloud SDK will take place in the sxastarter rendering app inside the JSS Next.js app.

If you have suggestions for improving this article, let us know!