For the complete documentation index, see llms.txt. This page is also available as Markdown.

Opportunity Pipeline Board

The board saves the move, then asks

Before you start

Learning focus points

Objective

Stop the pipeline from being a week old.

Every sales team has the same gap between what is happening and what Salesforce says is happening. A rep knows a deal moved to Negotiation on Tuesday. Recording it means opening the record, finding the stage picklist, changing it, saving, and then remembering the next step that the new stage implies. None of that is hard. It is just enough friction that it waits, and what it usually waits for is the forecast meeting on Friday.

By then the manager is asking about a pipeline that describes last week, and the stage totals are wrong in the same direction every time: too much sitting in early stages, too little where the deals actually are.

The board is the fix, and it is not really about drag and drop. It is about making the update take one second instead of thirty, and making sure a deal only lands in a stage it qualifies for.


Solution

One board. Columns are stages, cards are deals, and each column carries the money in it. Moving a deal is a drag, and the drag is the save.

Three pieces do the work, and dividing them correctly is the whole trick:

  • The gate is a validation rule. It is the only thing that can refuse a drag.

  • The board re-reads itself after every drop, so a refused move goes back where it belongs on screen instead of sitting in a column the database disagrees with.

  • Collecting what a stage needs is a card action, launched by the rep, rather than something that fires on every move.

If you also need the board to redraw when somebody else changes the data, the Live Call Board shows how a platform event does that.

How It Works (User Perspective)

  1. The rep opens the pipeline board and sees every open deal, grouped by stage.

  2. Each column header shows how many deals it holds and what they are worth, so the shape of the pipeline is readable without a report.

  3. The rep drags a deal from Proposal to Negotiation.

  4. If the deal meets the bar for Negotiation, the stage is saved and both column totals redraw.

  5. If it does not, Salesforce refuses the change, an error names what is missing, and the card returns to the column it came from.

  6. To fix it, the rep opens the card's own menu, picks Stage requirements, fills in what the stage needs, and moves the deal again.

A Kanban titled Sales pipeline with five stage columns, each column header showing a deal count and a currency total above cards carrying a deal name and an amount
Five stages, eighteen deals, and the value of each column above the cards that make it up.

What we'll create

  • 1 Avonni Dynamic Component holding the board

  • 1 Kanban grouped by stage, with a per column total

  • 1 validation rule for any move that must be refusable

  • 1 screen flow that collects what a stage needs, on a card action


Set up

Prerequisites

A picklist worth grouping on

  • The board's columns are the values of the field you group on. On Opportunity that is Stage. On a custom object it is whatever picklist tracks progress.

  • Decide now whether closed records belong on it. Closed Won on the end gives the board a finish line; filtering it out keeps the board to work in progress. The query filter is where you say so.

A validation rule per gate

The board cannot block a drag. The database can. Write one validation rule on the object for each stage you want to gate:

  • Error condition, for example: AND(ISPICKVAL(StageName, "Negotiation/Review"), ISBLANK(Competitor__c))

  • Error message: say what to do, not what went wrong. "Name the competitor before moving this deal to Negotiation" beats "Invalid stage transition".

  • Set the error location to the field itself. The board surfaces the field name in its error, so pointing the rule at the right field is what makes the message legible.

Test the rule from a record page before you build the board. If it does not fire there, it will not fire from the board either, and you will spend an afternoon blaming the component.

A screen flow for what a stage needs

  • A screen flow with two text input variables, the record id and the stage value. Its job is to ask for the one or two fields a stage implies and write them back.

Build the board

1

Create the Dynamic Component

Create a component named Opportunity_Pipeline_Board. It belongs on a page or a tab of its own rather than on a record page: the board is about the whole pipeline, not about one deal.

2

Add the Kanban and give it records

Drop a Kanban on the canvas and set its data source to Query. The Kanban has no manual list mode: it reads records or nothing.

