Create Agentforce-Enabled Scratch Orgs From Salesforce Developer Edition : Bijay Kumar
by: Bijay Kumar
blow post content copied from SalesForce FAQs
click here to view original post
### Summary of the Content This content explains how to create Agentforce-enabled scratch orgs in Salesforce using a Developer Edition account, especially after the Spring '25 release. A scratch org is a temporary Salesforce environment used for development and testing, allowing users to experiment with new features without affecting their main Salesforce organization. #### Key Details: - **Scratch Org**: A temporary Salesforce environment for development and testing, available for a maximum of 30 days. - **Agentforce**: A feature that can be enabled in scratch orgs to enhance functionality. - **Requirements**: Users need Salesforce CLI installed and authorization to a Dev Hub. - **Creation Steps**: 1. Install Salesforce CLI and authorize your Dev Hub. 2. Create a scratch org definition file with specific features and settings. 3. Use VS Code or another IDE to create and manage scratch orgs. 4. Enable Agentforce in the scratch org through settings. #### Additional Context: - Scratch orgs allow developers to test and develop features independently, which is particularly useful in agile development environments. - The content emphasizes the importance of managing active scratch orgs, as Developer Edition accounts are limited to three active scratch orgs at a time. - The tutorial provides a practical guide for users to enable and activate Agentforce, which can enhance the Salesforce CRM experience by allowing users to interact with agents using natural language. ### Conclusion The tutorial serves as a comprehensive guide for Salesforce users looking to leverage scratch orgs for development and testing, particularly focusing on enabling Agentforce features. ### Relevant Hashtags for SEO #Salesforce #ScratchOrg #Agentforce #SalesforceDevelopment #SalesforceCLI #SalesforceTutorial #SalesforceDX #EinsteinGPT #SalesforceDeveloper #CRM #TechTutorial #CloudComputing
We can enable and create Agentforce org using our trailhead account, and as our agent expired, we had to create another org using the trailhead account. But now, with the spring 25 release, we can create agent org using our normal Salesforce developer org by creating scratch orgs.
In this tutorial, we will learn about scratch org in Salesforce and how to create Agentforce-enabled scratch orgs from Salesforce Developer Edition. So, with the scratch orgs, it will be very helpful to use an agent-enabled org in Salesforce.
Scratch Org in Salesforce
A Scratch Org in Salesforce is a temporary Salesforce environment used for development and testing. It is a new playground where we can test new features, write code, or configure settings before deploying changes to production without affecting our main Salesforce org. It is mainly used in Salesforce DX (Developer Experience).
It will be available for a limited time (maximum 30 days), and we can create multiple scratch orgs, test different things, and then delete them when we’re done.
The scratch org can be created using the production org as well as the developer org. So if we have a normal developer org, we can create a scratch org from that, and in that scratch org, we can specify the feature that will ensure the agent force is enabled in our org.
Create Agentforce-Enabled Scratch Orgs From Salesforce Developer Edition
In the steps below, I will explain the prerequisites and how to create Agentforce-enabled scratch orgs from the Salesforce developer edition.
To understand the prerequisites you can visit the Agentforce Developer Guide there, we have details on what we need to create scratch org in Salesforce.
Firstly, we need a CLI, so make sure that you have Salesforce CLI installed and that you have authorization to the dev hub in your system. I will explain all of this in the steps below.
Scratch or Definition File
After that, below, I have given the most important file, the scratch or definition file, and here you will see that it has Einstein’s one API platform feature added. So with this feature the scratch or that we are going to create will have Agentforce enabled.
Also, we have an Einstein GPT setting, so here we are enabling the Einstein GPT Platform. This is the same step that we used to take from the Einsetin Setup, where we used to turn on the Einstein Copilot.
{
"orgName": "Agentforce scratch org",
"edition": "Developer",
"features": ["EnableSetPasswordInApi","Einstein1AIPlatform"],
"settings": {
"lightningExperienceSettings": {
"enableS1DesktopEnabled": true
},
"mobileSettings": {
"enableS1EncryptedStoragePref2": false
},
"einsteinGptSettings" : {
"enableEinsteinGptPlatform" : true
}
}
}
Now open the IDE you have. I have installed the VS code. So if you create a SFDX project you will have this config folder within that folder you will have the project scratch definition dot JSON file. Now you need to copy the above scratch or definition file and paste it in the scratch definition JSON file which is inside the Config.

