Appearance
Exercise 5 (Optional): Extend with Prompt Template Actions
This exercise goes beyond the core Merchant Account Manager build. In Exercise 2 you used the Summarize Record standard action for narrative summaries, which covers most needs. This optional exercise shows how to swap in a purpose-built prompt template when you want tighter control over tone, structure, and the exact data merged into a summary. You'll connect the Generate Storefront Review Summary template built in the Prompt Builder section to the Review & Sentiment Analysis topic.
Step 1: Confirm the prompt template exists
TIP
This assumes you completed the Prompt Builder section, or that the Generate Storefront Review Summary template exists in your org. If not, build it first in Prompt Builder.
In Setup, search for Prompt Builder and open the Generate Storefront Review Summary template.
Review its inputs (the storefront and related reviews it expects) and the review summary it produces.
Step 2: Create the prompt template action
In Agentforce Builder, select the Review & Sentiment Analysis subagent.
Click the plus icon besides Actions and select Create an action.
Set the following values:
Field Value Name Summarize Storefront ReviewsDescription Generates a structured, on-brand review health snapshot for a storefront using the Generate Storefront Review Summary prompt template.Reference Action Type Prompt TemplateReference Action Generate Storefront Review SummaryClick Create and Open, then click Save.
Step 3: Configure inputs and outputs
A prompt template action exposes the template's record input plus a couple of standard parameters. Update the fields as follows.
Configure the Inputs:
Input Type Configuration RelatedEntity Object Set the Description to: Storefront for which the review summary should be generated. Must be a valid JSON representing the storefront info, chained from having executed the Identify Record by Name or Query Records action.Select checkboxRequire Input to execute actionConfigure the Outputs:
Output Type Configuration Prompt Response String Select checkbox Show in conversationClick Save.
Step 4: Preview
Click Preview and test:
txtGive me a review health snapshot for The Savory Spot.Compare the output to the generic Summarize Record result from Exercise 2; the template version should be more consistent and structured.
Summary
- Connected a prompt template to the agent as a custom action.
- Saw how a purpose-built template gives tighter control than the generic Summarize Record standard action.
- Reused the Generate Storefront Review Summary template from the Prompt Builder section.
Next (optional), you'll ground the agent in unstructured documents with RAG.