How To

  • Admin News: Critical Updates and Product Retirements

    It’s that time of year again, with the Winter ’20 Release approaching. And with each release, there are a number of Critical Updates. In addition this release highlights a number of products are also inline to be retired over the coming year.

    Let’s take a look at what these important updates are and how to prepare for the transition.

    Critical Updates: Know the impact

    Every release has a number of Critical Updates. These allow admins/developers to plan for a change to the platform by giving some control over when the update is released.

    Background: What are critical updates?

    For example, as an Admin/Developer you can choose to activate a Critical Update before its planned activation date. For example, this means if you have a sandbox environment you can choose to activate the update and test any impacts on your org.

    These updates can be many and varied, some with limited impact (if any) to end users, for example by updating how HTML code is handled/displayed to a user.

    Other updates, will have a very noticeable impact. Like the upcoming Lightning Experience critical update.

    Winter ’20 Release: Critical Updates

    Let’s take a look at the some of the highest potential impact updates coming our way. These are Updates which are ‘enforced’ by Salesforce in this release… Meaning they will be activated automatically as part of Winter ’20 release.

    Lightning Experience for Users

    Who will this impact? This one will automatically impact users who have the ‘Lightning Experience User’ permission.

    Salesforce Lightning Experience across multiple devices
    Even Astro loves Lightning Experience…

    They may have this permission because they are:

    • allocated to a Standard Profile (these are the ones you can modify that ‘come with Salesforce’)
    • a Custom Profile which was cloned from a Standard Profile after Winter ’16 release,
    • have a Permission Set which includes the ‘Lightning Experience User’ permission.

    When? Salesforce will activate this Critical Update is globally throughout October.

    What you can do to prepare: Read up on the update here, and also read the Frequently Asked Questions.

    The Lightning Transition Assistant, will also help give you information specific to your org on the transition. And will include things like what likely wouldn’t work in Lightning, which profiles are ready to go, etc./

    Also, keep in mind that users will be able to still switch between Lightning and Classic. So that is a small grace, if you need it. But note that Users will be automatically switched back to Lightning at the start of each week.

    Security Updates for Email and HTTPS Connections

    What is the change? From a high level, these updates improve the general security and functionality of Email and how your browser connects with Salesforce.

    Specifically, there are a number of updates to take note of:

    Who will this impact? All Salesforce orgs, with users and API connections potentially impacted.

    For example, the TLS 1.2 changes may impact users with old browsers. While the update re: DKIM Key is used as a way to potentially avoid spam filters in email clients.

    When? As part of Winter ’20 release (throughout October). You can check the specific date for your org by going into “Critical Updates” in your Setup menu.

    What you can do to prepare: Review the release notes above. Most of these changes shouldn’t require a ‘heavy lift’ from admins.

    Note re: the TLS 1.2 change, a quick review how users are connecting currently should confirm they are using modern browsers. If you remember the TLS 1.0 deactivation, the steps would be very similar here. Users on current browsers should be fine – and API connections which are ‘hard coded’ to use TLS 1.1 may not connect once update is activated.

    API Only Users Can Access Only Salesforce APIs

    Who will this impact? Any user which has the ‘API Only User’ permission. This update ensures that these users ONLY can access Salesforce via API, and not via UI.

    When? As part of Winter ’20 release.

    What you can do to prepare: This one is probably the simplest. If you have a user which is impacted and they need more access – an Admin can update their permissions to not include the ‘API Only User’.

    A note for Admins: Other Critical Updates

    There are a number of Critical Updates, and each org is different, this means high impact updates for your environment may not be covered here. So it is recommended that you check the release notes for a full overview of all Critical Updates.

    Caution: Product Retirement Ahead

    Over the coming year, we see three products entering the ‘transition to retirement’.

    The good news is, two of these products have direct replacements/upgrades available – so if you are still using them, you can start to plan your transition now.

    Original Territory Management Is Being Retired

    The first product on the list, is the Original Territory Management module (or Territory Management v1.0).

    Salesforce launched the beta of Enterprise Territory Management in 2014. and has been adding new features and functionality to Enterprise Territory Management (Territory Management v2.0) over the last few years.

    It has now been built into a more advanced version for managing territories, and ties exclusively into Collaborative Forecast module (and in turn Lightning Experience).

    When?

    As part of Summer ’20 release next year, which is likely to be around May/June 2020.

    Why?

    As Salesforce are pushing the Lightning Experience Transition, starting with this release (see above). They are clearly taking the opportunity to retire the Original Territory Management and Customisable Forecasting (see below) – and give an additional reason for users on the older products to upgrade and switch to Lightning Experience.

    Admin actions:

    Simply put, if you are still using Territory Management 1.0, now is the time to start planning your upgrade to Territory Management 2.0.

    You can read more about the considerations and planning for the transition here.

    Also, there is a key step when you are ready to transition where you may need to contact Salesforce Support to ensure users don’t lose access to old data as part of the migration. Read more here.

    Note: If you are using Customizable Forecasts (see below), you will need to plan the update to Collaborative Forecasts at the same time as the modules are dependant on each other.

    Customizable Forecasts Also Entering Retirement

    Other than being spelt the American way, the time has also come for Customizable Forecasts.

    Much like Enterprise Territory Management, there have been countless improvements made to Collaborative Forecast module over the last two years.

    I remember a time when it couldn’t even handle custom fiscal years! And Quotas were only able to be entered by API/Dataloader until recently.

    But the key here again, is that it ties exclusively into Enterprise Territory Mangaement (TM 2.0) and of course Lightning Experience…

    When?

    As part of Summer ’20 release next year, which is likely to be around May/June 2020.

    Admin actions:

    Now is the time to start planning your upgrade to Collaborative Forecasts.

    If you are using Original Territory Management, you need to also plan the update to Territory Management 2.0.

    You can read more about the considerations and planning for the transition here.

    RIP Data.com Prospector and Clean

    The final ‘old horse’ being putting out to the retirement pastures soon will be Data.com Prospector and Clean.

    With GDPR forcing a rethink of how data is managed and processed. The offering for Data.com become quite limited in certain territories (specifically in the UK/EU).

    Additionally, a change to licensing from D&B / etc, has meant changes to the product where inevitable.

    Salesforce has worked with a number of data providers to package and distribute what is now coined ‘Lightning Data‘ via the Appexchange. This now also gives you access to additional products and services, and no doubt more will come online over time.

    When?

    Depends on your contract, Salesforce will essentially stop renewing this product as part of your subscription.

    And the products will be retired in July 2020.

    Admin actions:

    You can read the FAQs here, and if you use the service your AE will likely be in touch to discuss options as part of the renewal process.

    The main actions for Admins will be to prepare reports/workflows/apex/etc to stop using Data.com specific fields. You can read the Salesforce guide here.

  • Getting started with VS Code for Salesforce

    So confession. I am like using and am quite comfortable using the Force.com IDE/Eclipse and even Developer Console when I do dev work. Have I used VS Code for Salesforce before? Nope! Force.com IDE is my go-to and I have been using it for a number of years…

    But as you may have picked up, Salesforce has been starting to push users to switch over to VS Code with the retirement of the Force.com IDE v2 beta in Spring ’18 release.

    Additionally to develop with features like Salesforce DX, you need to switch to VS Code. So let’s take a look at what VS Code is, how to get it setup and how to deploy your first class to a sandbox…

    What is VS Code?

    Firstly, if you haven’t heard of VS Code (or Visual Studio Code). It is a light-weight, open-source, code editor. And it is optimised for building and debugging modern web/cloud applications.

    The core features include:

    • Intelligent code completion
    • Syntax highlighting
    • Embedded GIT control
    • Support for debugging
    • Extendable via plugins/add-ons (which is how Salesforce comes into the picture)

    It is a free tool to download, and runs on most major Operating Systems (Windows, Mac, Linux). And isn’t based on Java, instead using the Electron framework to build cross-platform desktop support, essentially using web technologies.

    Most importantly, don’t confuse it with Visual Studio which is used primarily for .Net related programming languages and is only available on Windows.

    What’s behind the change?

    Well, the simple answer, is that VS Code was an easy platform to use, to give Salesforce the Command Line interface needed for Salesforce DX development via a VS Code plug-in.

    But personally I feel, there is a bigger motive behind what we are now seeing over the last year or two for Salesforce re: platform development (and features like Salesforce DX becoming available)…

    Most Dreaded Platform…

    See, historically Salesforce has been receiving overall negative reviews from Developers, and has typically featured in the top 5 (if not the top position) of ‘most dreaded’ lists from yearly developer surveys on sites like StackOverflow.

    As seen in the 2015 Developer Survey, Salesforce achieving the infamous achievement of ‘Most Dreaded’ platform.

    The surveys since don’t fare much better, including the latest 2018 survey with Salesforce in the top 3 ‘most dreaded’…

    Personally, when talking to a number of .Net developers over the years, I am not surprised by these results. Even though APEX is similar to other languages, there are a number differences between developing for a cloud-based platform like Salesforce vs a .Net application. And there needs to be…

    But things like Salesforce governor limits, take on a huge focus when developing for Salesforce (hello, bulkification), and it does force you to think differently about how you solve a problem. But I digress…

    Additionally, the fact most developers don’t use Eclipse as an IDE… But instead prefer to use VS Code as a development environment, we can start to see why Salesforce is heading in the direction it is:

    VS Code ranks as #1 favourite Development Environment for Web Developers.

    Additionally we are seeing a renewed focus from Salesforce on improving the overall development experience over the last few years. Features like Salesforce DX/scratch orgs, Lightning Components (using more standardised web-development languages, eg Javascript) and now with Spring ’19, Lightning Web Components.

    Salesforce is clearly making a play to smooth the development experience for developers, primarily for other web-platform developers, who aren’t familiar with Salesforce.

    Why? Well, in my opinion by implementing a way to allow someone to develop on Salesforce, but with no specific Apex/Visualforce knowledge, they are growing the overall developer market and making the platform more flexible overall for developers.

    What does VS Code offer Force.com Developers?

    So that is it for the history lesson part of this write-up! Now let’s take a look at what VS Code might offer us Force.com Developers who are used to Force.com IDE…

    The main take-aways for me out of the video are:

    • Track changes easily to source XML
    • Replay Debugger, being able to ‘step through’ the code now and see variables at runtime, all based on the debug logs. This is relatively new thing for Salesforce, but is common in other development languages. And will streamline how you handle debugging of processes
    • Support for Scratch Orgs vs ‘normal’ Sandboxes/Production
      • Scratch Orgs give you a disposable/throw away development environment and can be spun up instantly. (Think Salesforce DX).
      • Package Development Model, is similar to what you are probably used to in Force.com IDE, allowing you to push/pull into development/trial sandboxes or production environments.

    How-to Guide: Getting Started with VS Code

    So let’s go…

    When I was trying to install and get my development environment setup I had to jump around to multiple sites to try and figure out how everything works together. So I am trying to collate this all into one spot as I learn myself…

    But please note, as I am going through and teaching myself about VS Code and writing this, there may be quicker ways to do things. If you have any of these tips, please feel free to add them in the comments section at the end of the article!

    Welcome to VS Code...  Your new development environment.
    Welcome to VS Code… Your new development environment.

    Gettings Started #1. Installing and setting up VS Code

    Downloading and installing VS Code

    First up, you will need to download VS Code. I will assume your machine can handle VS Code… And it is free and available to download for Mac/Windows/Linux from here.

    Setup VS Code for Salesforce

    You will also need to install the Salesforce CLI package, as the Salesforce extensions for VS Code (the next step) require this package to be installed on your machine. So jump over to here to download and install it.

    Salesforce Extensions

    The final step to getting VS Code up and running, and before we start on our first project, you will need to also install the Salesforce Extensions for VS Code.

    These are freely available in the VS Code ‘marketplace’ (think the App Exchange for Salesforce, or Chrome Web Store for Chrome Extensions).

    Click here, and click the green ‘Install’ button. You should then be prompted to open the link in VS Code. You will then see another pop-up with ‘Install’ button. Click it, and then VS Code should install/restart.

    Other Extensions

    There are a number of other Salesforce related extensions available. I won’t cover them here, but you can easily search the Marketplace and find other relevant extensions/packs.

    This is one advantage of being an open-source platform, anyone who wants to can develop and share an extension/plugin if that wanted to…

    Learning Basics of VS Code

    To learn the basics of VS Code, Microsoft has a ‘Get Started’ section on the VS Code website. These video cover the basics of:

    • Navigating around VS Code
    • Debugging
    • Using Intellisense (the code completion/suggestion feature like Content Assist in Eclipse)
    • Version Control (using VS Code with GIT)

    My first impression was a little confronting. This might not be the case if you are use to command line development (CLI), but after coming from Eclipse where most things are point and click, it was a little bit of ‘gee, what do I do now?’

    The main thing to learn and start to get comfortable with is the Command Palette, as this is how you will navigate and access the commands within the tool:

    command palette
    VS Code: The Command Palette

    I would urge you to take a look at the Tips & Tricks page from Microsoft on VS Code too. It includes print outs of the keyboard shortcuts and a number of other useful details.

    Getting Started #2. Creating your first Project

    There is a useful Wiki published on the Salesforce DX Github page, and it outlines the types of projects you can work (scratch orgs vs developer/trial sandboxes/etc) and how to get started with the various Command Palette commands.

    The two models you should be aware of (sourced from the below guide on GitHub) are:

    • Org Development Model – which is similar to what you are probably doing now if you use Force.com IDE. And is where you connect to an environment (eg Sandbox, Developer, Trial, or Production org) and then develop/deploy code directly into that environment.
    • Package Development Model – is the second type of development model and this is where you would ultimately connect to a scratch org for development. To read more about this, click here.

    The commands you use in the Command Palette will depend on the development model you are trying to setup and code with… There is a full guide for both development models here.

    But for the purposes of this post though, I am going to setup and connect to a Developer Sandbox via the Org Development Model.

    Open the Command Palette

    To get started, open the Command Palette (on a Mac, which I am using press CMD+SHIFT+P), and in the Command Palette type in:

    SFDX: Create Project with Manifest 
    Command Palette: SFDX: Created Project with Manifest

    Then, the Command Palette will ask you for the name of your project, so type in a Project Name and press enter. I am just calling this ‘My First Project’ for this guide…

    Command Palette: Enter the Project Name

    Then you should get a pop-up window asking you to confirm the location to save it on your local machine. (This is similar to the Workspace location in Force.com IDE).

    In the pop-up window, confirm the folder location and click ‘Create Project’:

    Choose your Project folder location

    You will then see your Project open in the Explorer (on the left hand side):

    Explorer: ‘My First Project’ is now ready to start…

    Getting Started #3. Find your sfdx-project.json file

    This file should have created as part of the project, and is where you store the configuration information, like which environment you want to connect to.

    You can read more about this file here or here.

    For this demo, I will update the URL to login to a sandbox to https://test.salesforce.com, and save the changes to the file:

     "sfdcLoginUrl": "https://test.salesforce.com",
    Project: Editing sfdx-project.json file

    Gettings Started #4. Let’s get connected…

    We need to start the process of essentially connecting and logging in to the environment we want to login to.

    Now, open up the Command Palette again and type in:

    SFDX: Authorize an Org

    As you type, you will now see a number of new SFDX commands available too. But for now, just select the Authorize Org option and press enter.

    Command Palette: Authorize an Org

    The Command Palette will then prompt you for which environment type to login to. You can select ‘Project Default’ as we already updated the sfdx-project.json file already.

    Setting up a Project: Select Project Default

    And then you will also be prompted for an Org Alias, you can press Enter and accept the default name, or specify a custom alias.

    Setting up a Project: Select an Org Alas

    Now, VS Code and the Salesforce Extension will open up your browser and take you through the normal login flow. In this example, I have Lightning Login also setup (just to demo that this also works).

    As you go through the login, if this is the first time for the environment you may also see a ‘Global Connected App’ authorisation, just click Allow.

    Meanwhile, back in VS Code, you should see a little pop-up on the bottom right hand side now confirming login has been completed:

    SFDX: Authorize an Org successfully ran.

    Getting Started #5. Retrieve your Source

    Now we are authorised, we can go ahead and look and downloading our source components.

    You will need to first check you package.xml, which is where information on what to download/retrieve is stored. You can find the documentation on the .xml file here.

    But imagine this step, being similar to Force.com IDE where you select which components you want to download from the environment.

    And keep in mind, this step is only for when you connect to a developer, trial, production environment. If you go and use scratch orgs, you won’t have to do this step.

    In the Explorer under your Project, find the folder ‘manifest’. This is where you will find the Package.xml file.

    By default, it includes the APEX components, Aura Bundles and Static Resources, but you can add to it if you wish.

    Package.xml contains what elements you will retrieve from the server.

    Now with the Package.xml ready, you can commence the download/retrieval of the elements.

    Here, instead of using the Command Palette, you will need to right-click on the file in the Explorer, and select the option:

    'SFDX: Retrieve Source from Org'
    Explorer: Right-click and select ‘SFDX: Retrieve Source in Manifest from Org’

    Gettings Started #6. Work with your code…

    You will get another little notification once it has completed downloading, and now you can navigate to the code!

    Navigate via the Explorer, to force-app -> classes -> find the Apex Class you want to work with and double click on it to open the editor. Then this part should feel very similar to Eclipse.

    Use Explorer to navigate to your Class/Trigger/Aura/etc to start working with it.

    Now you can start your coding. To use features like Intellisense (the auto-suggestion feature), you can select CTRL-Space (on Mac, though I assume similar on Windows) to up the pop-up:

    VS Code: Intellisense auto-suggestion/completion for your code

    As you you coding too, you will see in the bottom left hand side of the screen an Errors and Warning notification. You can simply toggle the Panel to display by clicking on the icon (or CMD-J on Mac).

    This Panel, then displays the Problems, Output, Debug Console and Terminal (if you need them).

    Problems via the Panel will look very familiar to you if you have used Eclipse (or Developer Console):

    Panel: Displaying Problems, like syntax issues / etc

    Gettings Started #7. Deploying your code back to Sandbox

    And finally, when you are ready to push the code back to the server. You can right-click on the class again, and then select ‘SFDX: Deploy Source to Org’.

    SFDX: Deploy Source to Org

    Getting Started #8. Deploying to Production?

    Salesforce don’t recommend using the above ‘Deploy Source to Org’ to move things into Production. Instead they advise developers to use the Packaging feature.

    For now, this is just a how to get started guide… But if you are ready to move your code to a Production environment, please read more about this over here.

    Extra Reading: Migrating from Force.com IDE to VS Code

    The final guide for you, is if you want to migrate your workspace and projects over from Force.com IDE. into VS Code

    Salesforce has included instructions you can follow, to migrate your packages into VS Code. To read more, click here.

    Wrapping up

    So this is just the start. But we have now connected to a sandbox, worked with our first Apex Class and Deployed it back into the Sandbox.

    There are a lot of other features which will be covered in another post shortly (like working with source control/repository and debugging). But for now, happy coding!

    And as I mentioned at the start of the guide, if you have any shortcuts / tips or suggestions, please add them in the comments below!

    Appendix: Other Resources

    Video: VS Code for Salesforce Developers
    Video: VS Code IDE for Eclipse Users

  • How to setup Live Agent in Salesforce

    We have all seen websites these days – which have that little pop-up prompting you to ‘chat with someone’.  Or we see a little ‘chat now’ button on a page, to chat live with someone.  But how can you configure your website to do this too?  And how to setup Live Agent in Salesforce?

    But isn’t implementing Live Agent complex?  The short answer is no.  And the good news is, it is relatively easy to do.

    So, in this ‘how-to’ guide we look at the steps to implement Live Agent with your Salesforce org.

    What is Live Agent?

    We have all been there, trying to contact a company for help with a product or service. Their website redirecting you to a call centre, web-form to submit or some even give you a postal address! Eek!

    This is where Live Agent comes into the picture. In a digital world, Live Agent from Salesforce allows you to improve the customer’s experience. Making it seamless for customers on your website to get in contact with your support (or sales) team.

    At its core, Live Agent is a web-chat support channel. Think of Skype or Slack, but in a customer service context.

    Here is a quick overview video from Salesforce, covering some of the features of Live Agent.

    And although it is a tool primarily used for Customer Service, it could also be used by your sales teams. Imagine providing sales support to a customer who is stuck completing an order on your website?

    The power of Live Agent is its versatility and ability to plug into your sales/service processes within Salesforce, with relative ease.

    Live Agent is included for Salesforce Service Cloud Unlimited Edition customersWhat does Live Agent cost?

    This is an important question, as it isn’t free…

    So how much does Live Agent cost?

    Well the good news is, as of 2016 Salesforce have included Live Agent in the Lightning Service Cloud Unlimited license.

    And it is also available on Enterprise, but at an extra add-on. As an add-on, you will have to speak with your Salesforce Account Executive for a price.

    There are other alternatives out there too, which could integrate with Salesforce. But remember to check your if edition is compatible with these packages.

    Planning your implementation of Live Agent

    Live Agent is a communication tool, it can be used to power your customer service teams. Or if implemented incorrectly, could cause damage to your brand. What is the difference between the two? Planning…

    Just like most things, planning is key to success. Just because it is relatively to easy implement, doesn’t mean you should just dive right in and do it.

    6 things to consider before you implement:

    1. Stating the obvious but remember that Live Agent is a different communication channel. There is a different skillset needed here. So, do you have people who are able to communicate effectively via this channel?
    2. What are the objectives of Live Agent? What are the metrics for success and performance indicators (KPIs) that you want to track? And what customer behaviours are you wanting to change as part of this rollout?
    3. Do you have an idea of how many people may contact you at any one time? For example, do you have traffic estimates from your site? Do you have enough people to staff the queue? What hours of operation will you offer?
    4. Where in the customer journey do you want to prompt the customer? Do you want to invite them to chat, or just offer a ‘chat with us’ button on a contact page?
    5. Will you cap the volume of chats to your agents? Is there a Service Level Agreement (SLA) in place for Live Agent? How are you going to prioritising Live Agent chats vs Emails or Phone Calls?
    6. Are you using Omni-channel? (This is one for another post.) But if your org is not using it currently, is it something that could set this up too? With the aim of routing of service requests across the multiple channels (Live Agent, Calls, Emails, Social Media) to the right people.

    How to setup Live Agent in Salesforce

    Now we have the planning out the way, we can start the configuration of Live Agent in your org. For a basic setup, there are seven steps needed to enable Live Agent:

    Steps to create a basic Live Agent setup in Salesforce

    Use Case

    As a Salesforce Admin, your marketing team has asked you to help roll out Live Agent to the company’s website.  We are setting up a basic implementation, which means we will present a link to customers when agents are available, or a ‘sorry no agent’s available’`message if none are available/all are offline.

    Our agents are using Console, and we want to allow them to set their status/availability, and have that reflected on the website.

    Enabling Live Agent

    Live Agent works within Classic, Console and Lightning (when omni-channel enabled).  However, at this stage you can only enable Live Agent through Classic.

    Update (20th Sept): You will be able to setup and configure Live Agent via Settings in Lightning, once Winter ’19 is released in Oct 2019.

    1. Switch to Classic -> Setup -> Type ‘Live Agent’ in the Quick Find
    2. Go to Live Agent Settings
    3. Check Enable Live Agent and click ‘Save

    This exposes the Live Agent objects, relevant fields, and expands the Setup menu. What objects I hear you say! These objects include everything that drives Live Agent within Salesforce:

    • Visitors
    • Sessions
    • Transcripts
    • Transcript Events
    • Live Agent Supervisor
    • Quick Text

    Setup Users

    There are two elements which are needed to setup a user for a basic Live Agent setup. Enabling the user for Live Agent, and then adding the available Live Agent users into a ‘skill’ (we will cover what this is shortly).

    First enable the Live Agent feature on the user record.

    • Go to Setup -> Manage Users -> Users
    • Find the user(s) you want to enable for Live Agent, and edit their User record
    • Check the ‘Live Agent User’ box for each User you want to enable:

    Check User Permissions / Profiles

    Another important step in the setup of Live Agent is ensuring a user has access to the relevant objects and fields.

    The best way to do this is create or update a Permission Set/Profile to include the new objects and fields used by Live Agent.

    Some additional permissions on ability for users to manage Skills exist to.

    Salesforce have a detailed overview of the permissions recommended for Agents, and their Supervisors.

    Update your Console to include Live Agent

    Your Console app, most likely will not include Live Agent by default. So you will need to either enable or create the app for your users.

    • Go to Setup -> Create -> Apps
    • Either select an existing console app, or create a new one.
    • Check ‘Include Live Agent in this App
      • Additional options display, allowing you to prompt your agent to create a new record (such as a case) to link to the Live Chat

    Within console, the user should then see the Live Agent status in the Utility Bar:

    Live Agent in Console Utility Bar
    Live Agent in Console Utility Bar with a Chat Request

    Define your Skills

    Skills within Live Agent are a way to define or categorise different types of work. And are used to send the Live Agent session to the right person.

    For example, on your website you have Live Agent embedded on a general ‘Contact Us’ page, an eCommerce landing page and another on a product specific page. You might not want the same person in your company answering all these different types of queries. This is where Skills allow you to have two different sets of users specialising in the specific skill.

    You can control how you break the work down, and who you assign it to. And Skills plug-in to tools like Omni-Channel, if you ever look to expand your implementation.

    • Go to Setup -> Customize -> Live Agent -> Skills
    • Create a new Skill record, by clicking ‘New

    • Add in the Name and a Description
    • Then you can choose to either add in specific Users, or Profiles (keep in mind, only users with Live Agent feature enabled will have access)

    Configure your Live Agent

    Next up, we need to define how we want Live Agent to behave, and which features we want to enable. You can have multiple configurations, this lets you have different Live Agent settings for different users within your org.

    A Live Agent Configuration allows you to setup:

    • Chat Capacity – a maximum number of chats an agent can receive
    • Sneak Peek – ability to see what is being typed, as it is being typed by the customer
    • Sound & Notifications settings
    • Assignment of the configuration to users or profiles – control over which agents access this configuration. It is worth noting, a user can belong to only one configuration at a time.
    • Supervisor settings
    • Chat Transfer settings – allowing you to control who can receive a chat transfer by Skill

    For more details on what each of the settings are, you can read more here.

    Setup your first Live Agent Configuration:

    • Go to Setup -> Customise -> Live Agent -> Live Agent Configurations
    • Create a new Live Agent Configuration, by clicking ‘New

    Live Agent in Salesforce: Configurations
    Live Agent in Salesforce: Configurations

    • Add in the Name, then you can customise which settings and features you want.

    For this basic setup, we will create a configuration with:

    • A maximum of 5 chats
    • Sneak Peek enabled
    • A basic Auto Greeting of ‘Hello, how can we help you today?’
    • A Critical Wait Alert of 10 seconds
    • Assistance Flag enabled
    • Supervisor monitoring and whisper
    • And ability to transfer to others within the same Skill group

    Chat Buttons and Invitations

    Now we have set the backbone of Live Agent up, we now need to setup part which allows the customer to start a Live Agent Chat when they are on the website.

    By creating either buttons or invitations, you can define how a Live Agent session can be started. A button, simply enough is an icon/button you embed on a webpage for users to click on to start a Live Agent chat session.

    Alternatively, you can setup an Invitation. Customer are then invited to use Live Agent, when certain criteria have been met. For example, if someone is on the specific page for 5 seconds, you might want to prompt them to see if they need help.

    You can fully customise this experience to match your website. For this basic setup, we will create a basic button, without any customisation.

    Create your button:

    To create your first Live Agent button

    • Go to: Setup -> Customize -> Live Agent -> Chat Buttons & Invitations
    • Create a new button, by clicking ‘New
    • For a basic setup, you only need to enter:
      • Type – do you want a button or an invitation
      • Name of the button/invitation
      • DeveloperName – this auto-populates from the Name
      • Skills which are related to the button/invitation
      • Additional animation settings are required if you have selected Invitation

    Live Agent in Salesforce: Chat Button and Invitations
    Live Agent in Salesforce: Chat Button and Invitations

    • Once you click ‘Save’, you will then be given the HTML code for the button/invitation:

    Live Agent in Salesforce: Chat Button HTML
    Live Agent in Salesforce: Chat Button HTML

    Ready to Deploy

    The final step is to create a deployment, these are the final touches for your Live Agent setup. And allows you to control some of the visitor settings.

    Once a deployment is created, it will give you some additional HTML to add to the bottom of each web page you want Live Agent embedded into.

    Go to: Setup -> Customize -> Live Agent -> Deployment Code

    • Create a new deployment, by clicking ‘New
    • For a basic setup, you only need to enter:
      • Name of the deployment
      • DeveloperName – this auto-populates from the Name
      • Chat Window Title

    Live Agent in Salesforce: Deployments
    Live Agent in Salesforce: Deployments

    Add the code to your site…

    Now for the crowning moment. When you are ready to add the code to your webpage, you will need the code output from the Button/Invitation and the Deployment settings.

    Create a test Webpage

    To test this, you can create a html file in your favourite text editor. In this example, we are going to add this code to a test page for Live Agent.

    Open up a text editor, we will create a test HTML page to begin with. To start with, copy this into the text editor:

    <html>
    
    <head></head>
    
    <body>
    
    <!-- add the code output from Buttons/Invitations here-->
    
    <!-- add your HTML code from Deployment here-->
    
    </body>
    
    </html>

    And now, replace each of the lines above, with the relevant HTML code from Salesforce. The HTML output from Chat Buttons/Invitations and Deployment is what we want.

    So you will end up with something like:

    <html>
    
    <head></head>
    
    <body>
    
    <!-- this is the code from Buttons/Invitations -->
    
    <a id="liveagent_button_online_5738E0000008OVJ" href="javascript://Chat" style="display: none;" onclick="liveagent.startChat('5738E0000008OVJ')"><!-- Online Chat Content --></a><div id="liveagent_button_offline_5738E0000008OVJ" style="display: none;"><!-- Offline Chat Content --></div><script type="text/javascript">
    
    if (!window._laq) { window._laq = []; }
    
    window._laq.push(function(){liveagent.showWhenOnline('5738E0000008OVJ', document.getElementById('liveagent_button_online_5738E0000008OVJ'));
    
    liveagent.showWhenOffline('5738E0000008OVJ', document.getElementById('liveagent_button_offline_5738E0000008OVJ'));
    
    });</script>
    
    <!-- this is the code from Deployment-->
    
    <script type='text/javascript' src='https://c.la1-c2cs-frf.salesforceliveagent.com/content/g/js/43.0/deployment.js'></script>
    
    <script type='text/javascript'>
    
    liveagent.init('https://d.la1-c2cs-frf.salesforceliveagent.com/chat', '5728E0000008OPk', '00D8E0000000gBA');
    
    </script>
    
    </body>
    
    </html>

    Now find the part in the code that shows: <!– Online Chat Content –>. Add in the text ‘Chat Now’. Your code then should look like:

    <!-- Online Chat Content -->Chat Now</a>

    Additionally, we need to add in some text if an agent is not available. Do to that find: <!– Offline Chat Content –>. Similarly add in the text ‘Sorry no agents currently available’. This should now look like:

    <!-- Offline Chat Content -->Sorry no agents currently available</div>

    Now go to ‘Save As’, and save the text file as ‘Live Agent.html’.

    A basic example of Live Agent HTML page

    We have now created a very basic page, to test Live Agent. If you now open the HTML file you have created, you should see:

    Basic Live Agent demo, no agents available
    Oh no, no agent’s can help me!

    Alternatively, if you are testing and then select ‘Available’ in Live Agent status. Refreshing the webpage should pickup the change in status and display:

    Basic Live Agent demo with available status
    Yay… Help is at hand…

    Clicking the ‘Chat Now’ link, will then prompt the Agent logged in with this to accept the chat:

    Live Agent, what the internal Agent will see
    Live Agent, what the internal Agent will see

    Once the chat is accepted, you should see the transcript of the chat in your Console. And as we ticked the ‘Create new case’ option for Console above, Salesforce will automatically prompt you to create a Case:

    Live Agent, what the internal Agent will see
    Live Agent in a Console view

    Add Live Agent to your WordPress site

    The variety of website technology and hosts out there is truly mind-blowing. Deploying Live Agent to your website, needs a bit of knowledge of HTML and your website.

    Let’s take a look at adding Salesforce Live Agent to a WordPress page. WordPress is a very common platform that is used globally, even by cirrus.red! ? Other platforms and web hosts, may follow similar steps.

    By the way I am assuming you have access to create and publish web pages in WordPress for this section.

    Sticking with our Use Case, we want to create a new Contact Us page, where the Live Agent link is embedded.

    • Login to the WordPress admin page of your site.
    • Click on ‘Pages’ and then ‘Add New
    • Ensure you are on the Text page editor

    Adding a page in WordPress, to then embed Live Agent
    Adding a page in WordPress

    • Add in a page Title. For example ‘Contact Us’
    • First up, take the code from Chat Buttons/Invitations and paste it into the editor
      • Remember, as per above you will need to add-in:
        • Online Chat Content and
        • Offline Chat Content
    • Underneath that HTML, now add in the Deployment HTML code

    You should end up with something like this:

    Live Agent added to a WordPress page
    Live Agent HTML within a WordPress page

    Now you can preview the page, save it as a draft or publish it (if you wish). We now have a basic setup of Live Agent, tested and working on our site.

    Give yourself a round of applause…

    Wrap up…

    So we have now setup a basic Live Chat implementation. Your internal users can accept incoming chat requests from your customers and record the chats within Salesforce against a case.

    Live Agent is fully customisable though, and this is just the beginning of what you can do.

    Customisations include overall look and feel, adding in custom landing pages or pre-chat forms to capture contact details.

    Additionally, you can integrate Live Agent with Omni-Channel, which allows you to manage work states of your agents across multiple channels.

    But these are all things for another how-to guide down the road.

    Additional resources to help you

    Overall Training / What is Live Agent:

    Planning the roll-out:

    While researching this post, I also found these resources which may be of interest in the planning stage:

    Implementation Guide for Administrators:

    Video resources:

Back to top button