Setup Live Agent in Salesforce Community – Video

Using Live agent, Service representatives can directly chat with customers and resolve customer issue. Chat support is noways preferable way to contact service representative. No need to stay on call for hours, no need to wait for email reply for days. Even I use chat support wherever it is possible as its very easy to use and multi tasking can be easily done by opening chat in one window and continuing work in other windows. Live Agent is native tool provided by Salesforce which can be setup by point and clicks and no need of programming is needed. If you want Video tutorial on how to setup Live agent, you can skip this post and navigate here.

LiveAgent in Community Demo
LiveAgent in Community Demo

1. Creating Skills

Setting up Live agent is very easy if you know how Service cloud or Call center works. If we take example of day to day life, when we try to chat someone, it asks us to choose from area to contact like “Billing Issue”, “Sales Issue”, “Product repair” etc. Options makes it very clear that chat will be routed to different team on basis of area. Same way, while setting up Live agent in Salesforce, We need to create different team with different skills. In our case, I am going to create Skill named “EDI Skill Group”. To create skill, navigate to “Build | Live Agent | Skills | New”.

Salesforce Live Agent - Create Skills
Salesforce Live Agent – Create Skills

As shown in above image, Skill includes setting about which user or profile belongs to skills.

2. Creating Buttons

Next step is creating button for your website. There are basically two types of button, Online and Offline. Therefore we will need two images for button. Images will be hosted from public sites. If you don’t have any public sites still we can add images from external websites. To create button, navigate to “Build | Live Agent | Chat Buttons & Invitations| New”

Salesforce Live Agent - Chat Buttons
Salesforce Live Agent – Chat Buttons

You can also setup auto greeting text in this configuration whenever end user opens chat window.

3. Live Agent Configurations

Next step is very important and informative where we have lots of options available to control behavior of Chat. Navigate to “Build | Live Agent | Live Agent Configurations| New”.

  • Sneak peak Enabled : This option lets agents see what visitors are typing before they send the message
  • Request Sound Enabled : Enable to play a sound when an agent gets a new chat request
  • Notification Enabled : Enable desktop notifications for incoming chats. Supported only on certain browsers
  • Auto Away on Decline : Automatically change agent’s status to Away when they decline a chat request
Salesforce Live Agent - Configurations
Salesforce Live Agent – Configurations

3.1 Chartlets

This section shows which chat windows to auto open when agent accepts chat from visitor

Salesforce Live Agent - Chatlets
Salesforce Live Agent – Chatlets

Next setting is about Users and Profiles assigned for that configuration. After that there is setting for Supervisor.

3.2 Supervisor Settings

  1. Chat Monitoring Enabled – Allows supervisors view agent’s ongoing chat transcripts
  2. Whisper Message Enabled – Allows supervisors to send private whisper messages to agents while agents chat with customers
  3. Agent Sneak Peak Enabled – Allows supervisors to see what agents are typing before they send messages to customers
Salesforce Live Agent - Supervisor Settings
Salesforce Live Agent – Supervisor Settings

3.3 Chat Conference and Transfer Settings

This is very self explanatory section where different options are available related to transfer and conference of Chat.

Salesforce Live Agent - Chat Transfere and Conference Settings
Salesforce Live Agent – Chat Transfer and Conference Settings

4. Deployment

Till this point we are almost done, only step remaining is to grab auto generated JavaScript from Live Agent configurations. Navigate to “Build | Live Agent |Deployments| New”

Saleforce Live Agent - Deployment
Salesforce Live Agent – Deployment

Here we need to provide Chat Window title and permission to allow visitors to save chat transcripts.

5. Copy JavaScript and paste in Visualforce Page

Last step is to copy JavaScript and paste in Visualforce which will be exposed as a Community either in Customer or Partner Community. We need to copy JavaScript from two places :

5.1 Chat Buttons and Automated Invitations

Navigate to “Build | Live Agent |Chat Buttons & Invitations”. Select Button configuration created

Saleforce Live Agent - Button JavaScript
Salesforce Live Agent – Button JavaScript

5.2 Deployments

Navigate to “Build | Live Agent |Deployments| New”

Salesforce Live Agent - Deployment JavaScript
Salesforce Live Agent – Deployment JavaScript

Visualforce for community will look like

