Developers
cancel
Showing results for 
Search instead for 
Did you mean: 

DXM Developer Knowledge Base

Salesforce Live Agent Integration for Crownpeak DXM

 

Orginally appeared on Crownpeak's Github repository.
 

Salesforce's Live 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.

Capabilities

Enables the deployment of Salesforce Live Agent into a Asset (page) managed by Crownpeak DXM, with full preview capabilities.

Live Agent in DXM Preview

Configuration Steps Setting up Salesforce
  1. Sign up for a free Salesforce Development account at https://developer.salesforce.com/signup and login to your account.
Create a Live Agent Skill to direct chat requests to the correct Agent.
  1. In Salesforce, go to My Development Account. Open the users account that you want to act as an Agent. Administer -> Manage Users -> Users -> Edit

    Salesforce Find User

    N.B., Note, you may also use the Quick Find box to locate the menu option you require at any time:

    Salesforce Search

  2. Type ‘Users’ in the above and the menu option will be found.

  3. Once you have selected the desired agent’s user account, switch on the option for them to access the function in Salesforce.

    Configure User

  4. Save the user profile.

  5. In the Quick Find box, type ‘Skill’.

    Salesforce Search Skills

  6. Click on ‘Skills’. In the Skills window, click on ‘New’.

    Salesforce Configure Skill

    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.

  1. In the Quick Find bar enter ‘Static Resources’.

    Salesforce Search Static Resources

  2. Open Static Resources.

  3. Click on ‘New’.

    Salesforce New Static Resource

  4. Upload an offline button of your choice from your local desktop and save the resource.

  5. Now repeat this step for an online button.

    Salesforce View Static Resources

You now have two buttons available for your site to show when an agent is online and offline. These buttons will be fetched by the imported JavaScript that you will create later in this tutorial.

Create scripts to run your online and offline status on your site
  1. In the Quick Find box enter ‘Chat buttons’.

  2. Open Build -> Customize -> Live Agent -> Chat Buttons & Invitations.

  3. Complete the following details:

    1. Basic Information

      Basic Information

    2. Routing Information - To guide the site visitor to the Agent with skills to address their matter.

      Routing Information

    3. 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.

      Chat Button Customization

  4. 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.

  5. Create a Site by entering ‘Site’ in the Quick Find box or navigating to Build -> Develop -> Sites

    Create Site

  6. 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.

  7. Save the site.

Get the Script for loading the buttons in your site
  1. In the Quick Find box type ‘Chat buttons’ and open Build -> Customize -> Live Agent -> Chat Buttons and Invitations.

  2. Open your Chat Button and Invitation created previously.

  3. Scroll to the bottom and you will see your Chat Button Code Script, copy this script to your clipboard for later use.

    Chat Button Code

Create a new Agent
  1. In the Quick Find box enter ‘Live agent configurations’.

  2. Open Live Agent Configurations.

  3. Setup the client to your needs. In this example, the default set up was used.

    Live Agent Configuration

    N.B., in the above configuration, you can setup how your Live Agent will function whilst in session. You can find more details at https://help.salesforce.com/articleView?id=live_agent_configuration_settings.htm&type=5

  4. Save the Live Agent Configuration.

Setup your Live Agent Deployment
  1. In the Quick Find box type ‘Deployments’.

  2. Open Build -> Customize -> Live Agent -> Deployments.

  3. Create your Live Agent Deployment and Save.

    Live Agent Deployment

  4. Open the Live Agent Deployment.

  5. Copy the Script Tags to your clipboard, for later use.

    Live Agent Deployment Code

    N.B., the deployment JavaScript that will control Live Agent functionality on your site will be stored in Salesforce and accessed through the Deployment Code.

    Whilst you could download and rebuild the JavaScript in your local web application, this is not recommended as the functionality is dynamic and using the method above will ensure future updates to your deployment’s functionality will automatically be applied to your site.

See https://github.com/Crownpeak/DXM-Integrations/tree/master/Customer-Relationship-Management-(CRM)/Sal... for the remainder of the article.

Labels (1)
Version history
Revision #:
4 of 4
Last update:
‎10-01-2019 09:20 AM
Updated by:
 
Looking for more?
Ask in Discussions
Developers

Peer-to-peer support  and answers on developing CMS templates, modifying privacy scripts or building integrations.

Digital Experience Management

Find answers and ask questions on content management, personalization and targeting.

Digital Quality Management

Find answers and ask questions on WCAG and SEO quality management.

Digital Governance

Find answers and ask questions on consent and monitoring solutions.