How Can I Embed Dashboards Into SalesForce

How Can I Embed Dashboards Into SalesForce


This article explains how you can embed incentive dashboards within SalesForce. 

Sales Cookie also supports SalesForce Connect. This allows you to natively retrieve Sales Cookie objects such as planscalculationsusers, etc. However, simple embedding of incentive dashboards is easier.

Step 1 - Get Your Sales Cookie URL
First, login to SalesCookie.

Next, click on "Incentives" on the left navigation bar.

       

Copy the displayed browser URL to the clipboard.



Your URL will include a workspace ID which identifies your workspace. In step 2, we will ask you to append "embedCode=1" to this URL.

All users (payees) will share the same URL, but they will be asked to login, and will only see their own statement. 

Step 2 - Create A Visualforce Page
We'll create a visual component called a VisualForce Page. This visual component is an IFrame which displays incentive dashboards.

First, login to SalesForce. Go to Setup, and search for "Visualforce Pages" in Quick Find.



Click on "New" to create a new Visualforce page and enter a label. Below, we entered "IFrame2", but you could use "Sales Cookie Dashboard" or "Commission Dashboard" instead. Make sure to check the checkbox shown below.



For the page's content, enter something like this.

<apex:page>
<iframe src="https://salescookie.com/app/Dashboard/MyIncentives/...?embedCode=1" style="border:none;" width="100%" height="1000"></iframe>
</apex:page>

Important:
  1. Make sure to specify your own URL (obtained in step 1)
  2. Make sure to append ?embedCode=1 to your URL

Step 3 - Create Lightning Page
We'll create a page whose only component is the one we built in step 2.

First, login to SalesForce. Go to Setup, and search for "Lightning App Builder" in Quick Find.



Click on "New" to create a new Lightning App, and choose "App Page".



Enter a label, and choose a layout such as "One Region".



Drag the VisualForce component from the left navigation bar, to the display region in the center.



On the right pane, select the VisualForce Page you created previously (using the provided dropdown). Previously, we called it "IFrame2", but you probably chose another name. Enable a large display height of 10,000 pixels.



Click on "Activation" and give a name to your App. Below, we chose "Sales Cookie Lightning", but you could use "Sales Cookie" or "Sales Commissions" instead. You can also choose a display icon.



On the same "Activation" dialog, click on the "Lightning Experience" tab. Add your new app to an existing App, such as the Sales Console.



Step 4 - Test Rendering
Browse to the Sales Console and click on "View All".



You should see the following:



After clicking on the link, you should see the incentive dashboard embedded within SalesForce.



Please note:
  • Only the incentive dashboard component of Sales Cookie is supported for IFrame embedding. We do not support other administrative functions (calculations, plans, users, teams, etc.)
  • Users will be asked to login. If you would like to avoid this, consider using Direct Access. However, you would need to create one component per user, configured to use their own Direct Access URL. Or, you would need more logic to dynamically fetch each user's Direct Access URL.
      
    • Related Articles

    • How Can I Embed Power BI Reports Into Sales Cookie?

      Ready to share exciting commission reports with incredible visuals with other Sales Cookie administrators or payees? This article explains how you can embed Power BI reports within Sales Cookie. This article assume you have already created a Power BI ...
    • How Can I Embed Web Content Within Sales Cookie?

      You can create and publish announcements to personal incentive dashboards. However, sometimes you already have some existing content you want to show within Sales Cookie. This could be: Sales resources Sales training guides Various documents (ex: ...
    • How Can I Embed "Slugs" In Announcements, Legal, Etc.

      Define Custom Variables Edit your user and click on the "Custom" tab. Add custom variables for this user. Note that the same variable can be defined multiple times (with different values and effective dates). Embed Custom Variable "Slugs" Edit your ...
    • How Does MFA Impact SalesForce Logins?

      If you want to establish a SalesForce connection within Sales Cookie, but your chosen SalesForce user account requires MFA (multi-factor authentication - also known as 2-factor authentication), authentication will fail. There are two ways to solve ...
    • How Can I Invite Users?

      There are two ways you can invite users: Send them an email yourself (recommended) Run the add user wizard Send Them An Email Yourself (Recommended) Invitation emails do NOT require any special invitation link. They can be sent directly by you to ...