<apex:page >
<!-- Code Copied from Button Configuration -->
<img id="liveagent_button_online_57890000000PIxV" style="display: none; border: 0px none; cursor: pointer" onclick="liveagent.startChat('57390000000PIxV')" src="" /><img id="liveagent_button_offline_57890000000PIxV" style="display: none; border: 0px none; " src="" />
<script type="text/javascript">
if (!window._laq) { window._laq = []; }
window._laq.push(function(){liveagent.showWhenOnline('57390000000PIxV', document.getElementById('liveagent_button_online_57390000000PIxV'));
liveagent.showWhenOffline('57390000000PIxV', document.getElementById('liveagent_button_offline_57890000000PIxV'));

<!-- Code Copied from Deployment -->
<script type='text/javascript' src=''></script>
<script type='text/javascript'>
liveagent.init('', '5890000000PIm0', '00D90000000hZll');







Related Posts


17 responses to “Setup Live Agent in Salesforce Community – Video”

  1. Vineet Goel Avatar
    Vineet Goel

    Very good article for the beginners, I just wanted to know my community users want to chat with salesforce users, hence community users will shown as VISITOR while chatting, how I can fetch their name when they are not filling up their name anywhere.

    1. Jitendra Zaa Avatar

      You can use Prechat form to get users Name in Live Agent.

      1. Spandan Avatar

        How to start chat on submitting the prechat form?

  2. sonia Avatar

    Hi Jitendra,

    I am having one issue with my Live Agent in Salesforce.
    Salesforce: Live agent chat option shows the agent online in offline mode

    I need to ask my Superviser to make me offline

    1. Jitendra Zaa Avatar

      How does your supervisor makes you offline ? If anyone in live agent queue is online then button will be displayed.

      1. sonia Avatar

        There is a button named Offline and away for everyuser when the supervisor clicks on the button he can change agents’s status .

  3. sonia Avatar

    When we have 2 agents online of which one agent is online for 10 mins and the other agent is online for 2 mins

    •By default the person who is in online for the longer period gets the chat first and the following chats will be landing to the other agents available

    •What actually happens is the person who is online for 10 mins gets the first chat followed by the 2nd chat that comes to the queue only after this the 2nd Agent starts getting chats.

    •The way it should work is the person longer in queue gets the first chat and if there is a 2nd chat in queue that needs to land to next agent in queue.

  4. glndivya Avatar

    We are using napili templates in communities . How to add the Live agent Chat button to community?

  5. sneh Avatar

    Hi Jitendra,

    I have set up live agent in our organization, I am trying to use Pre-chat forms.. I also have created a HTML file for pre-chat form. How do I host it for testing purpose and pass information to my salesforce so that the contact can popup?

  6. Diin Avatar

    I want to make the chat in same page popup something like facebook chat. I made it using iframe. But, it’s not persistent. After refresh, i am loosing the session. After that i came across Snap-in chat. It’s UI is good and it’s an in-page chat box. But, the problem is it’s not persistent in multiple windows. In multiple tab i am getting different chat.
    I checked the cookie, sessionStorage, localstorage and i spend lots of time on this. I didn’t get any solution. Is there any way to make persistent chat box with salseforce chat?


  7. Avatar

    Hi Friends,I am having small issue in live agent…Basically we are not able to put default skill in drop down for a visitor/customer…just looking if anybody worked on live agent scenarios and come across this kind of issue and provide any work around..Example : in the above explanation Billing Issue”, “Sales Issue”, “Product repair” etc —i want to default sales issue to the customer…Thanks

  8. Vinaykumar S Avatar
    Vinaykumar S

    i want implement the live agent in lightning component instead of VF page . could you please help me

  9. Babu Avatar

    I have a problem please help me out.

    I have implemented live agent (snap Ins) Omni channel Queue based routing in my Org.
    There 2 queue, when customer fill pre-chat form , snap ins look for agents in Queue which is selected by user in pre-chat form
    if there no agents are not available it gives option to “Start new chat” or “Leave Chat”.

    My question is:
    How we can replace “Start new chat” with “Offline Form”?
    Please help me with solution.

  10. Raghu Avatar


    We are facing a problem in live chat, Even though the agent is available the chat window is redirecting to the Decline page directly.
    How can we resolve this?

  11. Suresh Gottipati Avatar
    Suresh Gottipati

    Hi Jitendra, It was good info on omni channel. I have few questions. How we can add voice (phone or Open CTI) as service channel in omni channel for routing purpose. Is there any way that creating case automatically when agent accepts the call or chat?

  12. Salesforce Developer Avatar
    Salesforce Developer

    When we transfer chat from one agent to other , how to change the default greeting message ?

  13. Nishant Avatar

    Hi! Jitendra,
    I have implemented chat in our org. I can’t get the case and contact pulled from the case transcript.
    I have enabled service for my chat. the major issue is I can’t pull contact and case.
    Can you help me this.
    Thanks in advance!!!!

Leave a Reply to DiinCancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Discover more from Jitendra Zaa

Subscribe now to keep reading and get access to the full archive.

Continue Reading