Appearance
Exercise 4 - 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 the + icon next to Subagents, then click + New Subagent.
- Enter the following values:
| Field | Value |
|---|---|
| Subagent Name | Support Policies & Terms |
| Description | Answer policy/terms questions using retrieved chunks from Pronto PDFs. |
- Click Create and Open.
Step 2: Create the Prompt Template action (inside Agentforce Builder)
- In Agentforce Builder go to Support Policies & Terms in the explorer.
- Click on the + sign besides Actions, and select + New Action.
- Set the following values:
| Field | Value |
|---|---|
| Action Name | Answer Pronto Support Questions |
| Description | Answers customer support questions using Pronto policies, FAQs, and terms (grounded with RAG). |
| Reference Action Type | Prompt Template |
| Reference Action | Answer Pronto Support Questions |
- Click Create and Open.
- Switch to Canvas mode, scroll down to Inputs and Outputs and enter the following information:
| Field | Value |
|---|---|
| Inputs - Question Description | This 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. |
| Inputs | Select checkbox Require Input to execute action |
| Outputs - Prompt Response | Select checkbox Show in conversation |
- Click Save.
Step 3: Add the action to the subagent and route to it
- In the explorer, click the Support Policies & Terms subagent.
- In the subagent instructions, add (or replace with) the following:
Use the Answer Pronto Support Questions action whenever the user asks about:
1. refunds or refund eligibility
2. delivery issues (late/missing orders)
3. promotions, memberships, or gift certificates
4. general support policies or terms
If the user question is unclear, ask one clarifying question, then use the action.- Click Save.
Step 4: Try it out
- Click Preview.
- Enter the following prompt:
My 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:
Do Pronto gift certificates expire or have restrictions?- Confirm the agent again selects the unstructured-data action and answers using retrieved content.
This concludes Exercise 4.
