Flexi Kanban
  • Introduction
    • πŸ“ƒAbout Flexi Kanban
    • βš–οΈFlexi Kanban in Comparison with Other
    • πŸ“˜What are Kanbans?
    • πŸ“•User's Guide to the Kanban Boards
  • Standard Dashboard
    • πŸš€Getting started
      • How to Build a Simple Kanban Using Creation Wizard Abilities
      • Demo Example: Task Dashboard
      • Demo Example: Events Dashboard
      • Demo Example: Opportunities Dashboard
      • Demo Example: Gantt Dashboard
      • Demo Example: Cases Dashboard
    • πŸ“Basics
      • How to Create Standard Dashboard
      • How to Create Child Dashboard
      • How to Incorporate Child Dashboard into Lightning Page
      • How to Open Dashboard in builder (Edit)
      • How to Share Dashboard
      • How to Clone Dashboard
    • πŸ—οΈConfigure Dashboard
      • Working with Dashboard Layout
      • How to Configure Dashboard Basic Properties
      • How to Configure Dashboard Filters
      • How to Add Dashboard Statistics
      • How to Configure Variables
      • How to Configure Events
      • How to add Dashboard Buttons and Menus
    • πŸ™οΈConfigure Column
      • How to Π‘onfigure Column Properties
      • How to Set Column Groups
      • How to Set and Use Column Custom Attributes
      • How to configure Column Data Source
      • How to work with Related Objects
      • How to configure Column Header
      • How to configure Column Body
      • How to configure Column Footer
      • How to configure Column Container and Filters
    • 🎫Configure Card
      • How to configure Card Properties
      • How to configure Card Data Source and Conditions
      • How to configure Card Compact Layout
      • How to configure Card Layout
      • How to configure and use Card Custom Attributes
      • Configuring Card Movement and Column Junctions
      • Configuring Card Actions
    • πŸ“šGroups of Cards
      • How to configure Card Grouping
    • πŸ”§Tools
      • Using Merge Field Picker
      • Using Formula Editor
      • Configuring CSS styles
      • Configuring Rows, Cells, Menus and Buttons
      • Configuring Handlers
    • πŸ‘“Using Dashboard
      • How to use Kanban API actions
      • How to Incorporate Dashboard into Lightning Page
      • How to build the link to the Dashboard
      • How to Work with Variables
      • How to debug Dashboard
      • How to Work with Filters and Orders
    • ✨Howtos and Best Practices
      • How to configure communication between Dashboards
      • How to configure communication between Dashboard and Form
      • How to display different layouts for the same kanban card
      • How to design kanban for your needs
        • How to colorize cards
        • How to add a quick-filter column
      • What inactive column can be used for
      • Tips and Tricks
  • Composite Dashboard
    • πŸ—„οΈIntroduction
      • πŸ”§How to Create a Composite Dashboard
    • πŸͺ›Working with Composite Dashboard Layout
      • Configuring Parent Dashboard
      • Configuring Child Dashboard
    • πŸ–‡οΈConnections Between Dashboards
    • πŸ”¬Examples
      • !! Calendar Dashboard
    • πŸ₯‡Howtos and Best Practices
      • How to Pass Variables Between Parent and Child Dashboards
  • Components
    • πŸ“‹Forms
      • πŸ“‘Basics
        • Form Building Overview
        • Working with Form Settings
        • Working with Source Object fields
        • How to Preview the Form
        • How to configure the Form Sharing Rules
        • Understanding the Form Dependencies
        • Working with Conditional Styles
        • Working with Conditions
        • Search Over the Form
      • πŸͺ›Tools
        • Variables
        • Additional Fields
        • Context Object
        • Form Action
        • Event
      • Components
        • Add and Remove Form Components
        • Components Basic Properties
        • Components Validation Rules
        • Styling Form and Form Components
        • String Field
        • Text Area Field
        • Rich Text Field
        • Lookup Field
        • Date Field
        • Datetime Field
        • Time Field
        • Number Field
        • Currency Field
        • Multi-Select Field
        • Picklist Field
        • Option: Section
        • Option: Static Text
        • Option: Image
        • Option: Blank Space
        • Option: File
        • Option: Custom Button
        • Option: Custom URL
        • Option: Nested Form
        • Option: Lightning Component
        • List. Related Lists.
      • Using Form
        • How to incorporate Form into the Lightning Page
        • How to incorporate Form into Screen Flow
        • How to build the link to the Form
        • (unpublished, empty)How to incorporate Form into the Lightning Component
        • How to run Form Action from Lightning Component
      • Tricks, Hints and Best Practices
        • How to configure communication between Forms
        • How to pre-populate form fields
        • Deployment of Forms
        • What Are Parameters?
    • 🀾Actions/Action Groups
      • Basics
        • Working with Actions
        • Working with Action Groups
        • Working with Functions
        • Working with Context objects
        • Working with Conditions
      • Types
        • Validation Rule Action
        • Define Variable Action
        • Create Record Action
        • Update Records Action
        • Delete Records Action
        • Send Email Action
        • Callout Action
        • Execute Apex Action
        • KanBan API Action
      • Using Actions
        • !!unpublished empty!! How to execute Action/Group from the SF Process/Flow Builder
        • How to execute Action/Group through the REST api
        • !!unpublished empty!! How to execute Action/Group from the Einstain Bot
        • !!unpublished empty !! How to execute Action/Group from APEX
      • Best Practices
        • !! How to use Execute in background option
        • !! Deployment Actions/Action Groups
  • πŸ“–References
    • βš™οΈApplication Settings
    • ♾️Functions
      • SObject
      • Text
      • Logical
      • Numeric
      • Date and Time
      • JSON
      • System
      • Charts
    • πŸ—ƒοΈQuery Conditions
    • Apex Data Provider
    • πŸ“How to add a Kanban to Navigation Items Panel
    • πŸ‘₯Manage Licenses
    • πŸͺͺAssign Permission Sets
    • πŸ“¦Deployment
      • Deploying Using Standard Credentials
      • Deploying Using Connected App Authentication
      • How to configure the Salesforce Connected Application for Flexi Kanban deployment
  • Grant Login Access to Support
  • Subscription Plans
  • Support Agreement
  • Access License Agreement
  • Privacy Policy
