Skip to content

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

  1. Using the App Launcher, open the Agentforce Studio app.
  2. Open the Pronto Service Agent.
  3. In the explorer, click the + icon next to Subagents, then click + New Subagent.
  4. Enter the following values:
FieldValue
Subagent NameSupport Policies & Terms
DescriptionAnswer policy/terms questions using retrieved chunks from Pronto PDFs.
  1. Click Create and Open.

Step 2: Create the Prompt Template action (inside Agentforce Builder)

  1. In Agentforce Builder go to Support Policies & Terms in the explorer.
  2. Click on the + sign besides Actions, and select + New Action.
  3. Set the following values:
FieldValue
Action NameAnswer Pronto Support Questions
DescriptionAnswers customer support questions using Pronto policies, FAQs, and terms (grounded with RAG).
Reference Action TypePrompt Template
Reference ActionAnswer Pronto Support Questions
  1. Click Create and Open.
  2. Switch to Canvas mode, scroll down to Inputs and Outputs and enter the following information:
FieldValue
Inputs - Question DescriptionThis 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.
InputsSelect checkbox Require Input to execute action
Outputs - Prompt ResponseSelect checkbox Show in conversation
  1. Click Save.

Step 3: Add the action to the subagent and route to it

  1. In the explorer, click the Support Policies & Terms subagent.
  2. 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.
  1. Click Save.

Step 4: Try it out

  1. Click Preview.
  2. Enter the following prompt:
My delivery was 45 minutes late. What is Pronto’s refund policy?
  1. Confirm the agent uses your Answer Pronto Support Questions action.
  2. Try a second prompt:
Do Pronto gift certificates expire or have restrictions?
  1. Confirm the agent again selects the unstructured-data action and answers using retrieved content.

This concludes Exercise 4.

Released under the MIT License.