Monday, June 26, 2017

Salesforce Service Cloud - Contact Center Reports

As a call center manager, it is very important to monitor team's case performances targets, train new support agents, analyze team's open case performance and etc. There are multiple matrices which a call center manager normally monitor to improve contact center's performance.

Call center manager can use Salesforce reports to monitor critical support metrics such as -
  • Total open cases by agents
  • Total cases created by agents and status
  • Total cases created by agents and products
  • Total average age by agent
  • Total closed cases by agent
Let's start with few important reports here -

Agent Open Case Load by Origin/Type:
This report will help call center manager to determine his/her team's bandwidth/workload. The report will be grouped based on Agent and Case Origin/Type(based on your business operation). From here call center manager can easily get real time view of his/her team's current work pressure. Here comes the report -

Average Age of Open Case:
Another very important report to understand your team's performance - how long your agents are taking to serving customers and thus meeting the service-level agreements (SLAs). To create this report, you can customize the out-of-the-box report "Total Open Cases By Agent" and then summarize the Age column (Summarize by Average). Below is how the report will look like -

Average Age of Closed Case by Agent:
Call center managers can use this report to monitor their agent's productivity in terms of how quickly agents are closing the cases. This report will give a very good comparative study of the agents in terms of their productivity. To create this report, you can customize the out-of-the-box report "Total Open Cases By Agent". Remove the Open equals True filter and add Closed equals True filter, then summarize the Age column (Summarize by Average). Below is how the report will look like -

Monitor Email Queues:
If you have email-2-case configured in your organization and your email cases are routed to individual queues as per the case assignment configuration, then you might need to monitor your email queues to understand how many cases violated, what is the percentage of cases(in standard and out of standard) per queue etc.

In order to do that, use the below details in the report -
  • Use Filter: Case Owner contains
  • Drag the field - Violation from Milestone in the report.
  • Create formula field - (attaching the individual screenshots below)
    • # in standard (# of cases without violation)
    • % in standard (% of cases without violation)
    • # out of standard (# of cases with violation)
 












Below is how the report will look like -

Knowledge Reports:
If you have implemented Knowledge in your organization, then you can install Knowledge base Dashboards and Reports from Appexchange. From there you can go to the report folder - Knowledge Reports Package and get all the important reports available to you. Few important reports are -
  • Case count by Article
  • Cases with Articles
  • Recently created Articles
  • Recently Searches by Keyword
  • Article views
  • Article scores
Omni-Channel Reports:
If you have implemented Omni-Channel in your organization, then below are the reports you might need in your organization. 
  • Omni-Channel - Active Users - This report will give the status of all users currently logged into Omni-Channel.
  • Omni-Channel - Agent Email Metrics - This report will give the summary of email average handle time by Agent.
  • Omni-Channel - Agent Time-Outs - This report will give the summary of email cases that Agents did not accept prior to time out.
  • Omni-Channel - Queue Email Metrics - This report will give the summary of email average handle time by Queue.

Monday, June 12, 2017

Salesforce Live Agent Chat - Objects

In this post, I am going to explain about the standard objects which will be created by default the moment you enable Live Agent in your organization. Let's start -

Live Chat Visitors:
This object contains information about the visitors who has initiated the chat session. One important field here is the Session Key. A session key in a unique record which is stored on Live Chat Visitor's record and end user's machine as a cookie. But why? The reason is if the end user is initiating multiple chat sessions, then Salesforce will link all Live Chat Transcripts records (This is another object, which I will explain in a few minutes) to this unique Live Chat Visitor record. Here is a sample Live Chat Visitor record.


Live Chat Transcripts:
This is the record which tells you the conversation that happened between your Service Representatives and End Users. It stores the chat transcripts. Salesforce will automatically create the record for you as soon as the chat session is ended and your service representatives close the chat transcript. Here is sample Live Chat Transcript record.


Live Chat Transcript Events:
This object tracks all the events that occur between Service Representatives and Customer during the chat. Few important events are like Chat Request, Accept Request, Route Information, Transfer information. You can see the detail of events - 
https://help.salesforce.com/articleView?id=live_agent_transcript_events.htm&language=en&type=0
Here is sample Live Chat Transcript Event record.

Live Agent Sessions:
This object holds the information about the agent sessions, time spent online, time spent chat, idle time etc. Here is sample Live Agent Session record.

