Insights & Recommendations on Custom Objects
The Showpad Insights and Recommendations app is a robust tool that enables you to view:
-
all logged Showpad activity as Insights information

-
relevant Showpad content as Recommendations

As a Salesforce administrator, you can embed our app on specific object layouts to display a timeline of Showpad share and engagement insights and view relevant content recommendations. Straight out of the box, we support Salesforce's four default objects (contact, account, opportunity, lead), as well as any custom and non-sales objects.
- Custom object insights? Create an Apex controller extension with your email logic
- Custom object recommendations? Create a Visualforce page with the standard controller
- Both? Combine both approaches in a single Visualforce page
The app will only surface results for Salesforce users also present in the Showpad organization.
Insights logic
Generally the Salesforce default objects and recipient logic do not require modification. The information provided here is specifically about custom objects and/or email recipients logic for embedding the Showpad Insights & Recommendations app.
The Showpad Insights widget is a Canvas App embedded in a Visualforce Page with the relevant StandardController (which
has a parameters property that can be modified). The widget is populated with share and engagement information based
on relevant email addresses. For example, a sales rep initiates a Showpad email share to a designated recipient. Showpad
Insights then surfaces that share and its engagement on relevant objects.
The default logic for determining the relevant email addresses is defined in the included Apex controller extension of the Showpad for Salesforce package:
| Salesforce Object | Default Email Address Logic |
|---|---|
| Account | The email addresses of account contacts are used. |
| Opportunity | The email addresses of contacts added in opportunity roles are used. |
| Contact | The email addresses (default field) of the contacts are used. |
| Lead | The email addresses (default field) of the leads are used. |
As a Salesforce developer/admin you can create your own Apex controller and Visualforce page to:
- Override the default logic on any of the standard objects
- Embed the Showpad Insights timeline on any custom Salesforce object
Recommendations logic
Showpad admins can configure recommendation rules using all types of Salesforce fields (including text, multi-value, picklist, etc.) and fields on related or child objects (for example, products related to the opportunity). These rules link the tags of your assets with the Salesforce fields. Showpad content with the linked tag will be recommended when certain Salesforce criteria are met.
Recommended assets are presented to sellers ordered first by the number of matching rules and secondarily by the most recently updated date.
Configuration
Test all customizations in a Salesforce sandbox or Developer Edition before deploying to production.
To customize insights, you must have:
- Plan: Ultimate | Advanced or Expert
- Permissions: Administrator access to Showpad's Admin App
- Config:
- Connected your Salesforce organization to your Showpad account,
- Installed the Showpad for Salesforce app,
- Configured Showpad's Insights and Recommendations app and Visualforce pages,
- Experience with Visualforce and Apex.
1. Apex Class - Controller Extension (Insights only)
To surface Showpad insights based on relevant email addresses, you need an Apex class with a controller extension that assigns the email addresses to the Showpad Visualforce page (created in step 2).
A core element in the Apex class for you to modify is the specific Salesforce Object Query Language query that fetches relevant email addresses related to your custom object.
-
In Salesforce, click the gear icon and select Setup.

-
Navigate to Custom Code > Apex Classes and click New.

-
Update the following code with your own information and paste it into the Apex Class tab:
public with sharing class CustomObjectShowpadExtension {
public String customRecipientEmails {get;set;}
public CustomObjectShowpadExtension(ApexPages.StandardController controller) {
String currentRecordId = controller.getRecord().Id;
// adjust with your own logic, object and fields
Custom_Object__c myRecord = [SELECT Name, Id, Email_for_Showpad_Insights__c FROM Custom_Object__c WHERE Id=:currentRecordId LIMIT 1];
// note that this can also be a comma-separated list of multiple relevant emails
customRecipientEmails = myRecord.Email_for_Showpad_Insights__c;
}
}
Notes about naming- Apex Class - Note the name you give to your class. You'll need to reference it in the next step.
- Visualforce page variable - Do not use
recipientEmailsas the variable name. It conflicts with the Controller Extension included in the standard package and could result in an empty value.
-
Click Save.

2. Visualforce Page
Create a new Visualforce page with a standardController on your object to allow the Showpad Insights and
Recommendations app to be embedded on that record’s detail layout.
-
Navigate to Custom Code > Visualforce Pages and click New.

-
Enter a Label and Name for the page (e.g.,
showpad_app_custom_object), then replace the default code with one of the examples below.
Example (Recommendations only)
<apex:page standardController="Custom_Object__c" extensions="ShowpadForSF.ShowpadWidgetControllerExtension">
<apex:canvasApp
developerName="showpad_canvas_app"
parameters="{domain:{{subdomain}}, application: 'crm-widget'}"
entityFields="Id,Name"
width="100%"
maxHeight="infinite"
scrolling="auto"
height="100%"
/>
<apex:include pageName="ShowpadForSF__showpad_app_widget_sizing_logic" />
</apex:page>
Example (Insights and Recommendations)
<apex:page
standardController="Custom_Object__c"
extensions="ShowpadForSF.ShowpadWidgetControllerExtension,CustomObjectShowpadExtension"
>
<apex:canvasApp
developerName="showpad_canvas_app"
parameters="{
domain:{{subdomain}},
application: 'crm-widget',
recipients: '{!customRecipientEmails}'
}"
entityFields="Id,Name"
width="100%"
maxHeight="infinite"
scrolling="auto"
height="100%"
/>
<apex:include pageName="ShowpadForSF__showpad_app_widget_sizing_logic" />
</apex:page>
Replace {{subdomain}} with your own Showpad subdomain.
To surface insights without recommendations, include the showRecommendations: false property in the parameters
object. See the
Advanced Customization section
in the Help Center.
3. Embed on Record Layout
Embed your Visualforce page on the custom object’s detail layout. The following example is for a custom tab on a Lightning page.
-
From the gear icon, select Edit Page, then add a Visualforce component.

Was this page helpful?