Part 4 - Creating a dashboard to display Salesforce Opportunities

Overview

In this section we will build a dashboard which displays Salesforce Opportunity information based on the Account that is filtered by the user.

Source code

The following source code is shared using Confluence Storage Format - the XHTML-based format that Confluence uses to store the content of pages, page templates, blueprints, blog posts and comments.

For more information on how to use this source code on your Confluence, read the following article - How do I use Recipes that use the Storage Format with the Confluence Source Editor?


<h1 class="auto-cursor-target">Step 1:</h1> <p> <br/> </p> <ac:structured-macro ac:macro-id="f9d0d294-3ffd-407e-9dda-bf2283155360" ac:name="chart" ac:schema-version="1"> <ac:parameter ac:name="3D">true</ac:parameter> <ac:parameter ac:name="dataDisplay">before</ac:parameter> <ac:parameter ac:name="columns">Opportunity Name,Amount</ac:parameter> <ac:parameter ac:name="title">Opportunities</ac:parameter> <ac:parameter ac:name="type">bar</ac:parameter> <ac:rich-text-body> <p class="auto-cursor-target"> <br/> </p> <ac:structured-macro ac:macro-id="951b1212-20ae-4dcb-8fad-d5c4be2aefbe" ac:name="report-table" ac:schema-version="1"> <ac:parameter ac:name="injected">true</ac:parameter> <ac:rich-text-body> <p class="auto-cursor-target"> <br/> </p> <ac:structured-macro ac:macro-id="9966164b-728e-40d8-9027-09435f3b8da6" ac:name="soql-reporter" ac:schema-version="1"> <ac:parameter ac:name="query">Select Name,AccountId,Account.Name,Amount,Probability,CloseDate from Opportunity ORDER BY Account.Name, CloseDate</ac:parameter> <ac:rich-text-body> <p> <ac:structured-macro ac:macro-id="2eb3ed3a-d2db-41fa-a7e3-1c60f3668d2b" ac:name="text-filter" ac:schema-version="1"> <ac:parameter ac:name="contains">%data:AccountName>1%</ac:parameter> <ac:parameter ac:name="">sf:Account.Name</ac:parameter> </ac:structured-macro> </p> </ac:rich-text-body> </ac:structured-macro> <p> <br/> </p> <p> <br/> </p> <ac:structured-macro ac:macro-id="2c42ce6f-1321-496b-8632-23414b3bf840" ac:name="report-column" ac:schema-version="1"> <ac:parameter ac:name="title">Account Name</ac:parameter> <ac:rich-text-body> <p class="auto-cursor-target"> <ac:structured-macro ac:macro-id="5c1c0260-46cb-4092-9fcb-321ca6870346" ac:name="report-info" ac:schema-version="1"> <ac:parameter ac:name="">sf:Account.Name</ac:parameter> </ac:structured-macro> </p> </ac:rich-text-body> </ac:structured-macro> <p class="auto-cursor-target"> <br/> </p> <ac:structured-macro ac:macro-id="9e9545e4-e978-4f72-8d9a-40b31f6502d1" ac:name="report-column" ac:schema-version="1"> <ac:parameter ac:name="title">Opportunity Name</ac:parameter> <ac:rich-text-body> <p class="auto-cursor-target"> <ac:structured-macro ac:macro-id="2986e84d-356f-451e-994d-4fec5ed6007b" ac:name="report-info" ac:schema-version="1"> <ac:parameter ac:name="">sf:Name</ac:parameter> </ac:structured-macro> </p> </ac:rich-text-body> </ac:structured-macro> <p class="auto-cursor-target"> <br/> </p> <ac:structured-macro ac:macro-id="1fe46d1b-169d-4880-913e-a99a10ad281e" ac:name="report-column" ac:schema-version="1"> <ac:parameter ac:name="title">Amount</ac:parameter> <ac:rich-text-body> <p> <ac:structured-macro ac:macro-id="340e514a-3cc0-4de5-8e54-7a34105e769d" ac:name="report-info" ac:schema-version="1"> <ac:parameter ac:name="format">$#,##0.00</ac:parameter> <ac:parameter ac:name="">sf:Amount</ac:parameter> </ac:structured-macro> </p> </ac:rich-text-body> </ac:structured-macro> <p class="auto-cursor-target"> <br/> </p> <ac:structured-macro ac:macro-id="3d919993-4d2a-4067-8104-d23f19464ce9" ac:name="report-column" ac:schema-version="1"> <ac:parameter ac:name="summaryFormat">#</ac:parameter> <ac:parameter ac:name="title">Probability</ac:parameter> <ac:parameter ac:name="class">ProbabilityColumn</ac:parameter> <ac:rich-text-body> <p> <ac:structured-macro ac:macro-id="aaa5b89e-58c7-4e1c-8c99-223e2936d5a7" ac:name="report-info" ac:schema-version="1"> <ac:parameter ac:name="format">#</ac:parameter> <ac:parameter ac:name="">sf:Probability</ac:parameter> </ac:structured-macro> </p> </ac:rich-text-body> </ac:structured-macro> <p class="auto-cursor-target"> <br/> </p> <ac:structured-macro ac:macro-id="571b8ce4-7595-4b38-baaa-c5709d5a95e2" ac:name="report-column" ac:schema-version="1"> <ac:parameter ac:name="title">Closed Date</ac:parameter> <ac:rich-text-body> <p> <ac:structured-macro ac:macro-id="9626c1a6-df34-47d5-9b25-2d92c1282b9c" ac:name="report-info" ac:schema-version="1"> <ac:parameter ac:name="format">MM-dd-yyyy</ac:parameter> <ac:parameter ac:name="">sf:CloseDate</ac:parameter> </ac:structured-macro> </p> </ac:rich-text-body> </ac:structured-macro> <p class="auto-cursor-target"> <br/> </p> <ac:structured-macro ac:macro-id="a84bcce9-263b-44a2-9af4-2945b617bf98" ac:name="report-empty" ac:schema-version="1"> <ac:rich-text-body> <p>No records found</p> </ac:rich-text-body> </ac:structured-macro> <p class="auto-cursor-target"> <br/> </p> </ac:rich-text-body> </ac:structured-macro> <p class="auto-cursor-target"> <br/> </p> </ac:rich-text-body> </ac:structured-macro> <h1 class="auto-cursor-target">Step 2:</h1> <ac:structured-macro ac:macro-id="6d3aebf6-8662-4af6-800f-d6f4bdc7fed4" ac:name="deck" ac:schema-version="1"> <ac:parameter ac:name="id">OpportunitySummary</ac:parameter> <ac:rich-text-body> <p class="auto-cursor-target"> <br/> </p> <ac:structured-macro ac:macro-id="d12991f8-73d1-4e53-8a2a-ff3287a2f617" ac:name="card" ac:schema-version="1"> <ac:parameter ac:name="label">Opportunities Won</ac:parameter> <ac:rich-text-body> <p class="auto-cursor-target"> <br/> </p> <ac:structured-macro ac:macro-id="d92e9b77-fa94-449c-88de-545653d6c701" ac:name="report-table" ac:schema-version="1"> <ac:parameter ac:name="injected">true</ac:parameter> <ac:rich-text-body> <p class="auto-cursor-target"> <br/> </p> <ac:structured-macro ac:macro-id="c4bb6e91-d235-487c-9a3e-f88d5b8b68d8" ac:name="soql-reporter" ac:schema-version="1"> <ac:parameter ac:name="query">Select Account.name,id,name, amount, owner.name, closeDate from Opportunity Where IsWon = true</ac:parameter> <ac:rich-text-body> <p> <br/> </p> <p class="auto-cursor-target"> <ac:structured-macro ac:macro-id="404d2453-b12e-4133-a4cb-e8ef811fc279" ac:name="text-filter" ac:schema-version="1"> <ac:parameter ac:name="contains">%data:AccountName>1%</ac:parameter> <ac:parameter ac:name="">sf:Account.Name</ac:parameter> </ac:structured-macro> </p> </ac:rich-text-body> </ac:structured-macro> <p class="auto-cursor-target"> <br/> </p> <ac:structured-macro ac:macro-id="88f12b6d-daf4-41c5-b2ed-1bf5f0975790" ac:name="report-column" ac:schema-version="1"> <ac:parameter ac:name="title">Name</ac:parameter> <ac:rich-text-body> <p class="auto-cursor-target"> <br/> </p> <ac:structured-macro ac:macro-id="21d7b661-6bfb-4572-a733-8e0ced07f42c" ac:name="report-variable" ac:schema-version="1"> <ac:parameter ac:name="name">OppName</ac:parameter> <ac:parameter ac:name="value">https://noelsiagian-dev-ed.my.salesforce.com/%sf:Id%</ac:parameter> <ac:parameter ac:name="atlassian-macro-output-type">INLINE</ac:parameter> <ac:rich-text-body> <p> <br/> </p> </ac:rich-text-body> </ac:structured-macro> <p class="auto-cursor-target"> <br/> </p> <ac:structured-macro ac:macro-id="c5662929-4abd-457b-8d2b-0e5aee333bd9" ac:name="report-link" ac:schema-version="1"> <ac:parameter ac:name="atlassian-macro-output-type">INLINE</ac:parameter> <ac:parameter ac:name="">variable:OppName</ac:parameter> <ac:rich-text-body> <p>%sf:Name%</p> </ac:rich-text-body> </ac:structured-macro> <p class="auto-cursor-target"> <br/> </p> </ac:rich-text-body> </ac:structured-macro> <p class="auto-cursor-target"> <br/> </p> <ac:structured-macro ac:macro-id="c37d2f68-bff6-46d7-953c-d536f404df84" ac:name="report-column" ac:schema-version="1"> <ac:parameter ac:name="title">Amount</ac:parameter> <ac:rich-text-body> <p> <ac:structured-macro ac:macro-id="6a11a18c-8334-4635-af25-881c4007b89e" ac:name="report-info" ac:schema-version="1"> <ac:parameter ac:name="format">$#,##0.00</ac:parameter> <ac:parameter ac:name="">sf:Amount</ac:parameter> </ac:structured-macro> </p> </ac:rich-text-body> </ac:structured-macro> <p class="auto-cursor-target"> <br/> </p> <ac:structured-macro ac:macro-id="4bd3df1d-ff5c-4462-8ab9-9191a9daa680" ac:name="report-column" ac:schema-version="1"> <ac:parameter ac:name="title">Owner Name</ac:parameter> <ac:rich-text-body> <p> <ac:structured-macro ac:macro-id="05274c3e-b0d9-4adb-9b03-e32b64ae1aaf" ac:name="report-info" ac:schema-version="1"> <ac:parameter ac:name="">sf:Owner.Name</ac:parameter> </ac:structured-macro> </p> </ac:rich-text-body> </ac:structured-macro> <p class="auto-cursor-target"> <br/> </p> <ac:structured-macro ac:macro-id="fb578f88-c3d5-410c-8170-ff37e72104e7" ac:name="report-column" ac:schema-version="1"> <ac:parameter ac:name="title">Close Date</ac:parameter> <ac:rich-text-body> <p> <ac:structured-macro ac:macro-id="45f27861-8cb0-451e-b8f7-326cf50766d9" ac:name="report-info" ac:schema-version="1"> <ac:parameter ac:name="">sf:CloseDate</ac:parameter> </ac:structured-macro> </p> </ac:rich-text-body> </ac:structured-macro> <p> <br/> </p> <p> <br/> </p> </ac:rich-text-body> </ac:structured-macro> <p class="auto-cursor-target"> <br/> </p> </ac:rich-text-body> </ac:structured-macro> <p class="auto-cursor-target"> <br/> </p> <ac:structured-macro ac:macro-id="285afd3f-d1c0-4f0c-b663-d2f041fc44b2" ac:name="card" ac:schema-version="1"> <ac:parameter ac:name="label">Opportunities Lost or Not Yet Won</ac:parameter> <ac:rich-text-body> <p class="auto-cursor-target"> <br/> </p> <ac:structured-macro ac:macro-id="ab97e4cd-8511-4a8d-b1e1-194a4d017665" ac:name="report-table" ac:schema-version="1"> <ac:parameter ac:name="injected">true</ac:parameter> <ac:rich-text-body> <p class="auto-cursor-target"> <br/> </p> <ac:structured-macro ac:macro-id="f2fa377f-f75e-4b45-9d77-9709f720d73f" ac:name="soql-reporter" ac:schema-version="1"> <ac:parameter ac:name="query">Select Account.name,id,name, amount, owner.name, stageName from Opportunity Where IsWon = false</ac:parameter> <ac:rich-text-body> <p> <br/> </p> </ac:rich-text-body> </ac:structured-macro> <p class="auto-cursor-target"> <ac:structured-macro ac:macro-id="68db1544-5b6c-446a-bc51-e48da1fb0017" ac:name="text-filter" ac:schema-version="1"> <ac:parameter ac:name="contains">%data:AccountName>1%</ac:parameter> <ac:parameter ac:name="">sf:Account.Name</ac:parameter> </ac:structured-macro> </p> <ac:structured-macro ac:macro-id="71dfeb22-1aa9-482f-80ce-286a9a4f4be1" ac:name="report-column" ac:schema-version="1"> <ac:parameter ac:name="title">Name</ac:parameter> <ac:rich-text-body> <p class="auto-cursor-target"> <br/> </p> <ac:structured-macro ac:macro-id="6061d78f-251f-4366-a683-a66c949992d1" ac:name="report-variable" ac:schema-version="1"> <ac:parameter ac:name="name">OppName</ac:parameter> <ac:parameter ac:name="value">https://noelsiagian-dev-ed.my.salesforce.com/%sf:Id%</ac:parameter> <ac:parameter ac:name="atlassian-macro-output-type">INLINE</ac:parameter> <ac:rich-text-body> <p> <br/> </p> </ac:rich-text-body> </ac:structured-macro> <p class="auto-cursor-target"> <br/> </p> <ac:structured-macro ac:macro-id="41955b9a-0a86-4ae2-88f9-9537ad7ad6d2" ac:name="report-link" ac:schema-version="1"> <ac:parameter ac:name="atlassian-macro-output-type">INLINE</ac:parameter> <ac:parameter ac:name="">variable:OppName</ac:parameter> <ac:rich-text-body> <p>%sf:Name%</p> </ac:rich-text-body> </ac:structured-macro> <p class="auto-cursor-target"> <br/> </p> </ac:rich-text-body> </ac:structured-macro> <p class="auto-cursor-target"> <br/> </p> <ac:structured-macro ac:macro-id="43d66ddb-a4b7-4448-8993-13672f791f3c" ac:name="report-column" ac:schema-version="1"> <ac:parameter ac:name="title">Amount</ac:parameter> <ac:rich-text-body> <p> <ac:structured-macro ac:macro-id="c3f275fe-40ba-465f-81e1-ebfaec31d967" ac:name="report-info" ac:schema-version="1"> <ac:parameter ac:name="format">$#,##0.00</ac:parameter> <ac:parameter ac:name="">sf:Amount</ac:parameter> </ac:structured-macro> </p> </ac:rich-text-body> </ac:structured-macro> <p class="auto-cursor-target"> <br/> </p> <ac:structured-macro ac:macro-id="5098e23d-330d-4b8c-834f-c604c8a2ae45" ac:name="report-column" ac:schema-version="1"> <ac:parameter ac:name="title">Owner Name</ac:parameter> <ac:rich-text-body> <p> <ac:structured-macro ac:macro-id="8f0d608d-6c8e-46ff-9119-8ad4d1aa4a66" ac:name="report-info" ac:schema-version="1"> <ac:parameter ac:name="">sf:Owner.Name</ac:parameter> </ac:structured-macro> </p> </ac:rich-text-body> </ac:structured-macro> <p class="auto-cursor-target"> <br/> </p> <ac:structured-macro ac:macro-id="ed38cf47-50d5-4cdd-9873-945be88ed755" ac:name="report-column" ac:schema-version="1"> <ac:parameter ac:name="title">Stage Name</ac:parameter> <ac:rich-text-body> <p> <ac:structured-macro ac:macro-id="69f121e8-878a-445b-916f-784af84cd2c8" ac:name="report-info" ac:schema-version="1"> <ac:parameter ac:name="">sf:StageName</ac:parameter> </ac:structured-macro> </p> </ac:rich-text-body> </ac:structured-macro> <p class="auto-cursor-target"> <br/> </p> </ac:rich-text-body> </ac:structured-macro> <p class="auto-cursor-target"> <br/> </p> </ac:rich-text-body> </ac:structured-macro> <p class="auto-cursor-target"> <br/> </p> <ac:structured-macro ac:macro-id="9c4231f0-bda5-4de8-a538-9e23883bc708" ac:name="card" ac:schema-version="1"> <ac:parameter ac:name="label">Overall Opportunities</ac:parameter> <ac:rich-text-body> <p class="auto-cursor-target"> <br/> </p> <ac:structured-macro ac:macro-id="9c3c85f9-35c7-4b72-a6fa-1644658b9f9a" ac:name="report-variable" ac:schema-version="1"> <ac:parameter ac:name="name">TotalOpportunity</ac:parameter> <ac:parameter ac:name="atlassian-macro-output-type">INLINE</ac:parameter> <ac:rich-text-body> <p class="auto-cursor-target"> <br/> </p> <ac:structured-macro ac:macro-id="7716f559-32db-427f-a16e-1b7ab0519b00" ac:name="soql-reporter" ac:schema-version="1"> <ac:parameter ac:name="query">Select name from Opportunity</ac:parameter> <ac:rich-text-body> <p> <ac:structured-macro ac:macro-id="9fa915b5-1812-4345-bbd5-e00cb124eaca" ac:name="text-filter" ac:schema-version="1"> <ac:parameter ac:name="contains">%data:AccountName>1%</ac:parameter> <ac:parameter ac:name="">sf:Account.Name</ac:parameter> </ac:structured-macro> </p> </ac:rich-text-body> </ac:structured-macro> <p class="auto-cursor-target"> <br/> </p> </ac:rich-text-body> </ac:structured-macro> <p class="auto-cursor-target"> <br/> </p> <ac:structured-macro ac:macro-id="7b89afc4-d8a7-409f-9244-01d024769ec8" ac:name="report-variable" ac:schema-version="1"> <ac:parameter ac:name="name">WonOpportunity</ac:parameter> <ac:parameter ac:name="atlassian-macro-output-type">INLINE</ac:parameter> <ac:rich-text-body> <p class="auto-cursor-target"> <br/> </p> <ac:structured-macro ac:macro-id="b3b9376e-4773-4532-82df-ab3ea1cbba6e" ac:name="soql-reporter" ac:schema-version="1"> <ac:parameter ac:name="query">Select name,Account.name from Opportunity Where IsWon = true</ac:parameter> <ac:rich-text-body> <p> <ac:structured-macro ac:macro-id="2ea60381-83b5-4edd-9446-d773afe1bf1f" ac:name="text-filter" ac:schema-version="1"> <ac:parameter ac:name="contains">%data:AccountName>1%</ac:parameter> <ac:parameter ac:name="">sf:Account.Name</ac:parameter> </ac:structured-macro> </p> </ac:rich-text-body> </ac:structured-macro> <p class="auto-cursor-target"> <br/> </p> </ac:rich-text-body> </ac:structured-macro> <p class="auto-cursor-target"> <br/> </p> <ac:structured-macro ac:macro-id="e671f501-dca9-49a7-b77c-2a3f539f758f" ac:name="report-variable" ac:schema-version="1"> <ac:parameter ac:name="name">LostOpportunity</ac:parameter> <ac:parameter ac:name="atlassian-macro-output-type">INLINE</ac:parameter> <ac:rich-text-body> <p class="auto-cursor-target"> <br/> </p> <ac:structured-macro ac:macro-id="d50ec979-ec38-40da-bec2-9bdbc5c0247c" ac:name="soql-reporter" ac:schema-version="1"> <ac:parameter ac:name="query">Select name,Account.name from Opportunity Where IsWon = false</ac:parameter> <ac:rich-text-body> <p> <ac:structured-macro ac:macro-id="70edf11e-6f40-4dac-a4f1-ac4e65e608d3" ac:name="text-filter" ac:schema-version="1"> <ac:parameter ac:name="contains">%data:AccountName>1%</ac:parameter> <ac:parameter ac:name="">sf:Account.Name</ac:parameter> </ac:structured-macro> </p> </ac:rich-text-body> </ac:structured-macro> <p class="auto-cursor-target"> <br/> </p> </ac:rich-text-body> </ac:structured-macro> <p class="auto-cursor-target"> <br/> </p> <table class="relative-table wrapped" style="width: 42.0455%;"> <colgroup> <col style="width: 33.8491%;"/> <col style="width: 66.1509%;"/> </colgroup> <tbody> <tr> <th>Won Opportunities</th> <td> <div class="content-wrapper"> <p> <br/> </p> </div> <ac:structured-macro ac:macro-id="72963728-1557-400b-aa26-202f735e1a1b" ac:name="report-info" ac:schema-version="1"> <ac:parameter ac:name="">variable:WonOpportunity > size</ac:parameter> </ac:structured-macro> </td> </tr> <tr> <th>Lost Opportunities</th> <td> <div class="content-wrapper"> <p> <ac:structured-macro ac:macro-id="52b4266f-d202-447c-8a6f-353ef88bd75f" ac:name="report-info" ac:schema-version="1"> <ac:parameter ac:name="">variable:LostOpportunity > size</ac:parameter> </ac:structured-macro> </p> </div> </td> </tr> <tr> <th>Total Opportunities</th> <td> <div class="content-wrapper"> <p> <ac:structured-macro ac:macro-id="fef72eec-8db0-4908-a93d-3e417f517449" ac:name="report-info" ac:schema-version="1"> <ac:parameter ac:name="">variable:TotalOpportunity > size</ac:parameter> </ac:structured-macro> </p> </div> </td> </tr> </tbody> </table> <p class="auto-cursor-target"> <br/> </p> </ac:rich-text-body> </ac:structured-macro> <p class="auto-cursor-target"> <br/> </p> </ac:rich-text-body> </ac:structured-macro> <p> <br/> </p> <p class="auto-cursor-target"> <br/> </p> <p class="auto-cursor-target"> <br/> </p>



