Preparing for development with the Cloud SDK
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 XM Cloud, based on the XM Cloud foundation template.
-
JSS version 21.6.0 or later.
-
An XM Cloud license.
-
Optionally, for additional capabilities:
-
A Sitecore Personalize license.
-
Checking compatibility
To use the Cloud SDK, you need a JSS Next.js app hosted on XM Cloud. 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 XM Cloud project must be created from the XM Cloud foundation templateXM Cloud foundation template running JSS version 21.6.0 or later and be deployed on XM Cloud. The Cloud SDK is only compatible with JSS version 21.6.0 and later.
Checking licenses
To use the Cloud SDK, you need an XM Cloud 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.
Preparing your development environment
The XM Cloud foundation template includes an XM Cloud 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.
First, as part of getting started with front-end development in XM Cloud, 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.