Quick Text:
Quick Text is a very handy option when chatting with customers. If your Sales Representatives are using few sentences quite a number of times, then instead of asking them to write the same again and again you can create Quick Text. It is basically the shortcut for commonly used phrases/questions.
Below is a sample Quick Text for greeting customers with Good Morning.

Now from the chat window, your Sales Representatives can just enter ;; and all available Quick Texts will be available to them. They can select the one. This was it will help them to respond back to the customer much quickly.




Sunday, June 11, 2017

Salesforce Live Agent Chat - Understand the Basics

Using Live Agent Chat, Sales Representatives can chat with their customers and solve their problems or answer their questions. In today's world providing first class services to customers is very important and chat support plays an important role here. Live Agent Chats are referred as Live Chat as well. With Live Chat, customers don't need to wait for the long queue or need to wait for replies for their email queries. They can get immediate attention which eventually improves customer satisfactions.

Trailhead comes up with a very good project "Build a Branded Chat" which explains how to enable Live Chat and it's basic configurations. I recommend everyone to please go through this one and understand the basic of the Live Agent Chat first before proceeding further.

Below is the visual representation of "Live Agent" Object Model. Though I am saying it "Object Model", but most of them are not objects. :-) 


Let's try to two basic terminologies associated with Live Agent.
1. Skill:
To understand Skills, we first need to understand how we want to support our customers - is it based on geography? Is it based on business units? Is it based on products? etc.. Then based on the answers you will hire employees and train them so that they can support your customers. These peoples are known as Sales Representatives who normally support your customers.

So let's say, the company "Global XYZ" is having business all over the world. They are supporting their customers based on geographies. So for them, they will create skills like - APAC, NA, EUROPE, EMEA.

Again let's say the company "Global Insurance MNOP" is selling Insurance Products. So for them, the skills will be - Health Insurance, Car Insurance, House Insurance.

Now you will assign your Sales Representatives(Salesforce Users) to the Skills. It's a many to many relationships i.e. one skill can have multiple Sales Representatives(Salesforce Users) and one Representative(Salesforce User) can have multiple skills. 

2. Deployment:
A deployment is basically the section where you will place all your configurations to control Live Agent behaviors in your website. Deployments will provide JavaScript codes which you will put in your Web pages.

You can have more than one Live Agent deployments. In case your organization has one Service console supporting multiple sites, you can create Live Agent deployments per site.



Trailhead comes up with an image which I really like and it explains the two pillars so clearly.

Trailhead Modules:


Friday, April 28, 2017

Summer'17 :: Retrieve and Deploy Metadata through Apex


In Salesforce World, Metadata plays a very important role. Metadata types and components are used to represent org specific configuration and customization. Salesforce is having a very good page explaining Metadata. Here is the link - "An Introduction to Force.com Metadata". 

Before Summer'17 release, in order to access Metadata, you need to use the Metadata API, but now Salesforce comes up with Metadata namespace. You can use classes in Metadata namespace to access Metadata components through Apex.

Why do I need to access Metadata?
Salesforce documentation explains it correctly and here are the possible reasons why you may need to access Metadata.

In this post, I am going to explain how you can access and deploy Metadata changes through Apex with an example.

Example -
In my Salesforce Org, I have one Custom Metadata Type named - "Admin Preference" which is -
The values of this Custom Metadata Type are -

Now I will create a simple VisualForce Page which will retrieve this Metadata Values and display them. At the same time from the same page, I will change the values. 

To implement this requirement, I will use the Salesforce Summer'17 New Feature - classes Metadata namespace.

Let's Start -
In order to store the Custom Metadata Values, I will use the below class -

public class MetadataHelper{
    public String name {get;set;}
    public Boolean isEnabled {get;set;}

    public MetadataHelper(String name, Boolean isEnabled){
        this.name = name;
        this.isEnabled = isEnabled;
    }

    public String getFullName(){
        String fullName = 'Admin_Preference__mdt.';
        if(name.equalsIgnoreCase('Process Builder Preference')){
            fullName = fullName + 'Process_Builder_Preference';
        }else if(name.equalsIgnoreCase('Trigger Preference')){
            fullName = fullName + 'Trigger_Preference';
        }else if(name.equalsIgnoreCase('Validation Rule Preference')){
            fullName = fullName + 'Validation_Rule_Preference';
        }else if(name.equalsIgnoreCase('Workflow Preference')){
            fullName = fullName + 'Workflow_Preference';
        }
        return fullName;
    }
 }