Powered by GitBook
On this page
  • Create new dashboard
  • Configure dashboard
  • Configure columns
  • Configure card
  • Create a bar chart from the card components
  • Configure column junctions
  • Configure Card Actions
  1. Standard Dashboard
  2. Getting started

Demo Example: Opportunities Dashboard

Last updated 6 months ago

The Opportunities Dashboard represents a way to show and manage opportunities, visually indicate their properties and compare their parameters. Here is how this dashboard can look like:

This dashboard shows opportunities in 7 columns; some of opportunities with similar stages are shown in the same column. Dragging the opportunity cards from one column to another user can easily change its stage. If stage in the target column is not one user wants to apply, he can edit opportunity record manually using the proper form.

To make a such dashboard administrator should do actions listed below:

Create new dashboard

  • Give it a name and description.

  • Select "Polo Blue" theme.

  • Save dashboard and go to Kanban Builder.

Configure dashboard

  • Type = Text

  • Value = Opportunities

position: absolute;
background-color: #AEC0D7;
top: 0;
left: 0;
bottom: 0;
padding: 0 1.5em;
z-index: 1;
font-size: 1.5rem;
display: flex;
align-items: center;
font-weight: bold;
#
Variable Name
Variable Value

1

StageColor_Default

#AAAAAA

2

StageColor_Prospecting

#e08f68

3

StageColor_Qualification

#e0bb68

4

StageColor_NeedsAnalysis

#8BAEBC

5

StageColor_PerceptionAnalysis

#6882e0

6

StageColor_ValueProposition

#b581ab

7

StageColor_ProposalPriceQuote

#8b619c

8

StageColor_IdDecisionMakers

#8fa96a

9

StageColor_NegotiationReview

#70c2aa

10

StageColor_ClosedWon

#2f8638

11

StageColor_ClosedLost

#af1e1e

Configure columns

  • Name columns respectively to opportunity stages (see table below)

  • Leave columns widths default ("auto")

  • Leave columns "Is Active" checkboxes default (checked)

    • Data Source Type = SObject

    • Data Source = Opportunity

    • Order = Expected Amount, desc (set Order = "Amount, desc" for column named "Closed" )

  • Set the following conditions to the columns:

#
Column
Custom attribute name
Custom attribute value

1

Prospecting and other

setStageTo

Prospecting

2

Qualification

setStageTo

Qualification

3

Analysis

setStageTo

Needs Analysis

4

Propositions

setStageTo

Value Proposition

