Embed Insights on Your Salesforce Account Profile

Knowledge Center > Insights > Setup and Administration > Embed Insights on Your Salesforce Account Profile

Embed Insights on Your Salesforce Account Profile

Table of contents

To embed an Insights Account Dashboard on your Salesforce Account Page:

  1. Ensure you have completed prerequisites:
  2. Create a new Visualforce Page in Salesforce.
    • In Salesforce, go to Setup.

    • In the Setup search box at top left, enter Pages.

    • Select the Visualforce Pages setup menu item.

       
    • At the top of the Visualforce Pages list, click the New button.
    • Complete the Visualforce Page Edit form as follows:
      • Label: Insights Account Profile
      • Name: Insights_Account_Profile
      • Description: Optionally enter anything you like here.
      • Available for Salesforce mobile apps: Leave unchecked.
      • Require CSRF protection on GET requests: Leave unchecked.
      • Visualforce Markup: Replace the sample code with the APEX code block provided by the Insights Salesforce Embed page pictured below (Go to: Settings > Salesforce Integration > Salesforce Embed and copy the code in the grey box).

         
      •  Click Save
  3. Add the Visualforce page you just created to your Salesforce Organization Account Page Layout.
    1. In Salesforce, go to Setup.
    2. Under App Setup, click Customize > Accounts > Page Layouts

       
    3. Click Edit for the Page Layout you are using on your Account pages
    4. Create a new Section to the page that will contain the Insights Embed
    5. Find the Visualforce page you just created from the menu and drag it to the new section.
    6. Edit the embedded page (using the wrench to the top right of the embed) to expand the height to 400 pixels. Save, and reload the page.
    7. After you are finished, you will have an embed like the one pictured below on your Salesforce Account pages.

 

Going Further

Since not all of your Salesforce accounts will have corresponding Insights accounts, it is recommended that you add conditional content into your Visualforce page that disables rendering of the Insights embed in cases where there isn't a matching salesforce_id. This will let you provide a custom error message that is relevant to your organization's use of Salesforce and Insights.

Below is an Apex code example:

<apex:page standardController="Account" cache="false">
<apex:outputPanel rendered="{!NOT(ISBLANK(account.mrr__c))}">
<apex:iframe height="400px"
src="https://app.dev00.insights.zuora.io/data/salesforce/account/{!account.Id}?sessionId={!$Api.Session_ID}&serverUrl={!URLENCODE($Api.Partner_Server_URL_230)}&apiToken=hUYFGKdrQuIYMpiRbBMARMBNPqtISigs&userId={!$User.Id}&embed=true">
</apex:iframe>
</apex:outputPanel>
<apex:outputPanel rendered="{!ISBLANK(account.mrr__c)}">
<p>This Account is not currently tracked in Zuora Insights.</p>
</apex:outputPanel>
</apex:page>

The above is based on creating a custom field in Salesforce called MRR__c whose values are synced from Insights using outbound data sync.

Last modified

Tags

This page has no custom tags.

Classifications

(not set)