How to retrieve the Custom Metadata Types and it's Values: 

To retrieve the Custom MetadataTypes, the command is - Metadata.Operations.retrieve(). This method will retrieve the Metadata synchronously. We need to pass the list of component names and this method will return a list of matching component data (Metadata.Metadata format).

Once you have the list, power is completely in your hand. Trust me!! Really you have all the power you need then. You can iterate through the list and get the each CustomMetadataRecord. Now each CustomMetadataRecord is having CustomMetadataValues which also you can fetch and play around. 
CustomMetadataValues are stored in two fields - the first one is "field" which stores the API name of the field and the second one is "value" which stores the value of that field for that CustomMetadataRecord. Confused??? Don't worry I will give you now a clean picture which helped me to understand and I hope it will help you as well.

To understand how the custom metadata information is stored in Salesforce, consider our Custom Metadata Type mentioned above - Admin Preference. And let's consider one value here - 



So according to the above example - Metadata.Operations.retrieve() will retrieve the CustomMetadataRecord - Process Builder Preference. Now this record is having the label - "Process Builder Preference", which we can get from the label field. The fullName of this record is - "Admin_Preference__mdt.Process_Builder_Preference" which we can get from the method getFullName()
In the above example, this CustomMetadata is having only one value which is stored inside a field of type Metadata.CustomMetadataValue. For that single  Metadata.CustomMetadataValue, the field = 'Enabled__c" and value = true.

So the visual representation of the flow is -


With the above explanation, here comes to code -

How to deploy Custom Metadata Types and it's Values: 
The method Metadata.Operations.enqueueDeployment is used to deploy the changes to the org. The operation is happening in asynchronous mode and that is the reason we need to provide a callback method to handle the success/failure scenarios. To create the callback, we need to implement the interface Metadata.DeployCallback and by doing that we need to put our logic in the method - handleResult.

Below is the CallBack method -

Now to deploy the changes below is the code -

You can find the full code in my Github repository.

With all these changes, below is how the functionality working - 


Limitation - Metadata access in Apex is currently only possible for custom metadata records and page layouts. You can retrieve, create or update custom metadata, but you cannot delete metadata through Apex.


Thursday, April 27, 2017

Summer'17 :: Embed Your Flow in Lightning Experience


In this post, I am going to explain the new Flow features introduced by Salesforce in Summer'17.

Add Flow into Record Detail Pages:
With Summer'17 Salesforce release, now you can add flows into any Lightning Pages. You need to add the Flow component to your Lightning pages. This feature was introduced by Salesforce in Winter'17 release as a beta functionality, and in Summer'17 this is now Generally Available.

In this section, I am going to explain how you can add flow into record details page through Lightning App Builder.

Let's first create a flow which needs a parameter which is basically the record Id. The intention is that when we will add this flow into the record detail page, we will pass the record Id to flow and then flow will fetch necessary information from the record and prepare its own view.
So here is the flow -

Flow Name: Survey Customer
This flow is having one input variable - "recordId" which will store the Salesforce Record Id passed from record detail page.

With this variable, the flow will query the Salesforce Contact Record, fetch Contact's First Name and Last Name and generate the customized Welcome Message. I am not going to show how Flow is configured because the intention of this post is to demonstrate how to use the flow inside Lightning Experience.
Here is the final view of the flow -


Now, will come the fun part. Let's say we wanted to display this message in Contact Detail Page. What we need to do is - Open the contact detail page and then click on the Edit Page option from Top Right.
This will open the Contact Detail page in Lightning App Builder

From the left section, select the Flow Component under Standard and drag it under Activity Section at the button.
Now select the Flow component, and you will see the configuration panel at right next to it. This is the place where you will select your flow and also the parameters you will pass to the flow. See the animation below -
And that's all. Now the contact details page will look like -

Enjoy Flow in Lightning. Please provide your feedback.

Friday, February 24, 2017

Salesforce Optimizer - Spring 17 New Feature


Salesforce introduced the new feature in Spring'17 - Salesforce Optimizer. This is really a nice tool which will evaluate your implementation in terms of the Salesforce features you are using and then identifies the ways to improve the implementation.

