Salesforce Live Agent Integration for Crownpeak DXM
Orginally appeared on Crownpeak's Github repository.
Salesforce'sLive Agent allows you to initiate a personalised live chat, based on how a customer or prospect is engaging with your site. Now with Snap-ins, you can also chat with customers in your apps. Even better, with multilingual support you can deliver the same great enterprise chat support around the globe.
In this Quick Start we will integrate Salesforce Live Agent with Crownpeak DXM, empowering editorial teams to choose when and where they want to place the Live Agent function in their sites. We will use a free Salesforce Development account, however, you will require a licenced version of Salesforce Live Agent to apply the exact same steps in your own environments.
Enables the deployment of Salesforce Live Agent into a Asset (page) managed by Crownpeak DXM, with full preview capabilities.
Create a Live Agent Skill to direct chat requests to the correct Agent.
In Salesforce, go toMy Development Account. Open the users account that you want to act as an Agent.Administer -> Manage Users -> Users -> Edit
N.B., Note, you may also use the Quick Find box to locate the menu option you require at any time:
Type ‘Users’ in the above and the menu option will be found.
Once you have selected the desired agent’s user account, switch on the option for them to access the function in Salesforce.
Save the user profile.
In the Quick Find box, type ‘Skill’.
Click on ‘Skills’. In the Skills window, click on ‘New’.
N.B., you will only see users that have the Live Agent check box selected in their profile in the Available Users box. We did this in the previous step. Your Profile list may be different to the one above as it will be specific to your organisation. You should select the profiles that the selected user/s will map to. e.g., if you have a Live Agent who will look after technical support then this could be a profile.
Create your chat button in Salesforce (optional)
N.B., this step is optional as you can apply your own buttons in Crownpeak DXM later if you would prefer to give the editorial team the option to change the button choice.
In the Quick Find bar enter ‘Static Resources’.
Open Static Resources.
Click on ‘New’.
Upload an offline button of your choice from your local desktop and save the resource.
Now repeat this step for an online button.
Create scripts to run your online and offline status on your site
Routing Information- To guide the site visitor to the Agent with skills to address their matter.
Chat Button Customization. Optional, assign the buttons uploaded previously to Salesforce to be used on the site. Note, you can also define other options, such as a Pre-chat Form (which you can use to generate an instant lead in Salesforce) and Post conversation URLs (to direct customers to where you want them to go after a chat session is complete i.e. a survey) etc.
Save the Chat Button options.
N.B., you will need a Site selected before you can save. If you do not have a site defined in Salesforce, then apply the following steps to create a site placeholder.
Create a Site by entering ‘Site’ in the Quick Find box or navigating toBuild -> Develop -> Sites
Complete the requisite entries in the Site similar to those shown above.
N.B., the details of the site, for this tutorial, are not important as we will not use this site. In essence, it is a placeholder only and we will apply the site in Crownpeak DXM.
Save the site.
Get the Script for loading the buttons in your site
In the Quick Find box type ‘Chat buttons’ and openBuild -> Customize -> Live Agent -> Chat Buttons and Invitations.
Open your Chat Button and Invitation created previously.
Scroll to the bottom and you will see your Chat Button Code Script, copy this script to your clipboard for later use.
Create a new Agent
In the Quick Find box enter ‘Live agent configurations’.
Open Live Agent Configurations.
Setup the client to your needs. In this example, the default set up was used.
OpenBuild -> Customize -> Live Agent -> Deployments.
Create your Live Agent Deployment and Save.
Open the Live Agent Deployment.
Copy the Script Tags to your clipboard, for later use.