Steps

Part 1 - adding a chart

We'll start by creating a Chart macro that will display Salesforce Opportunity data.

  1. Add a Chart macro.
    Set the Type parameter to "bar", dataDisplay parameter to "before", and Columns parameter to "Opportunity Name" and "Amount" respectively.

  2. Then within the Chart macro, create a Report Table macro.
    Set its Injected parameter to "True".

  3. Within the Report Table macro, add a SOQL Reporter macro.
    Set its Query parameter to "Select Name,AccountId,Account.Name,Amount,Probability,CloseDate from Opportunity ORDER BY Account.Name, CloseDate".

  4. Within the SOQL Reporter macro, add a Text Filter macro.
    Set its Key parameter to "sf:Account.Name" and Contains Value parameter to "%data:AccountName>1%" respectively.

  5. Back within the Report Table macro, add 5 Report Column.
    Set their Titles to "Account Name", "Opportunity Name", "Amount", "Probability", and "Closed Date" respectively.

  6. In the "Account Name" Report Column macro, add a Report Info macro.
    Set the Key parameter to "sf:Account.Name".

  7. In the "Opportunity Name" Report Column macro, add a Report Info macro.
    Set the Key parameter to "sf:Name". 

  8. In the "Amount" Report Column macro, add a Report Info macro.
    Set the Key parameter to "sf:Amount". 

  9. In the "Probability" Report Column macro, add a Report Info macro.
    Set the Key parameter to "sf:Probability". 

  10. In the "Closed Date" Report Column macro, add a Report Info macro.
    Set the Key parameter to "sf:ClosedDate". 

  11. Back within Report Table macro, add a Report Empty macro.
    Write "No records found".