We all know that continuous improvement is very important, but in reality driving that continuous improvement sometimes becomes a challenging task. In my Salesforce experience, I faced the below problems when it comes to improvement -
  • I know I need to do improvement, but where is the time? Where to start from?
  • I really need trustworthy tools and guidance to help me driving the improvement
  • I need to convince business in terms of the importance of improvement.
  • I don't want to go to bed every day with the worry that I may be missing something which might break my implementation tomorrow.
That's quite a lot!! 
But now with Salesforce Optimizer, I have the answer to all of my doubts, questions.

Salesforce Optimizer is available in 
  • Classic and Lightning Experience
  • Professional, Enterprise, Performance, Unlimited and Developer Editions
  • Sandbox and Production Environments.
To access Salesforce Optimizer, you need below permissions -
You can find the documentation here -
Salesforce Optimizer Documentation

You will find the Salesforce Optimizer under Setup | Monitor | Optimizer 

Once you click on the Optimizer, on the next page, you need to Launch Optimizer by clicking on the Launch button.

Salesforce will generate the report and send the report to your email address.

Once you will open the report, you will find the report on the below features -

If the implementation is as per the best practices, you will find -

If the implementation is not as per the best practices and needs improvement, you will find -

I really love this new initiative from Salesforce, though there are many scopes of improvements in terms of items to be covered in the report. It will be really great to have Apex Class, VisualForce Page, Test Class included in the report.

There is a success community where we can provide our feedbacks using #OptimizerReportFeedback.

Please let me know if you are using this new feature and what is your comment on this. 
Wishing you a nice weekend.  

Thursday, February 2, 2017

Salesforce Advanced Administrator Certification Tips

I took Salesforce Advanced Administrator certification exam on 31st Jan'17 and cleared it. In this post, I am going to write down how I approached this certification and my study materials as well.
First, to start you, you need the Salesforce Advanced Administration Certification guide. You can download the same from here. The exam format is -
  • Number of questions: 63
  • Type of questions: Multiple-Choice
  • Passing Score: 65%
  • Time: 90 Minutes
So basically you need to answer ~41 questions correctly. 
Note - You need to clear Salesforce Certified Administration Certification before this certification.

Strategy:
I followed the below strategy by reviewing the certification guide and bucketing the items based on their weightages. This is the formula I followed, topics with more than 10% weightage are my priority items and rest of the items are kind of last minute items to check.

With the above strategy, I came up with the below list -
  • Security and Access
  • Sales Cloud Applications
  • Service Cloud Applications
  • Data Management
  • Change Management
  • Analytics, Reports and Dashboards
  • Process Automation
But definitely, I was not sure whether I can answer all the questions correctly from above lists. So my backup plan was to make myself comfortable with the below items as well -
  • Extending Custom Objects and Applications
  • Auditoring and Monitoring
These two sections are comparatively very easy and easily you can answer all the questions correctly. The only section which I was not sure and didn't put any effort at all was - Content Management. Note - I got 2-3 questions from this section in the actual exam.

Study Material:
I started with Partner Training - Administrator Essentials for Experienced Admin (ADM 211). I will highly recommend you to go through this training if you have access to it. The entire training is very much focused. It is my experience that if you can complete these training, 80% of your preparation is done. This training will not cover the Service Cloud part of the certification. But if you have access to Partner Training, there is another training which you should consider as well - Service Cloud for Admin.

But if you don't have access to the partner training, you can concentrate on the below study materials to understand the concept needed. I am writing them below -
I have mentioned all my study materials at the top. Apart from studying individual concepts, I tried to practice the same in my developer org. Practicing the items in your developer org will help you to understand the concept. Remember - Salesforce Advanced Administrator Certification is all about how much you are comfortable with concepts and have you done implementation before on those concepts? So practicing in your developer org will give you that extra edge for sure.

Finally, I have completed few Mock Exams to understand my readiness. Again, don't trust any of the Mock Exam. Use them to understand which section of the exam you need to put more effort. Repeat this same step multiple times until and unless you get the answer - YES for the question - AM I READY FOR THE EXAM?

Below are few Mock Exams I used -

- Sudipta

Feel free to add your comments and add resources which helped you. 

Monday, January 23, 2017

