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 plans, calculations, users, 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>
</apex:page>
Important:
- Make sure to specify your own URL (obtained in step 1)
- 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.