5

Id. Desision Makers

setStageTo

Id. Decision Makers

6

Negotiation/Review

setStageTo

Negotiation/Review

7

Closed

setStageTo

losed Won

padding-top: 0;
background: transparent;
border: 0px none;
#
Column
Column Header CSS styles

1

Prospecting and other

2

Qualification

3

Analysis

4

Propositions

5

Id. Decision Makers

6

Negotiation/Review

7

Closed

Configure card

  • Set Data Source Type to "Opportunity"

border-radius: 2px;
padding: 0.5rem;
position: relative;
  • By default Card Compact Layout contains one component of text type; this component contains Record ID. Click on it and change its Value to {Opportunity.Name}

  • Set its Title to Opportunity name

  • Set its width to 100 (leave default)

font-weight: bold;
  • Add text component # 2 below the previous

  • Set its Value to By: {Opportunity.Account.Name}

  • Set its Title to Account

  • Leave its width default (100)

  • Set CSS styles for it:

font-size: 11px;
  • Add text component # 3 below

  • Set its value to Stage: {Opportunity.StageName}

  • Set its Title to Stage

Now, you need to create a bar chart from several text components by wide use of dynamic CSS styles (see the next chapter).

Create a bar chart from the card components

  • Add a text component # 4 to Card under component # 2 (above the last "Stage" one)

  • Leave its Value and Title empty

  • Leave its Width default (100)

  • Set following CSS styles to it:

height: 110px;
border-bottom: 1px solid gray;

This component will be used as background with fixed height to place chart bars onto.

"Opportunity amount" chart bar

  • Add a text component # 5 below the # 4

  • Leave its Value empty

  • Set its Title to Opportunity amount: {Opportunity.Amount}

  • Leave its Width default

  • Set the following CSS styles to it:

position: absolute;
color: transparent;
overflow: hidden;
width: calc((100% - 1rem) /4);
  • Add the Height rule to CSS Styles and set it to this formula:

FORMULA[{Opportunity.Amount} / (COLUMNTOTAL({$Column.Id}, null, 'MAX', 'Amount')/ 100)]px

This formula calculates total amount of all opportunities in the column where card is shown, and sets height of the current component as a fraction of 100 pixels. This fraction is proportional to current opportunity amount. Thus, the component will work as chart bar, which height represents an opportunity amount related to total amount of all opportunities in the current column.

  • Add the Margin-top rule to CSS Styles and set it to this formula:

FORMULA[0 - (({Opportunity.Amount} / (COLUMNTOTAL({$Column.Id}, null, 'MAX', 'Amount')/ 100)) + 1)]px

This formula acts in the same way as previous, but calculates the negative value which will be used as top margin to shift the chart bar upward.

  • Add the Background-color rule to CSS Styles and set it to this formula:

FORMULA[
    CASE(
        {Opportunity.StageName},    
        'Prospecting', {$Variables.stagecolor_prospecting},
        'Qualification', {$Variables.stagecolor_qualification},
        'Needs Analysis', {$Variables.stagecolor_needsanalysis},
        'Value Proposition', {$Variables.stagecolor_valueproposition},
        'Id. Decision Makers', {$Variables.stagecolor_iddecisionmakers},
        'Perception Analysis', {$Variables.stagecolor_perceptionanalysis},
        'Proposal/Price Quote', {$Variables.stagecolor_proposalpricequote},
        'Negotiation/Review', {$Variables.stagecolor_negotiationreview},
        'Closed Won', {$Variables.stagecolor_closedwon},
        'Closed Lost', {$Variables.stagecolor_closedlost},
        {$Variables.stagecolor_default}
    )
]

This formula sets different background colors to the Card component depending on current opportunity Stage. Colors are got from the Kanban variables.

  • Add the Min-height rule to CSS Styles and set it to this formula:

FORMULA[
    IF(
        OR(
            {Opportunity.Amount} = null,
            {Opportunity.Amount} = "",
            {Opportunity.Amount} <= 0
        ),
        0,
        1
    )
]px

This formula sets the minimal height of the chart bar to 1 pixel if opportunity amount is set and more than 0. For zero, absent or undefined amounts this value will be "0px" and no chart bar will be shown.

"Opportunity Expected Revenue" chart bar

  • Add a text component # 6 below the # 5

  • Leave its Value empty

  • Set its Title to Expected amount: {Opportunity.ExpectedRevenue}

  • Leave its Width default

  • Set the following CSS styles to it:

