Account Research Panel
Agentforce does the answering
This project composes an agent you already have with live record data. It does not create the agent and it is not a substitute for Agentforce setup. Bring an agent that is already activated in your org, and this page shows you what to build around it.
Before you start
This use case has configuration prerequisites, including an active Agentforce agent. Make sure you review the Set up section of this page before building!
Learning focus points
Composing an Agentforce agent with live Salesforce data in a single panel
Using an interaction on the agent's response to refresh what is on screen
Building query-based Metric tiles that aggregate records without code
Objective
Give a rep everything they need about an account in the thirty seconds before the call.
A rep opens an Account record just before dialling. The information they need is real, but it is scattered: pipeline is in one related list, renewals in a report, open cases in another tab. So they either call unprepared, or they keep the customer waiting while they look around.
An agent alone does not fix this. Ask a chatbot "how are we doing on renewals" and you get a paragraph. Paragraphs are hard to scan, and a number buried in prose is a number nobody trusts.
Solution
Put the two side by side. The agent answers the question in words, and the same numbers it is talking about sit next to it as tiles, refreshed the moment the answer arrives.
Everything here is built with Avonni Dynamic Components and no code.
How It Works (User Perspective)
The rep opens the Account record page.
The panel is already showing the account's current numbers: open pipeline, renewal rate, open cases, last touch.
The rep asks the agent a question in plain language, for example "how are we doing on renewals".
The agent answers in the chat.
As the answer lands, the tiles beside it re-query and update, so the words and the numbers always agree.

What we'll create
1 Avonni Dynamic Component holding the whole panel
1 Agent Chat bound to an existing Agentforce agent
4 Metric tiles, each aggregating live records with a query
1 Chart of the account's activity trend
1 interaction that refreshes those queries every time the agent replies
Set up
Prerequisites
An activated Agentforce agent
Agentforce must be enabled in your org, with at least one agent activated.
Note the agent's API name. You will paste it into the component, and it is the one value that cannot be guessed.
Give the agent access to the objects you intend to ask about, otherwise it will answer politely and tell you nothing.
Sample data on the Account
A handful of Opportunities and Cases related to the Account you will test on. Empty related lists produce empty tiles, which makes the panel look broken when it is merely honest.
Build the panel
Point it at your agent
Select the Agent Chat and open its Properties tab. Set:
Agent API Name: the API name of your activated agent.
No Results Title: what the panel invites the rep to do, for example
Ask about this account.No Results Message: the subtitle, for example
Pipeline, renewals, open cases and recent activity.Chat Input placeholder: a real question, for example
How are we doing on renewals?. A placeholder that shows a good question teaches faster than help text.

Add the metric tiles
In the right column, add a second Columns Container set to wrap onto multiple rows, then add one Metric per number you want.
For each tile, set the value to Query rather than a static number, and configure the aggregate:
Open pipeline
OpenPipeline
Opportunity
SUM
Amount
Renewal rate
RenewalRate
Opportunity
AVG
your renewal field
Open cases
OpenCases
Case
COUNT
Id
Last touch
LastTouch
Task
MAX
ActivityDate
Give each tile the API name in that table. Those are the names the refresh step picks from, so naming them now saves going back.
Filter each query to the current record with a filter expression on AccountId, and add the ones that make the number mean what its label says, for example IsClosed = false on open pipeline.
Add the activity chart
Below the tiles, add a Chart. Set the chart type to line, then map the query:
Grouping:
CreatedDateon Task or Event, grouped by month.Measure:
Id, with the count aggregation.
That gives the trend of how much contact this account has had, which is the context most renewal questions actually turn on.
Wire the refresh
This is the step that makes the panel more than a chat box next to some numbers.
Refresh the queries
Choose the Refresh Query interaction, then pick the components to refresh. Each Metric tile you created appears by its API name.

The tiles now re-run their aggregates as each answer arrives, so the rep never has to wonder whether the number beside the sentence is as fresh as the sentence.
Add it to the Account page
Going further
Store what the agent said. The Agent Chat exposes the text of the latest reply as an output. Bind it to a resource variable and you can show the last answer somewhere else, or write it to the record as a call note.
Ask without typing. The Invoke Agent interaction sends a message to an agent from anything, so a button on a card can ask a fixed question such as "summarise the last three cases" and put the answer straight into a variable.
Show the panel only where it helps. Component visibility rules can hide the whole panel on accounts with no open pipeline, so the rep only sees it when there is something to prepare for.
Related components
Agent Chat
Metric
Chart
Columns Container
Was this helpful?


