Contact Us

January 10, 2024

May 13, 2026 2:49 pm

Configuring Agentforce to Retrieve Results from a Data Cloud Search Index

Share with

Understanding the Issue

The community member had already taken several steps to resolve the issue, including creating a service agent template, trying out-of-the-box actions like search and answerwithknowledge, and verifying that the search index was in a ready status. However, the agent was still not retrieving results.

Further investigation revealed that the issue was not with the search index itself, but rather with the connection between the Agent and the search index. The community member had created the search index first and then tried to wire it up to the Agent, but this approach was not working as expected.

The root cause of the issue was that the Agentforce Data Library was not properly configured to connect to the search index, and a Prompt Template was not set up to facilitate this connection.

Setting up a Prompt Template

To resolve the issue, you need to set up a Prompt Template to connect the Agent to the Search Index. This involves creating a new Prompt Template and pointing it to the retriever to connect the Agent and the Search Index.

Once you have created the Prompt Template, you need to write an action to access the template within the instruction block. This will allow the Agent to reliably retrieve data from the Search Index.

Configuring the Agentforce Data Library

In addition to setting up a Prompt Template, you also need to ensure that the Agentforce Data Library is properly configured to connect to the Search Index. This involves verifying that the Data Library is set up to look at the correct data source and that the necessary permissions are in place.

Agentforce Data Library Configuration

// Example code snippet for configuring the Agentforce Data Library
// Verify that the Data Library is set up to look at the correct data source
// and that the necessary permissions are in place
var dataLibrary = DataLibrary.get('MyDataLibrary');
var searchIndex = dataLibrary.getSearchIndex();
// Configure the search index and data library settings as needed

Heads up: Make sure to test your Prompt Template and Agentforce Data Library configuration thoroughly to ensure that the Agent is retrieving results as expected.

Checklist for Resolving the Issue

Steps to Resolve the Issue

  • Verify that the search index is in a ready status
  • Set up a Prompt Template to connect the Agent to the Search Index
  • Configure the Agentforce Data Library to look at the correct data source
  • Verify that the necessary permissions are in place
  • Test the Prompt Template and Agentforce Data Library configuration thoroughly

Frequently Asked Questions

What is a Prompt Template and how does it work?

A Prompt Template is a pre-configured template that connects the Agent to a Search Index or other data source. It provides instructions on when and how to utilize the data source.

Do I need to purchase a Knowledge license to use Agentforce?

No, you do not need to purchase a Knowledge license to use Agentforce. However, you will need to configure the Agentforce Data Library to look at the correct data source and set up a Prompt Template to connect the Agent to the Search Index.

How do I troubleshoot issues with my Agentforce configuration?

To troubleshoot issues with your Agentforce configuration, start by verifying that the search index is in a ready status and that the Agentforce Data Library is properly configured. Then, test the Prompt Template and Agentforce Data Library configuration thoroughly to ensure that the Agent is retrieving results as expected.

Can I use Agentforce with a simple data library approach?

Yes, you can use Agentforce with a simple data library approach. However, you will need to ensure that the Agentforce Data Library is properly configured to connect to the data source and that a Prompt Template is set up to facilitate this connection.

Genetrix Technology · Salesforce Marketing Cloud Partner

Need help shipping this in production?

Genetrix builds and untangles Salesforce Marketing Cloud and Agentforce setups for teams that want it done right the first time. If anything in this post sounds familiar, talk to us before it ships.

Get in Touch with Genetrix →

Blogs for the

Business-Savvy!​

Let’s Connect

A 30 min no cost strategy session
with cloud support expert

Let’s Connect

A 30 min no cost strategy session
with cloud support expert