Appearance
Exercise 3: Power Agents with Unstructured Data
In this exercise, you’ll add unstructured-data grounding to the Pronto Service Agent you built in Agentforce Builder.
You’ll add a subagent and a Prompt Template action so the agent can answer policy/terms questions using retrieved content from your Pronto PDFs.
TIP
Prerequisite: Complete the Agentforce Builder workshop first and make sure your agent already exists (for example, the Pronto Service Agent).
Step 1: Create a subagent for policy and terms questions
Using the App Launcher, open the Agentforce Studio app.
Open the Pronto Service Agent.
In the explorer, click Subagents, then click New Subagent.
Enter the following values:
Field Value Subagent Name Support Policies & TermsDescription Answer policy/terms questions using retrieved chunks from Pronto PDFs.Click Save.
Step 2: Create the Prompt Template action (inside Agentforce Builder)
Next, create an action inside Agentforce Builder that runs your prompt template.
In Agentforce Builder go to Support Policies & Terms in the explorer.
Click on the + sign besides Actions, and select Create new action.
Set the following values:
Field Value Name Answer Pronto Support QuestionsDescription Answers customer support questions using Pronto policies, FAQs, and terms (grounded with RAG).Click Create and Open.
Enter the following information:
Field Value Reference Action Type Prompt TemplateReference Action Answer Pronto Support QuestionsInputs - Question Select checkbox Require Input to execute actionOutputs - Prompt Response Select checkbox Show in conversationClick Save.
(Optional) For the Question input, enter the following Instructions:
txtThis is open-ended text input from a user in a chat, related to Pronto support policies, delivery/order lifecycle, refunds, promotions, memberships, or gift certificates.Click Save.
Step 3: Add the action to the subagent and route to it
Next, attach the action to the subagent canvas and ensure the Agent Router can route to it.
In the explorer, open the Support Policies & Terms subagent.
Click on the arrow besides Select action, and select Answer Pronto Support Questions.
Click Save.
In the subagent instructions, add (or replace with) the following:
txtUse the Answer Pronto Support Questions action whenever the user asks about: - refunds or refund eligibility - delivery issues (late/missing orders) - promotions, memberships, or gift certificates - general support policies or terms If the user question is unclear, ask one clarifying question, then use the action.Click Save.
In the explorer, open Agent Router.
Add a transition so policy/terms questions route to your new subagent:
- Add a transition to Support Policies & Terms
- Ensure the Agent Router instructions include guidance to route policy/terms questions to that subagent
Click Save.
Step 4: Try it out
Click Preview.
Enter the following prompt:
txtMy delivery was 45 minutes late. What is Pronto’s refund policy?Confirm the agent uses your Answer Pronto Support Questions action.
Try a second prompt:
txtDo Pronto gift certificates expire or have restrictions?Confirm the agent again selects the unstructured-data action and answers using retrieved content.
Summary
In this exercise, you added a Prompt Template action to the Pronto Service Agent and routed policy/terms questions to a dedicated subagent so the agent can respond using retrieved content from your Pronto PDFs.