The Salesforce Module enables the Brightcove Interactivity Analytics engine to pass data directly to your Salesforce instance. The module will automatically create leads, contacts and campaign objects, or connect to existing objects. For advanced users, the module can be configured to work with Salesforce custom objects.
Reference documents
Setup
Requirements
- You must be an Enterprise Salesforce customer with access to "Integration with Web Service API"
- You must be an Enterprise Brightcove Interactivity customer and have the Salesforce Add-on added to your account; contact Brightcove Support to get that added
Salesforce setup
Create a "HapYak API" user record in Salesforce to provide secure access for the module.
User License | Salesforce |
Profile | Marketing Profile |
Marketing User | True |
Permissions | If you need finer grained security, you can create a custom permission set. The required permissions will depend on your specific configuration and may include read/write permission for the following objects:
|
Brightcove Interactivity setup
- Contact Brightcove Support to provision the Salesforce module on your account and to configure data mappings if you are using Custom Objects.
- Once the module is provisioned, login to your Brightcove Interactivity account and go to the account settings page to enter your Salesforce credentials. http://hapyak.com/portal/account
- Click "Salesforce: Connect" on the account settings and enter the Salesforce username, password, and security token for the HapYak API Salesforce user that you created.
Embedding page setup
A page into which you embed the Salesforce-connected project is responsible for defining a JSON Object with the end-user information to be tracked in Salesforce.
The information in the JSON Object will be used to create the necessary user (Lead/Contact/Custom) record to which the video activity events will be associated.
The JSON Object must contain the following properties:
Id | The Salesforce ID of the user viewing the video (Lead/Contact/Custom), if known. NULL is not known. |
FirstName | The given name of the viewing user |
LastName | The surname of the viewing user |
Company | The company's name of the viewing user. REQUIRED if no Id is not given. |
The email address of the viewing user. If no existing record is found with the provided email address, a new Salesforce record of the given Type will be created.REQUIRED if no Id is not given. | |
Type | "Lead", "Contact" or "Custom" |
It is highly recommended that you place the JSON Object in a standard page include file, just as the page header, to ensure that it is available on every page that might have a video embedded in it.
Example JSON Object:
<script>
window.hapyakSalesforceUser = {
'Id': '340093493',
'Email': 'kmorton@hapyak.com',
'Type': 'Lead'
};
</script>
Brightcove Interactivity Project configuration
Any project can be configured to be part of a specific Salesforce Campaign. To do so follow the instructions below.
- From the Project page, select "Configure", and then the "Salesforce" tab.
- Click "Enable" on the Salesforce tab.
- A list of existing Salesforce Campaigns will be dynamically populated. Select the existing Campaign to use or, if desired, select "New Campaign".
- "New Campaign" will automatically create a campaign named for the Project
- Click "Save".
- After changing the configuration you will need to generate new Embed code.
Full working example
<!-- JSON Object, place this on every page -->
<script>
var hapyakSalesforceUser = {
"Type": "Lead",
"FirstName": "Kyle-TestFeb20",
"LastName": "Morton",
"Company": "HapYak"
}
</script>
////////////////////////////////////
////////////////////////////////////
<!-- main standard hapyak library -->
<script type="text/javascript" src="//d2qrdklrsxowl2.cloudfront.net/js/hapyak.js"></script>
<!-- video container div -->
<div style="width:720px;overflow:hidden;height:405px;position:relative;">
<div id="hapyak-player-YE54SRkkQ1U-1615"></div>
</div>
<!-- video embed code -->
<script>
window.onYouTubeIframeAPIReady = function() {
var ytPlayer = new YT.Player("hapyak-player-YE54SRkkQ1U-1615", {
height: "405",
width: "720",
videoId: "YE54SRkkQ1U",
playerVars: {
controls: /(iPhone|iPad)/i.test(navigator.userAgent) ? 0 : 2,
html: 1,
playsinline: 1,
autohide: 1,
modestbranding: 1,
rel: 0,
fs: 0,
showinfo: 0,
wmode: "opaque"
}
});
hapyak.viewer({
apiKey: "4fd4493ed669474c8de5",
projectId: 2318,
trackId: 11071,
plugins: {
salesforce: { user: hapyakSalesforceUser }
},
resetVariables: true,
player: ytPlayer,
playerType: "youtube",
width: 720,
height: 405,
autoplay: false
});
};
</script>
<script src="//www.youtube.com/iframe_api"></script>