Install WalkMe on Salesforce Lightning Communities Using Reverse Proxy
Let's get WalkMe to your users!
Salesforce Lightning Communities do not allow administrators to add the WalkMe Snippet into the HTML code, so we use a process called Reverse Proxy to deploy WalkMe.
Using Reverse Proxy
A Reverse Proxy does not require any configuration on the client side. Your users simply request the webpage and your proxy server will request the page from Salesforce with the WalkMe Snippet placed into the head of the page. This allows you to deploy WalkMe to all external users without asking them to install anything.
How it works
A Reverse Proxy allows you to modify the final webpage delivered to a user. In this case, the reverse proxy adds the WalkMe Snippet into the page head before delivering it to the end user.
The client (AKA user) requests the webpage using the URL on your domain. This is sent to your DNS but instead of simply delivering the webpage from Salesforce, it sends a request to the CDN server with the reverse proxy on it. The reverse proxy then request the page from Salesforce and places the WalkMe Snippet into the HTML code and delivers the page to the client.
Before you Get Started
To use Reverse Proxy to deploy the WalkMe Snippet you must have the following:
- A URL that is part of your domain for the community set up, e.g. community.companyname.com
- CDN server that can be configured as a reverse proxy
1. Getting Your CNAME URL from Salesforce
The easiest way to get the CNAME URL is to try and set up the Domain without a proxy setup. This creates an error message with the CNAME included.
- From Salesforce, click Setup
- Under Administer, click Domain Management
- Click Domains
- Click Add A Domain
- Type Domain Name for your community.
- Click Save.An error message will appear
- From error message, copy CNAME record that points to [domain].00dXXXXXXXXXX.live.siteforce.com. The CNAME is used to set up Proxy Server
- Continue to, 2. Setting up Your CDN Proxy Server
2. Setting up Your CDN Proxy Server
- From CDN server, create reverse proxy that relays your domain to the CNAME record copied from section 1. Getting your CNAME URL from Salesforce, [domain].00dXXXXXXXXXX.live.siteforce.com
- Setup a substitute filter to capture and modify the proxied requests as shown below. You must add the WalkMe Snippet URL to the code provided.
Find:
</headReplace:
<script type="text/javascript">(function() {var walkme = document.createElement("script"); walkme.type = "text/javascript"; walkme.async = true; walkme.src = "${WALKME_SNIPPET_URL}"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(walkme, s); window._walkmeConfig = {smartLoad:true}; })();</script></head - Make sure that the Host header of the proxied request keeps your custom domain, e.g. proxy_set_header Host $http_host;
- Make sure that the reverse proxy serves the custom domain over HTTPS.
- Wait 1 hour to allow the CDN to update before continuing to section 3. Create, Activate and Configure Your Domain in Salesforce
3. Create, Activate and Configure Your Domain in Salesforce
- From Salesforce, click Setup
- Under Administer, click Domain Management
- Click Domains
- Click Add A Domain
- Type Domain Name for your community.
- Click Save.
- From Domains in Salesforce, Click Activate next to your domain
- From your DHCP Server, Configure DNS record to your new proxy server
- From Domains in Salesforce, Click your domain to edit it. Domain Edit page appears
- Select, “You serve the domain over HTTPS, using your own CDN partner or your own hardware”
- Click Save. Domain Details page will appear
- From Custom URLs, click "New Custom URL"
- Type Site Name (AKA Community Name)
- Click Save
4. Testing Your Reverse Proxy Implementation
We highly recommend testing your implementation with the help of your CSM. To test your implementation, you must publish from the WalkMe Editor. Since Reverse Proxy requires that you publish only to a production environment, we suggest working with your CSM to ensure this has minimal impact on your end users.
When testing a new implementation you must publish the settings files associated with your editor account. You do not need to publish any specific content to see the WalkMe Player tab appear on your site. Publishing only setting files is often referred to as “Blank Publishing”.