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.Create a new Visualforce page
- In your Salesforce instance, navigate to the Developer Console:

- Create a new Visualforce page:

Retrieve the dashboard's embed URL
- In a published Omni workbook or dashboard, click the Share button to open the share modal. You can also navigate to File > Document settings.
- Click Embed.
-
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.

-
Click the Copy button to copy the iframe URL. The example iframe URL below is for an Omni instance named
blobsrusand includes settings for Light/dark mode (prefersDark) and Theme (theme):
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.Prepare your dashboard for embedding
- 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.
- Click Share to open the share modal.
- Check the Include current filters option.
-
Copy the
<iframe>embed code. -
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}:
Create a new Visualforce page
- In your Salesforce instance, navigate to the Developer Console:

- Create a new Visualforce page:

- Paste the
iframecode you created in the previous step and save the page.
Optional: Create a Visualforce tab
If you want the dashboard to appear as its own tab in Salesforce:
- In Salesforce, navigate to Setup > Tabs:

- Create a new Visualforce Tab, selecting the Visualforce page you created in the previous step.
Add the embedded dashboard to an existing Salesforce object
- In Salesforce, navigate to Setup > Object Manager:

- Select the object where you want the dashboard to appear (for example, Account).
- Open the Page Layouts section and choose the layout you want to edit.
- Add a new section to the layout to hold the embedded dashboard:

- Drag the Visualforce Page component into the new section:
