Showing posts tagged with:

Summer 14

Salesforce Live Agent

Live Agent – What is it?
Live Agent enables real-time, online chat between an organisation and its customers, prospects etc. The chat sessions can be initiated via clicking a button or link on a web page, or via automated invitation based on page access metrics etc. For the end user, it can be very convenient to resolve a query through chat, avoiding the usual frustrations of calling a support line – although the end-user experience is still very dependent on the skill and knowledge of the receiving agent. For the organisation, there’s huge potential for call deflection – an expert team efficiently managing multiple concurrent chats (routed by skill) can hugely impact on the call volume. The handling cost of a chat session is generally perceived to be 1 third of the cost of a phone call.

Theoretically therefore we have a win-win situation, online chat should be good for all parties. The double digit percentage increase in the use of chat year-on-year (according to Analysts) is evidence of this. Analysts are also predicting strong growth in live video chat for customer service, with B2C chat options such as Amazon’s Mayday button, becoming mainstream.

Salesforce Live Agent was introduced onto the platform in the Spring 12 release following the acquisition of Activa Live Chat in September 2010.

Key Implementation Concepts
Configuration of Live Agent is more complicated than most functional areas and not something to embark upon without reading the implementation guide. It is possible to deliver a usable solution using the declarative approach, however a fully branded or custom experience will require technical expertise with Visualforce and standard web technologies such as HTML, CSS and JavaScript.

1. Configuration
A Configuration defines the behaviour and presentation of Live Agent with a Salesforce console. Configurations define the number of maximum active chats, the welcome greeting, sound notifications on various events, supervisor monitoring settings and skills-based chat transfer options. Configurations are assigned to Users and/or User Profiles and are typically defined with separate configurations for for standard chat users and for supervisors.

2. Deployment
A Deployment defines the behaviour and presentation of Live Agent to the end-user, i.e. customer or prospect. Deployments control the look and feel of the Chat windows displayed, plus options for the saving of transcripts. Multiple deployments may be configured across product lines or host web sites.

Note – each deployment generates a snippet of HTML which should be inserted once into the host page. The referenced endpoint is unique to the Live Agent org and is generated (and displayed) when Live Agent is enabled.

[sourcecode language=”html”]
<script type=’text/javascript’ src=’’></script&gt;
<script type=’text/javascript’>
liveagent.init(‘;, ‘___g00000008OMv’, ‘___g0000003MCJN’);

3. Skill
Skills play a key role in routing incoming chats to appropriate agents. In short, multiple skills can be defined (“General Enquiry”, “Product A Enquiry” etc.) and assigned to Users and/or User Profiles. Every inbound chat is related (via the button) to one or more skill.

4. Chat Button
A Chat Button defines the entry point for a chat and also key information relating to routing such as skills required, queuing options and routing type. The routing type can be set to Least Active, Most Available or Choice. Buttons can be fully customised and branded and be set to display pre-chat forms or post-chat pages.

Note – each Chat Button generates a snippet of HTML which should be inserted into the host page.

[sourcecode language=”html”]
<a id="liveagent_button_online____g00000008OT8" href="javascript://Chat" style="display: none;" onclick="liveagent.startChat(‘___g00000008OT8’)">
<!– Online Chat Content –>
<div id="liveagent_button_offline____g00000008OT8" style="display: none;">
<!– Offline Chat Content –>