position: absolute;
color: transparent;
overflow: hidden;
width: calc((100% - 1rem) /4);
left: calc((100% - 1rem) * 3 / 8);
opacity: 0.75;
max-height: 100px;

background-color: 
FORMULA[
    CASE(
        {Opportunity.StageName},    
        'Prospecting', {$Variables.stagecolor_prospecting},
        'Qualification', {$Variables.stagecolor_qualification},
        'Needs Analysis', {$Variables.stagecolor_needsanalysis},
        'Value Proposition', {$Variables.stagecolor_valueproposition},
        'Id. Decision Makers', {$Variables.stagecolor_iddecisionmakers},
        'Perception Analysis', {$Variables.stagecolor_perceptionanalysis},
        'Proposal/Price Quote', {$Variables.stagecolor_proposalpricequote},
        'Negotiation/Review', {$Variables.stagecolor_negotiationreview},
        'Closed Won', {$Variables.stagecolor_closedwon},
        'Closed Lost', {$Variables.stagecolor_closedlost},
        {$Variables.stagecolor_default}
    )
]

height: FORMULA[{Opportunity.ExpectedRevenue} / (COLUMNTOTAL({$Column.Id}, null, 'MAX', 'Amount')/ 100)]px

margin-top: FORMULA[0 - (({Opportunity.ExpectedRevenue} / (COLUMNTOTAL({$Column.Id}, null, 'MAX', 'Amount') / 100)) + 1)]px

min-height: 
FORMULA[
    IF(
        OR(
            {Opportunity.ExpectedRevenue} = null,
            {Opportunity.ExpectedRevenue} = "",
            {Opportunity.ExpectedRevenue} <= 0
        ),
        0,
        1
    )
]px

Formulas in the code above are the same as for "Opportunity Amount" chart bar, but they are based on {Opportunity.ExpectedRevenue} field instead of {Opportunity.Amount}. Also, "opacity" property is used to make chart bar have more light shade of background color.

"Opportunity probability" data cell

  • Add a text component # 7 below the # 6

  • Set its Value to {Opportunity.Probability}%

  • Set its Title to Probability

  • Leave its Width default

  • Set the following CSS styles to it:

position: absolute;
right: 0;
margin-top: calc(0px - 2rem - 1px);
font-size: 1.25rem;
overflow: hidden;
font-weight: bold;
padding-right: 0.5rem;
text-align: right;
left: auto;
max-height: 100px;
width: 100%;
  • Add the Color rule to CSS Styles and set it to this formula:

FORMULA[
IF(
    {Opportunity.Probability} > 80,
    green,
    IF(
        {Opportunity.Probability} > 60,
        olive,
        IF(
            {Opportunity.Probability} > 40,
            gold,
            IF(
                {Opportunity.Probability} > 20,
                orange,
                red
            )
        )
    )
)
]

This formula will set different colors from red to green depending on probability percentage of the opportunity. Discreteness is 20%.

"Opportunity Amount" legend entry

  • Add a text component # 8 below the # 7

  • Set its Value to the following formula:

FORMULA[
    IF(
        OR({Opportunity.Amount} = null, {Opportunity.Amount} = ""),
        '0',
        IF(
            {Opportunity.Amount} > 999999,
            TEXT(ROUND({Opportunity.Amount} / 1000000),CEILING) + 'M',
            IF(
                {Opportunity.Amount} > 9999,
                 TEXT(ROUND({Opportunity.Amount} / 1000),CEILING)+'k',
                INTNUMBER({Opportunity.Amount})
            )
        )
    )
]

This formula will show rounded amount in millions ("M") or thousands ("k") of currency units. To know the exact value hover mouse on the amount.

  • Set its Title to Opportunity amount: {Opportunity.Amount}

  • Leave its Width default

  • Set the following CSS styles to it:

width: calc((100% - 1rem) / 4);
font-size: 11px;
color: #000;
text-align: center;
position: absolute;

"Opportunity Expected Revenue" legend entry

  • Add a text component # 9 to the right of the # 8

  • Set its Value to the following formula (it will show the Expected revenue in millions or thousands):