Write the query against Opportunity, filtered to the deals you want, and give it a row limit. A query with neither a filter nor a limit leaves the board spinning rather than empty.

Add every field the cards and columns will need to the query's selected fields. A field that is not in the query resolves to nothing on the card, silently.

3

Group the cards and total the column

Open Data Mappings. Three settings do the work:

  • Key Field is the record Id.

  • Group Field Name is the picklist that becomes your columns. Set it to Stage.

  • Group Summaries is what makes the header worth reading. Add one on Amount with Sum, and each column header carries its own total.

The Edit Kanban panel on the Properties tab, showing the Query data source, and Data Mappings with Key Field Id, Group Field Name Stage, and a Group Summaries entry reading Amount, Sum
The group field makes the columns. The group summary makes the header worth reading.

The summary is calculated over the records the query returned, not over the object. Filter the query to one owner and the totals become that owner's.

4

Put the columns in pipeline order

Alphabetical columns are useless for a pipeline: Negotiation lands before Qualification. Set Column Order to Custom and list your stage values in the order a deal travels through them.

Set Variant to Path while you are here. It draws the columns as a path, which is what a pipeline is, and unlike the base variant it does not clip the last card in a full column.

Turn on Show item count too. A header that reads Proposal (4) tells a manager something a column of cards does not.

5

Design one card

Under Card Attributes, bind the title to the record name and add the fields that decide whether this deal is worth touching today. Keep it to two or three. A Kanban card is read at a glance or not at all, and every extra field costs vertical space the column does not have.

Make one of them the field your validation rule checks, and set the field display to Stacked so the label stays readable at card width. A rep can then see which deals will be refused before touching them.

Keep the board honest

The board is correct until somebody tries a move the gate refuses. These two steps are what make it stay correct after that.

1

Give Item Drop a re-read

Select the Kanban, open its Interactions tab, and add a Refresh Query under Item Drop, pointing at the board itself.

The board now re-reads the database after every drop. When the gate refuses a move, the error toasts and the card goes back to the column the record is really in.

The Edit Kanban panel on the Interactions tab: Open Flow Panel for Stage requirements under Item Action Click, and Refresh Query under Item Drop
Item Drop carries a re-read and nothing else. The flow lives on the card action above it.

This step is not optional. Without it the record is still safe, because the validation rule already refused the write. What is not safe is the screen: the card stays in the column the rep dropped it into, the totals count it there, and the board disagrees with the database until somebody reloads the page.

The pipeline board with an Error Updating Record toast naming the Competitor field, and the dragged deal back in the Proposal column with the original counts and totals
A deal with no competitor named, dragged into Negotiation. Salesforce refused the change, the error names the field, and the re-read has already put the card back in Proposal.
2

Put the follow-up on a card action, not on the drop

Add an item action to the Kanban named stage_reqs, labelled Stage requirements. The Kanban has no inline card button: an item action appears in the card's own menu, which is where a rep looks for it.

Then add an Item Action Click interaction of type Open Flow Panel, with Target name set to stage_reqs and the flow set to yours. Map the clicked item's key field into the record id and its group value into the stage, and set the panel's On Finish to a Refresh Query on the board.

The board with one card's menu open, showing a single Stage requirements action
The action sits in the card menu, on the deal the gate would refuse.

Going further

Prompt on the drop anyway, safely. If you want the drag itself to open the flow, have the flow re-read the record first and branch on the stage it actually finds. That turns "the move happened" from an assumption into something the flow checked.

Split the board by owner. Add a subgroup on the owner field and each column breaks into swimlanes, each carrying its own total. This is the manager's view of the same board.

Filter without building a second board. Turn on the Kanban's filters and search. One board with a filter beats four boards that drift apart, and the read only setting turns the same board into a manager's view.

Use it on something other than deals. Any object with a picklist that describes progress works the same way: cases by status, applications by stage, orders by fulfilment step.

Related components

  • Kanban

Was this helpful?