<script type="text/javascript">
if (!window._laq) { window._laq = []; }
window._laq.push(function(){liveagent.showWhenOnline(‘___g00000008OT8’, document.getElementById(‘liveagent_button_online_vg00000008OT8’));
liveagent.showWhenOffline(‘___g00000008OT8’, document.getElementById(‘liveagent_button_offline____g00000008OT8’));

5. Automated Invitation
In principle Automated Invitations work the same way as a Chat Button, however the chat session initiation occurs via a proactive invitation based on defined sending rules (Seconds on Page, Seconds on Site, Page Views, Url Match, Custom Variable).

6. Quick Text
Live Agent appears as a Channel for predefined Quick Text messages. Such message can be easily inserted into the Chat conversation, for agent convenience and standardisation of messaging. To do the character sequence ;; must entered into the chat text input, this will trigger a list of most recently used messages to appear, alternatively additional characters after the ;; will result in a filtered view. Not an ideal user experience as the agent must be familiar with the message naming. The now retired, standalone version of Live Agent console (flash based) had stronger functionality in this area – enabling messages to found by category.

Extension Points
1. Deployment API
The deployment API enables JavaScript to written that can customise the chat window, launch a chat session or specify back-end functionality such as record searching and creation. This API also enabled Direct to Agent Chat Routing, where routing rules are ignored and all chat invitations can be routed directly to one or more specific agents.

2. Pre-Chat Forms / Pre-Chat API
Introduce a pre-chat data capture that could be used for routing, mapping and auto-query. Mapping relates to mapping page inputs to record attributes in Salesforce. Auto-query relates to records automatically opening when a chat is accepted e.g. the contact record for the customer – or perhaps a transactional record such as an invoice, purchase, booking etc. In addition to record search, record creation is also supported e.g. create a contact record if no match exists. Information entered into the pre-chat form can be viewed by the agent before and during the chat session.

3. Customised Chat Window
Standard Live Agent Visualforce components can be used to build completely custom chat windows.

4. Post Chat Page
Finish the chat session with a page displaying a summary, useful links etc.

5. Live Agent REST API
REST resources that enable a custom chat experience to be developed using any programming language or technology capable of addressing a RESTful web service. Exemplar use cases for this API are custom mobile application development and integration of chat functionality into an existing application.

Note, each org enabled for Live Agent exposes a unique Live Agent API endpoint.


POST https://{org unique endpoint}/chat/rest/Chasitor/ChasitorTyping
POST https://{org unique endpoint}/chat/rest/Chasitor/ChatMessage
POST https://{org unique endpoint}/chat/rest/Chasitor/ChatEnd

Functionality – Agent View
Live Agent in the Salesforce Console

Live Agent - Console View

Key Features –
Manage multiple concurrent chats within the console
Find and open existing records related to chats
Create new records based on incoming chats
Choose records or pages to open as sub tabs of each chat session
New Case, Lead, Account, Contact, VF page (1-5)
Include Suggested Articles from Salesforce Knowledge in Live Agent
Attach a file to the chat session
Supervisor tab for monitoring

Functionality – Customer View

Live Agent - Chat Window View

Key Features –
Initiate and end a chat session via button or link
Initiate and end a chat session via invitation acceptance
Save transcript

Salesforce Knowledge Integration
A chat answer field can be added to article types (field name must be specifically Chat_Answer__c – Long Text), clicking the Share link for an the article will result in the Chat Answer text being pasted into the chat window. A nice convenience for agents

There is also a Suggested Articles from Chat feature in the Salesforce Console configuration which I assumed would search Salesforce Knowledge based on the Chat text – it seems that all this does is add Knowledge to the Live Agent sidebar.

Performance Edition – included.
Enterprise and Unlimited Edition – feature license cost

Note – Live Agent is also available in Developer Edition.

Implementation Guide
Developers Guide

Salesforce Summer 14 Platform Highlights

The Summer ’14 release notes are out (in preview), this post outlines 10 selective highlights related to the platform (in no order of significance). Given the raft of enhancements to Salesforce1 I’ll cover this area in a separate post.

Custom Permissions (Developer Preview)
Custom permissions enable arbitrary permissions (typically function-centric) to be defined and assigned to users via Permission Set or User Profile, such permissions can be tested in code in a consistent manner to standard function-type permissions (Manage Cases etc.). A new CustomPermission standard object exists in addition to the related SetupEntityAccess object for this.

External ID Limit
The limit for external Ids on Custom Fields has been raised from 3 to 7. A definite necessity for medium-to-large scale implementations with multiple data integrations or complex query requirements.

Query Plan Tool
The Developer Console has been incrementally enhanced, as has been the case over recent releases, a key feature of the Summer ’14 version is the provision of access to the underlying query plan executed for SOQL queries. Very useful insight (impossible to access previously) for query optimisation.

Describe Limits Removed
With Summer ’14 the describe limits for Apex are fully removed. This is excellent news and will hopefully encourage more use of Dynamic Apex and generally a more dynamic approach to development with obvious maintainability and TCO benefits.

Access the Standard PriceBook in Test Code
A long term gripe for many developers has been the inability to access the standard pricebook in test code, meaning Product related unit tests had to run in seeAllData=true mode. Now test code can access the standard pricebook Id via Test.getStandardPricebookId(), use this Id in creating PBE, create custom pricebooks and related PBE, all with full test data isolation in place. Excellent.

Apex Flex Queue (Developer Preview)
The Apex Flex Queue is a holding queue for batch jobs where the current count exceeds the allowed 5 concurrent/queued jobs. Up to 100 can be held on the Apex Flex Queue; entries can be viewed in the setup UI and reordered. The entries on the Flex Queue are processed as system resources permit. This is a great improvement reducing the need for retry logic applied via Scheduled Apex to handled the full-queue case.

Higher Limits for @future Methods (Pilot)
Additional attributes on the @future annotation enable doubling or tripling of key execution limits; CPU time, heap size, soql queries etc. It would appear that increases may effect other asynchronous processes for the org. A similar approach to applying higher limits to Batch Apex classes would be very useful.

Simplified Package Installer
The relatively long-winded package installer now offers a simpler user-experience; one-page, one-click install. The detailed configuration options are there, but accessed on separate links by exception not as part of the standard course as was the case previously. AppExchange installs use the new UI by default, installs occurring via URL required the addition of the &newui=1 querystring parameter.

Analytics Dashboards API
The REST Analytics API has been extended to cover dashboards (in addition to reports). Capabilities include triggering a dashboard refresh, retrieving dashboard metadata and retrieving a list of the most recently used dashboards. All of which are key functions in incorporating dashboards into custom mobile views.

Related Lists as Console Components
Useful ability to define related lists for that appear as console components (within a Console app) for a specific page layout. The utility here is one of convenience, no more scrolling vertically, the lists can appear horizontally adjacent to the record details.