Part 2 - Summary dashboard

In this section we'll create a dashboard to show a summarized view of Salesforce Opportunities, based on the filter that we created in Part 1.

  1. Add a Deck of Cards macro 
    Set its id parameter to "OpportunitySummary".

  2. Within the Deck of Cards macro, add three Card macros.
    Set their Labels to "Opportunities Won", "Opportunities Lost or Not Yet Won", and "Overall Opportunities".

  3. Inside the "Opportunities Won" Card macro

    1. Add a Report Table macro and set its Injected parameter to "True".

    2. Within the Report Table, add a SOQL Reporter macro.
      Set its Query parameter to "Select Account.name,id,name, amount, owner.name, closeDate from Opportunity Where IsWon = true".

    3. Within the SOQL Reporter macro, add a Text Filter macro and set its Key parameter to "sf:Account.Name" and Contains Value parameter to "%data:AccountName>1%" respectively.

    4. Back within the Report Table macro, Add four Report Column macros.
      Set their Titles to "Name", "Amount", "Owner Name" and "Closed Date" respectively.

    5. In the "Name" Report Column macro, add a Report Variable macro.
      Set its Name parameter to "OppName" and set its Value parameter to "<YourSalesforceURL>%sf:Id%".

    6. Back within the Report Column macro, add a Report Link macro.
      Set its Key parameter to "variable:OppName" and write "%sf:Name%" . 

    7. In the "Amount" Report Column macro, add a Report Info macro.
      Set the Key parameter to "sf:Amount". 

    8. In the "Owner Name" Report Column macro, add a Report Info macro.
      Set the Key parameter to "sf:Owner.Name". 

    9. In the "Closed Date" Report Column macro, add a Report Info macro.
      Set the Key parameter to "sf:Closed Date". 


  4. Inside the "Opportunities Won" Card macro

    1. Add a Report Table macro.
      Set its Injected parameter to "True".

    2. Within the Report Table macro, add a SOQL Reporter macro.
      Set its Query parameter to "Select Account.name,id,name, amount, owner.name, closeDate from Opportunity Where IsWon = true".

    3. Within the SOQL Reporter macro, add a Text Filter macro
      Set its Key parameter to "sf:Account.Name" and Contains Value parameter to "%data:AccountName>1%" respectively.

    4. Back within the Report Table macro, add 4 Report Column macros.
      Set their Titles to "Name","Amount","Owner Name" and "Closed Date" respectively.

    5. In the "Name" Report Column macro, add a Report Variable macro.
      Set its Name parameter to "OppName" and the Value parameter to "<YourSalesforceURL>%sf:Id%".

    6. Back within the Report Column macro, add a Report Link macro.
      Set its Key parameter to "variable:OppName" and write "%sf:Name%" . 

    7. In the "Amount" Report Column macro, add a Report Info macro.
      Set the Key parameter to "sf:Amount". 

    8. In the "Owner Name" Report Column macro, add a Report Info macro.
      Set the Key parameter to "sf:Owner.Name". 

    9. In the "Closed Date" Report Column macro, add a Report Info macro.
      Set the Key parameter to "sf:Closed Date". 

  5. Inside the "Opportunities Lost or Not Yet Won " Card macro

    1. Add a Report Table macro.
      Set its Injected parameter to "True".

    2. Within the Report Table, add a SOQL Reporter macro.
      Set its Query parameter to "Select Account.name,id,name, amount, owner.name, stageName from Opportunity Where IsWon = false".

    3. Within the SOQL Reporter macro, add a Text Filter macro.
      Set its Key parameter to "sf:Account.Name" and Contains Value parameter to "%data:AccountName>1%" respectively.

    4. Back within the Report Table macro, add 4 Report Column macros and Set their Titles to "Name","Amount","Owner Name" and "Stage Name" respectively.

    5. In the "Name" Report Column macro, add a Report Variable macro.
      Set its Name parameter to "OppName" and the Value parameter to "<YourSalesforceURL>%sf:Id%".

    6. Back within the Report Column macro, add a Report Link macro.
      Set its Key parameter to "variable:OppName" and write "%sf:Name%" . 

    7. In the "Amount" Report Column macro, add a Report Info macro.
      Set the Key parameter to "sf:Amount". 

    8. In the "Owner Name" Report Column macro, add a Report Info macro.
      Set the Key parameter to "sf:Owner.Name". 

    9. In the "Stage Name" Report Column macro, add a Report Info macro.
      Set the Key parameter to "sf:StageName". 

  6. Inside the "Overall Opportunities " Card macro, do as follows:

    1. Add three Report Variable macros and set its Name parameters to  "TotalOpportunity","WonOpportunity" and "LostOpportunity" respectively.

    2. In the "TotalOpportunity" Report Variable  macro, add a SOQL Reporter macro.
      Set its Query parameter to "Select name from Opportunity". 

    3. Within the SOQL Reporter macro, add a Text Filter macro.
      Set its Key parameter to "sf:Account.Name" and Contains Value parameter to "%data:AccountName>1%" respectively.

    4. In the "WonOpportunity" Report Variable  macro, add a SOQL Reporter macro and set its Query parameter to "Select name,Account.name from Opportunity Where IsWon = true". 

    5. Within the SOQL Reporter macro, add a Text Filter macro.
      Set its Key parameter to "sf:Account.Name" and Contains Value parameter to "%data:AccountName>1%" respectively.

    6. In the "LostOpportunity" Report Variable  macro, add a SOQL Reporter macro.
      Set its Query parameter to "Select name,Account.name from Opportunity Where IsWon = false". 

    7. Within the SOQL Reporter macro, add a Text Filter macro.
      Set its Key parameter to "sf:Account.Name" and Contains Value parameter to "%data:AccountName>1%" respectively.

    8. Back within the "Overall Opportunities " Card macro, add a 3x2 table.

    9. In the first column of each cell, write  "WonOpportunity","LostOpportunity" and "TotalOpportunity" respectively.

    10. In the second column, add 3 Report Info macros for each row.
      Set their Key parameters to "variable:WonOpportunity > size" ,"variable:LostOpportunity > size" and "variable:TotalOpportunity > size" respectively.

Macro structure



Next

Part 5 - Combining all the components into one