Product Schedule in Salesforce

In Sales Cloud, when companies are dealing with Accounts, Contacts, Opportunities and Products, one thing is very obvious who the company will get the money back from the Contacts for the Products sold to them. Are the contact/account going to pay all together in one shot or are they going to pay over the period of times(Equal Installments)? 

Salesforce has the answer to these questions. In Salesforce you can configure how your customer will pay you the money. Based on that configuration, you can run your business reports to track your sales matrices. The way you can configure this in Salesforce is known as Product Schedule. Product Schedule are the payment or delivery cycles for the products which will be either paid over time or delivered over time. 

In Salesforce we have three different types of schedules. 
  • Quantity Schedule: Choose this schedule when you want your products to be delivered over the period of time. Example - Consider your customer bought subscription of one magazine from you for the next 2 years. Now you need to courier the monthly subscription to your customer every month. So in this scenario, you will go for Quantity Schedule.
  • Revenue Schedule: Choose this schedule when you want your customer to be billed over the period of time. Example - Consider you are selling House Insurance to your customer. The total cost is USD 1200 for one year. But you will bill customer on monthly basis i.e. USD 100 per month. In this scenario, you will go for Revenue Schedule.
  • Revenue and Quantity Schedule: Choose this schedule when a product will be delivered over the period of time and you bill your customer also over the time. Example - Consider your customer bought the subscription of one magazine for next 2 years. But this time instead of charging your customer at the beginning, you will charge the customer on monthly basis and also courier the magazine on monthly basis. In this scenario, you will go for Revenue and Quantity Schedule.
Schedule Type:
Schedule Type defines how the Number of Installments is used. There are two types of Schedule Type 
  • Divide: Here the Unit Price is divided by the number of installments.
  • Repeat: Here the Unit Price is multiplied by the number of installments.
Product Schedule can be enabled from Setup > Customize > Products > Product Schedules Settings.

Note - Read this post from Salesforce on Consideration for using Product Schedules.

Default Schedule:
A default schedule is associated with a product for a particular price book. Every time such product is added to the Opportunity, the default schedule is automatically added as well. Even though default schedule is automatically added to the Opportunity, Sales Rep can still change the schedule. 

Let's go for some Use Cases.

Use Case # 1
Company ABCD is selling subscription of their magazine - "Let's Enjoy". This magazine is getting published on monthly basis and cost of each publication is USD 10.00. Company ABCD is having customer who is planning to buy the subscription for next 2 years. Sales Rep of ABCD will now create the opportunity, add the product and product schedule as well.

Implementation:
Assumption: Product "Let's Enjoy" is having no default schedule setup.
Product is configured as shown below -
Now create the opportunity and add the product to the opportunity as shown below -

Let's configure the Product Schedule now as shown below in the below pictures -

So now Quantity Schedule is configured in Salesforce.

Use Case # 2
Company MNOP is selling "House Insurance". Cost of House Insurance is USD 1200 per year. Company wants to bill customer for this insurance on monthly basis. Sales Rep of MNOP will now create the opportunity, add the product and product schedule as well.

Implementation:
Product is configured as shown below -
Now create the opportunity and add the product to the opportunity as shown below -

Let's configure the Product Schedule now as shown below in the below pictures -
So now Revenue Schedule is configured and the total amount i.e. USD 1200 is divided into 12 equal monthly payments i.e. USD 100.00.

Note - If a product is having both default Quantity and Revenue Schedule, then Quantity Schedule is calculated first to determine the total product revenue. Then the Revenue Schedule is applied to the amount. I will explain this in my next Use Case.

Use Case # 3
Company IJKL is selling Medicine Box (Cost is USD 10.00 per box) to hospital BCD. The quantity of Medicine Box is 1000. Company will deliver the boxes over the period of 12 months on monthly basis. Company will send the bill to hospital quarterly over the period of 6 installments. Sales Rep of IJKL will now create the opportunity, add the product and product schedule as well.

Implementation:
Product is configured as shown below -


Now create the opportunity and add the product to the opportunity as shown below -

Default Schedule will be applied and it will be displayed as -

As the above picture says, the quantity is distributed on monthly basis where the revenue is distributed on quarterly basis.

I hope with the above examples, the concept - Product Schedule will be easy for you to understand. Please provide your feedback. Thanks.