FORMULA[
    IF(
        OR({Opportunity.ExpectedRevenue} = null, {Opportunity.ExpectedRevenue} = ""),
        '0',
        IF(
            {Opportunity.ExpectedRevenue} > 999999,
            TEXT(ROUND({Opportunity.ExpectedRevenue} / 1000000),CEILING) + 'M',
            IF(
                {Opportunity.ExpectedRevenue} > 9999,
                 TEXT(ROUND({Opportunity.ExpectedRevenue} / 1000),CEILING)+'k',
                INTNUMBER({Opportunity.ExpectedRevenue})
            )
        )
    )
]
  • Set its Title to Expected Revenue: {Opportunity.ExpectedRevenue}

  • Leave its Width default

  • Set the following CSS styles to it:

width: calc((100% - 1rem) / 4);
font-size: 11px;
color: #000;
text-align: center;
position: absolute;
left: calc((100% - 1rem) * 3 / 8);

Assistive block

  • Add a text component # 10 to the right of the # 9

  • Set its Value to Amount

  • Leave its Title empty

  • Leave its Width default

  • Set the following CSS styles to it:

overflow: hidden;
max-width: 0px;
color: transparent;
width: calc((100% - 1rem) * 3 / 8);

This element is used to prevent legend entries mess with lowest component.

Configure column junctions

    • Drag-n-drop allowed to ALL columns

    • Drop behavior for source column: Remove card

    • Drop behavior for target column: Refresh

Configure Card Actions

Click on card and add a new action with these properties:

  • Name = Update opportunity stage

  • Type = Field Update

  • Execute = Always

  • Status = Active

  • Context Object Type = Opportunity

In the Field Update Settings section configure this:

  • Object Name = Opportunity

  • Fields:

    • Name = Stage

    • Value = {$TargetColumn.a__setStageTo}

  • Conditions:

    • Opportunity ID eqials {opportunity.id}

Go to and create new standard dashboard.

Go to . Add which will overlay unnecessary views selector:

Set to this cell:

Go to tab. Add these variables, which will store colors for different opportunity stages (and then you can change color in the one place only to re-style the whole dashboard):

to the dashboard.

to all columns:

Add the to all columns:

Set the following styles for column bodies on tab:

Set these styles to column headers on the tab:

to dashboard

Set to necessary type. In this example it is set to SObject and Record ID is set to {Opportunity.Id}:

Set to show name of active Opportunity record:

Open editor and add these styles to the Card settings:

Expand "Handler" section and with Type = SObject and Value = {Opportunity.Id}

Expand "Styles" section and set the following :

Set for card on each column:

To add a sense to Cards dragging . In this example action will be the same for all columns, so, no need to configure them separately.

πŸš€
text-shadow: 1px 1px 2px #000;
color: #fff;
background: {$Variables.stagecolor_prospecting};
padding: 0.35rem 0.75rem;
border: 0px none;
text-shadow: 1px 1px 2px #000;
color: #fff;
background: {$Variables.stagecolor_qualification};
padding: 0.35rem 0.75rem;
border: 0px none;
text-shadow: 1px 1px 2px #000;
color: #fff;
background: linear-gradient(120deg, {$Variables.stagecolor_needsanalysis} 30%, {$Variables.stagecolor_perceptionanalysis} 70%);
padding: 0.35rem 0.75rem;
border: 0px none;
text-shadow: 1px 1px 2px #000;
color: #fff;
background: linear-gradient(120deg, {$Variables.stagecolor_valueproposition} 30%, {$Variables.stagecolor_proposalpricequote} 70%);
padding: 0.35rem 0.75rem;
border: 0px none;
text-shadow: 1px 1px 2px #000;
color: #fff;
background: {$Variables.stagecolor_iddecisionmakers};
padding: 0.35rem 0.75rem;
border: 0px none;
text-shadow: 1px 1px 2px #000;
color: #fff;
background: {$Variables.stagecolor_negotiationreview};
padding: 0.35rem 0.75rem;
border: 0px none;
text-shadow: 1px 1px 2px #000;
color: #fff;
background: linear-gradient(120deg, {$Variables.stagecolor_closedwon} 30%, {$Variables.stagecolor_closedlost} 70%);
padding: 0.35rem 0.75rem;
border: 0px none;
dashboard creation wizard
CSS Styles
Variables Configuration
Add 7 columns
Set these properties
custom attribute
Body Configuration
Header Configuration
Add 1 card
Card Compact Layout
add a handler
CSS style
column junctions
some actions are necessary
Statistics Configuration
the cell
card layout
card layout header