Scratch Org Access

This guide describes the basic steps for creating a generative AI scratch org for a Developer or Enterprise edition org.

A scratch org is a dedicated, configurable, and short-term Salesforce environment that you can quickly spin up when starting a new project, a new feature branch, or a feature test. Scratch orgs are configured using a scratch org definition file, which lists the features and settings that mirror the customer's production org. See Scratch Orgs in the Salesforce DX Developer Guide for detailed information.

  1. Ensure that the CLI is up to date.

  2. Select and enable your Dev Hub org, which must have your Data Cloud licenses. See Select and Enable a Dev Hub Org in the Salesforce DX Developer Guide for more information.

  3. Log in to your Dev Hub org and allow access. In the browser window that opens, sign in to your org with your Salesforce login credentials. Click Allow, which allows Salesforce CLI to access to your org.

  4. Create a definition file in config/project-scratch-def.json. To use an Einstein Generative AI scratch org, add the Einstein1AIPlatform feature and turn on the einsteinGptSettings.enableEinsteinGptPlatform setting. This feature is supported in Developer and Enterprise editions.

  5. Using the scratch org definition file, create the scratch org.

  6. Open the org.

After you open the org, you can use Salesforce generative AI features such as Agentforce, Prompt Builder, Model Builder, and the Models API. To learn more, see About Einstein Generative AI in Salesforce Help.