React Code Example
The React example uses an express server for secure server-side programmatic filtering and for an Edit Embed experience. Download the sample code from the example GitHub repository to access even more detailed instructions in the readme file or check out example code: React sample code repo
Javascript Code Example
The JavaScript version uses a Node.js repository for secure server-side programmatic filters. Download the sample code from the example GitHub repository to access even more detailed instructions in the readme file or check out example code: JS sample code repo
.Net Code Example
Download the sample code from the example GitHub repository to access even more detailed instructions in the readme file or check out example code: ASP.NET sample code repo
- The ASP version is based on a .NET repository
SalesForce Code Example
Domo cards and dashboards can be privately embedded in Salesforce. This is accomplished with the same programmatic filters used for row-level security in other types of websites and software. In Salesforce, these invisible and immutable filters are driven by these Apex examples in Visualforce pages and Lightning web components. The functioning example in this GitHub repository can be deployed to production with minimal changes. Just focus on updating the filter logic and token storage. After you download the example, don’t forget these final three essential steps:
- Populate the 4 variables at the top of the “domoEmbedExampleController” with your Client ID, secret, embed ID, and embed type
- Add “http://api.domo.com” to your Remote Site Settings
- Add the code to your Lightning layouts using the Visualforce component type or add to existing Lightning Web Components or Visualforce pages with an iframe
- Download SFDC sample code repo