Overview
This article provides a step-by-step guide on how to embed AdvocateAnywhere challenges into a Salesforce object using a Visualforce Page. It includes code snippets and images to assist with the process.
Information
Follow these steps to embed AdvocateAnywhere on a Salesforce object, ensuring you replace placeholders with your specific instance details.
Creating the Visualforce Page
Begin by creating a Visualforce Page in your Salesforce instance with the necessary markup to embed your AdvocateAnywhere challenge.
1. Create your AdvocateAnywhere challenge.
2. Open your Salesforce instance and navigate to Setup > Build > Develop > Visualforce Pages.
3. Click the 'New' button to create a new page.
4. Name your Visualforce page appropriately.
5. In the Visualforce Markup section, paste the following code:
<apex:page standardController="Contact" tabStyle="Contact" applyBodyTag="false" applyHtmlTag="false" showHeader="false" standardStylesheets="false"> <style> table#bodyTable td#sidebarCell { width:327px; } table#bodyTable td#sidebarCell div.sidebar { width:auto; } </style> <script src="https://jago.influitive.com/embed.js" data-infl-hub="jago"></script> <div class='infl-embed' style='width:327px;'></div> </apex:page>
Note: Replace https://jago.influitive.com with your hub instance URL and "jago" with your hub subdomain in data-infl-hub="jago".
Note: To have the AdvocateAnywhere widget slide out of the side of the page, remove class='infl-embed'.
6. Save your Visualforce page.
Embedding the Visualforce Page
Once the Visualforce Page is created, add it to a Salesforce object layout, such as the Contact object.
7. Navigate to Setup > Build > Contacts > Page Layouts.
8. Click edit on the layout you wish to modify.
9. Select Visualforce Pages from the menu.
10. Drag your Visualforce Page to the desired location on the layout.
11. Set the height of the Visualforce Page to 600 pixels in the properties.
12. Save the layout and view a contact to see the embedded AdvocateAnywhere challenge.
FAQ
What is AdvocateAnywhere?
AdvocateAnywhere is a feature from Influitive that allows you to embed challenges and advocate marketing campaigns directly into your web properties, including Salesforce objects.
How do I customize the Visualforce Page for my Salesforce instance?
You can customize the Visualforce Page by editing the markup to include your specific hub instance URL and subdomain. Additionally, you can adjust the style and behavior of the embedded widget as needed.
Can I add the AdvocateAnywhere widget to other Salesforce objects besides Contact?
Yes, you can add the AdvocateAnywhere widget to any Salesforce object that supports Visualforce Pages by following a similar process to the one outlined for the Contact object.
Priyanka Bhotika
Comments