Switching SitecoreAI environments for testing purposes
During development, you might need to switch between different SitecoreAI environments. For example, you might test your app in your organization's non-production environment before deploying a change to production. Or you might have a demo environment to occasionally switch to.
To switch SitecoreAI environments during development:
-
In the Sitecore Cloud Portal, find and copy the Context ID for the environment you want to switch to.
-
In your application code, update the Context ID value with the value you copied in the previous step. This value is typically stored in your environment variables file.
-
In your web browser, navigate to the app you're developing, typically at
http://localhost:3000, and then delete thesc_cidandsc_cid_personalizecookies. -
Restart your development server, and then navigate to the app you're developing again.
Your app now sets new values for the
sc_cidandsc_cid_personalizecookies, linked to the new Context ID you added to your application code in a previous step. This means that you've successfully switched SitecoreAI environments in your development environment.