Skip to main content
Want to put Omni analytics right where your sales team already spends their day? Embedding dashboards directly in Salesforce means reps can see account-level metrics, pipeline trends, or usage data without switching tabs - and dynamic dashboards can automatically filter to whichever record they’re viewing. In this guide, we’ll walk through two approaches: embedding a static dashboard as its own Visualforce page, and embedding a dynamic dashboard that parameterizes filters based on the current Salesforce record.

Requirements

To follow this guide, you’ll need:
  • Permissions in Omni that allow you to access the dashboard you want to embed
  • Permissions in Salesforce that allow you to create Visualforce pages and modify Salesforce objects

Embedding static dashboards

In this example, you’ll embed a static dashboard into a new Visualforce page. Unlike dynamic (parameterized) dashboards, the content of static dashboards doesn’t change.
1

Create a new Visualforce page

  1. In your Salesforce instance, navigate to the Developer Console: Salesforce Developer Console menu option
  2. Create a new Visualforce page: Creating a new Visualforce page in the Salesforce Developer Console
Leave the page open for now - you’ll need it later in the guide.
2

Retrieve the dashboard's embed URL

  1. In a published Omni workbook or dashboard, click the Share button to open the share modal. You can also navigate to File > Document settings.
  2. Click Embed.
  3. If desired, use the options in this tab to customize what content is embedded and how it displays for users. For example, you could embed a dashboard and only display it in dark mode. See Customize embedded content for more information. Omni share modal with embed options
  4. Click the Copy button to copy the iframe URL. The example iframe URL below is for an Omni instance named blobsrus and includes settings for Light/dark mode (prefersDark) and Theme (theme):
    <iframe src="https://blobsrus.omniapp.co/dashboards/a0554a7e?prefersDark=true&theme=dawn"></iframe>
    
3

Add the iframe to the Visualforce page

In Salesforce, add your iframe code to the Visualforce page you created.In this example, we added styling elements that will allow the dashboard to fill the whole page:
Visualforce page with added styling elements
<apex:page sidebar="false">
  <style>
    html { 
      width: 100%; 
      height: 100%;
    }
  </style>   
  
  <apex:iframe scrolling="true" width="100%" height="100%" src="https://blobsrus.omniapp.co/dashboards/a0554a7e">
  </apex:iframe>
</apex:page>

Embedding dynamic dashboards

To make your dashboards dynamic, you can parameterize the filters in the iframe URL with Apex variables. In this example, you’ll embed a dashboard that dynamically filters data based on the Salesforce account that is currently being viewed and add it to an existing Salesforce object.
1

Prepare your dashboard for embedding

  1. In your Omni dashboard, add a filter on the field you want to parameterize (for example, Account ID). This filter should not be one of your default filters.
  2. Click Share to open the share modal.
  3. Check the Include current filters option.
  4. Copy the <iframe> embed code.
  5. In a text editor, locate the filter value in the URL and replace it with the Apex variable you want Salesforce to pass through. For example, replace the hard-coded Account ID with {!Account.Id}:
    <apex:page standardController="Account">
      <apex:iframe
        scrolling="true"
        src="https://blobsrus.omniapp.co/dashboards/a0554a7e?f--salesforce__account.id=%28%27kind%21%27EQUALS%27%7Etype%21%27string%27%7Evalues%21%5B%27{!Account.Id}%27%5D%7Eis_negative%21false%29O_O">
      </apex:iframe>
    </apex:page>
    
Keep the code handy - you’ll need it to complete the next step.
2

Create a new Visualforce page

  1. In your Salesforce instance, navigate to the Developer Console: Salesforce Developer Console menu option
  2. Create a new Visualforce page: Creating a new Visualforce page in the Salesforce Developer Console
  3. Paste the iframe code you created in the previous step and save the page.
3

Optional: Create a Visualforce tab

If you want the dashboard to appear as its own tab in Salesforce:
  1. In Salesforce, navigate to Setup > Tabs: Salesforce Setup Tabs page for creating a new Visualforce tab
  2. Create a new Visualforce Tab, selecting the Visualforce page you created in the previous step.
The tab will now be available to users and will open an interactive, embedded dashboard.
4

Add the embedded dashboard to an existing Salesforce object

  1. In Salesforce, navigate to Setup > Object Manager: Salesforce Setup Object Manager page
  2. Select the object where you want the dashboard to appear (for example, Account).
  3. Open the Page Layouts section and choose the layout you want to edit.
  4. Add a new section to the layout to hold the embedded dashboard: A new, blank section added to a Salesforce page layout
  5. Drag the Visualforce Page component into the new section: Dragging the Visualforce Page component into a Salesforce page layout section
    Click the wrench icon to adjust the size of the iframe.
5

Confirm the embedded dashboard works

Your dashboard should now load dynamically, using the Salesforce record’s ID to parameterize the embedded Omni dashboard. 🎉Visit a record (e.g., an Account page) and verify that the correct data displays.