Create a Custom Retriever in Salesforce Agentforce

A support team often keeps several PDFs in one Agentforce Data Library: a product guide, an internal policy document, and a troubleshooting handbook. That setup works well at first, until a prompt needs answers from only one document.

I ran into this exact requirement while setting up an Agentforce assistant for a Service Cloud team. The team wanted the assistant to answer policy questions only from its approved “Support Escalation Policy” PDF, not from every document in the library.

A custom retriever solves that problem by searching a selected Data Cloud search index and returning only the content you choose.

In this tutorial, I will show you how to create a custom retriever in Salesforce Agentforce