
To use AgentForce in Salesforce, you enable Einstein and AgentForce in Setup, build a flow that retrieves the data your agent needs, then create an agent with topics and actions in Agent Builder and test it in the Conversation Preview. AgentForce is Salesforce's AI-driven feature for automating customer support and service interactions, built on Einstein AI. This guide walks through each step in order.
Step 1: Creating an AgentForce Org
To work with AgentForce, you need a specific Salesforce org. Follow these steps to create one:
1. Visit this Trailhead link and sign in.
2. Click on Launch to create and open the Salesforce org.
3. Once your org is ready, proceed to the next steps.
Step 2: Enabling AgentForce
Before configuring AgentForce, you must enable it in your Salesforce org:
1. Click the Setup icon and select Setup.
2. In the Quick Find box, search for Einstein Setup and select it.
3. Click the Turn on Einstein toggle and ensure Einstein is enabled.

4. Refresh your browser.
5. In the Quick Find box, search for Agents and select it.
6. On the Agents page, enable AgentForce by toggling it on.

Step 3: Creating a Flow to Get and Pass Data to the Agent
Flows help automate processes for AgentForce. To create a flow:
1. Navigate to Setup > Flow.
2. Click New Flow.
3. Select Autolaunched Flow and click Create.
4. Create input text type variable.
5. Drag a Get Records element to retrieve data from the Case object.

6. Drag an Assignment element to store data in a collection variable.

7. Connect the elements and click Save.
Free newsletter
Get Salesforce insights delivered weekly
Join 500+ Salesforce professionals and stay ahead of the curve.
No spam. Unsubscribe any time.
8. Click Activate.
Step 4: Creating an Agent, Topics, and Actions
To configure an AgentForce AI-powered agent:
1. Create an Agent:
Go to Setup > Agents.
Click + New Agent.
Select Agentforce Service Agent as the type.
Then click on Next.
Remove all the added topics.
Then click on Next.
Fill in all the details.
Then click on Next.
Then click on Create.
2. Create Topics:
From the Agent Builder, click New and select New Topic.
Enter the name.
Then click on Next.
Fill in all the details.
Leave it all, then click on Next.
Click Finish.
3. Create Actions for the Topic:
Click on the topic that you created.
Click the This Topic’s Actions tab.
Click New and select Create New Action.
Select Flow as the Reference Action Type.
For Reference Action, select your flow name.
Leave the other options as is, and click Next.
Fill in all the details.
Click Finish.
4. Click Activate.
5. Test the Agent:
While still in the Agent Builder, click Refresh (circular arrow) in the top right corner of the Conversation Preview.
Go ahead and enter this prompt: Provide details about all high-priority cases.
Press your Enter key.
Conclusion
AgentForce in Salesforce enables AI-powered automation for better customer service. By setting up an org, enabling AgentForce, creating a test object, building a flow, and configuring an AI agent, you can optimize service interactions efficiently. Try out these steps and start leveraging AgentForce in your Salesforce environment!
Frequently Asked Questions
Do I need a special Salesforce org to work with AgentForce?
Yes. The walkthrough uses a dedicated org created through the Trailhead quick start project: sign in on the Trailhead project page, click Launch, and Salesforce provisions the org for you.
What has to be enabled before configuring AgentForce?
Two things in Setup: turn on the Einstein toggle in Einstein Setup (then refresh your browser), and toggle AgentForce on from the Agents page.
How do flows connect to an AgentForce agent?
You build an autolaunched flow with an input text variable, a Get Records element that retrieves data from the Case object, and an Assignment element that stores the results in a collection variable. That flow is then wired to a topic as an action with Flow as the Reference Action Type.
How do I test the agent after activating it?
In Agent Builder, click the Refresh icon in the Conversation Preview, then enter a prompt such as "Provide details about all high-priority cases" and press Enter.
Related Articles
Ready to implement? Learn more about our Agentforce Implementation Services.