Make sure that the org that you are authorizing does have dev hub enabled. So the org that I’m trying to authorize right now does have dev hub enabled. Thats why I will be able to authorize to that org.
Click the Enable Dev Hub toggle button and slide right to enable Dev Hub.

After that to create the scratch org we also need to authorize to a dev hub. For that open the command pallete and choose SFDX: Authorize a Dev Hub. Then provide any alias and press Enter key.
After that, it will redirect to the Salesforce org login page.

Here, you need to enter credentials of your regular Salesforce developer org edition, or you will get a confirmation screen asking if you want to allow Salesforce Org to connect to the VS code. There, you need to click the Allow button.

After that, you will be connected to the Salesforce org using the VS code and receive a Authentication Successful message. Also this is not any trailhead module, but a normal Salesforce developer.

We already enabled the dev hub in this org, which is why we were able to use it as a dev hub. Another point is that for a developer org like this, which is a normal Salesforce developer org, we can only have three active scratch orgs.
So, make sure that your developer org does not have more than three active scratch orgs. To check the active scratch orgs, search for Scratch Orgs in the App Launcher.
We have higher limits in the Production Org, but with the developer, we can only have three active scratch orgs.

We don’t have any active scratch orgs, so we can create almost three active scratch orgs in this developer account.
If you already have three scratch orgs and want to create another one, you must first delete any one org from active orgs.

Create Scratch Org From Salesforce Developer Edition
Navigate to the VS code or IDE you are using, open the command palette (Ctrl+Shift+P), search for Scratch Org, and select SFDX: Create a Default Scratch Org. After that, select the file location and provide an alias.

After that, provide how many days we want to use Scratch org. Here, I provided 30 days, and if you want to delete it before expiry, you can.

Now, as you navigate to the active scratch org again, you will see that one scratch org has been created.

How to Open a Scratch Org
To open it in VS code, just run the command open default org because that scratch org is currently set as our default org. In the image below, you can see in the URL we have scratch org mentioned.
The very important thing is that this scratch.org does have Agentforce enabled.

Enable Agentforce in Scratch Org in Salesforce
In the Quick Find search for the Einstein Setup, since we had already made that setting true, you will see that it is already enabled here. This is because in the scratch definition file, we declared EinsteinGPTPlatform: true.

After that, again, in the Quick Find search for Agents. Then, turn on the Agentforce toggle button. As you enable Agentforce, you will see the Agentforce (Default) in the Agent Name and that Type in Employee, which means this one will be available for internal Salesforce employees.
Also, in this org, we can see we have permission to create multiple agents by clicking on the New Agent button.
Now, open the Agentforce (Default) to customize and add to the Salesforce CRM for internal employees.

Here, you can see the details of an Agentforce agent. Currently, this agent is not activated. Click the Open in Builder button to customize and Activate the agent. As you open it in the Builder, you will see the Topics, Instructions, and standard Actions of this agent.

Now, to use this agent in Salesforce CRM, we need to activate it by clicking on the Active button.

After activating the Agentforce agent, navigate to any app, object, or anywhere in Salesforce UI, and you will see the Agentforce icon. Here, I have opened the Sales application.
Now, if you have any queries or want to retrieve data from Salesforce, you just need to click on the Agentforce icon and ask questions in natural language.
In the image below, you can see that I asked about opportunity records, and the agent displayed the answer in that chat.

In this way, we can enable and activate the Agentforce or Einstein copilot in Salesforce Scratch org that we created from the Developer edition.
Conclusion
I hope you have got an idea about I Scratch Org in Salesforce and how to create Agentforce-enabled scratch orgs from Salesforce Developer Edition.
In that,, I have explained how to create and enable scratch org from developer edition org and how to enable Agentforce in scratch org. So, with the scratch orgs, it will be very helpful to use an agent-enabled org in Salesforce.
You may like to read:
- Create and Deploy Agentforce For Service in Salesforce
- Create Custom Action Using Flow For Agentforce in Salesforce
- Building Blocks of Agents in Salesforce [Topic, Instructions, Actions]
The post Create Agentforce-Enabled Scratch Orgs From Salesforce Developer Edition appeared first on SalesForce FAQs.
March 25, 2025 at 07:23PM
Click here for more details...
=============================
The original post is available in SalesForce FAQs by Bijay Kumar
this post has been published as it is through automation. Automation script brings all the top bloggers post under a single umbrella.
The purpose of this blog, Follow the top Salesforce bloggers and collect all blogs in a single place through automation.
============================

Post a Comment