How to Use AgentForce in Salesforce

April 15, 2025

How to Use AgentForce in Salesforce

April 15, 2025

hackathon image

Introduction Salesforce AgentForce is a powerful AI-driven feature that allows businesses to automate customer support and service interactions efficiently. It leverages Einstein AI to provide smart recommendations, process automation, and seamless integrations.

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.

hackathon image

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.

hackathon image

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.

hackathon image

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

hackathon image

7. Connect the elements and click Save.

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!

Free Consultation