Monday, July 8, 2013

RedirectHelp Page to Integrate Google Sites with Salesforce for Context-Specific Help

If you want to use Google Sites for contextual documentation in Salesforce, the following steps will enable your users to trigger a contextual search in your Google site when they click "Help for this Page":

  1. Deploy the RedirectHelp page to a public site in your Salesforce org
  2. Open your Google site
  3. Perform a search for any keyword (e.g., "help")
  4. Copy the resulting URL. It should look something like, https://sites.google.com/a/granite.edu/technology-playbook/system/app/pages/search?scope=search-site&q=help
  5. Edit the RedirectHelp page. Set the baseURL variable to the Google site query URL, with {#section} inserted as a placeholder for the query keyword
  6. Copy the public URL of the RedirectHelp page
  7. On the "Help Settings" page in Salesforce, set the Re-direct Help URL to the public URL you just copied


Note: When you are satisfied with the functionality of the RedirectHelp page, you should set the pause variable to "0" so that the redirect is instantaneous.

Additional Info

Google Sites is a great, cost-effective way to create documentation for customized, enterprise systems such as Salesforce. However, integrating the two is not seamless out of the box.

Salesforce's Help Settings allow one to specify a Re-direct Help URL, which can be set to the base URL for a Google site. For example: https://sites.google.com/a/example.com/help/


But the Google site would not know what to do with the default loc, target and section parameters that Salesforce automatically adds to the URL.

Since the section parameter really provides the contextual keyword for the Online Help request, it would make sense to perform a search through the Google site for the keyword whenever a user clicks "Help for this page". Deploying the simple RedirectHelp page achieves this goal without custom Apex or JavaScript.

Note: This solution was last tested in Summer '13 DE and EE orgs.