Category: deployment

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

Read More

How to handle DUPLICATE_USERNAME error while performing deployment

Recently, while doing deployment through change set, I faced an issue -System.DmlException: Insert failed. First exception on row 0; first error: DUPLICATE_USERNAME, Duplicate Username.Another user has already selected this username.Please select another.: [Username]”The username used in test classes were definitely unique, but still my test classes were failing with the below error message. After spending some quite amount of time, I have understood the problem. So thought of putting this in my blog hoping that it may help someone in future.So here it goes -Error message -System.DmlException: Insert failed. First exception on row 0; first error: DUPLICATE_USERNAME, Duplicate Username.Another user has already selected this username.Please select another.: [Username]”Reason -Usernames are always shared across instances, but not across environments. It means if a user is having username as test@test.com in any sandbox, then this same username you can’t use in any other sandbox instances (CS*), but you can user the same username in production sandboxes (NA*, EU*, AP*). Uniqueness is always checked during deployment when tests are run. So an insert from test class will also fail if the username is already registered in another org in the same environments. So we need to make sure the uniqueness in maintained in test classes.Resolution -To be 100% sure that the username used in test classes are unique, you should follow the below approach to define the username –    String orgId =...

Read More

Salesforce Deployment Guide using Ant Migration Tool

In Salesforce, we have three different ways by which we can perform the deployment activities. They are -Change Sets – This is available from Salesforce.com site.By using “Deploy to force.com server” option in Eclipse.Using Java based tool – ANT.In this post, I will provide a complete deployment guide using Ant Migration Tool.Before I start, let me tell you the prerequisite for doing deployment using Ant Migration Tool.Requirement – Java: You should have java installed in your machine. To verify whether you have java installed, do the below steps -Open a command promptAt the prompt, type java -version. You should see something like below which indicates your installed java versionRequirement – Ant: You should have ant installed in your machine. To install ant, do the below steps -Download ant from http://ant.apache.org/bindownload.cgiSet environment variable “ANT_HOME” which should be the path of your installation. Add the bin folder to your path as well like %ANT_HOME%/binVerify by issuing the command ant -version from command prompt. You should see something like below which indicates your installed ant version.Once you have configured Java and Ant successfully into your machine, it’s time to download the Force.com Migration Tool. You can download the same by logging into your Org and then Setup | Develop | Tools and then click Force.com Migration Tool. Once downloaded, extract the zip file and copy ant-salesforce.jar file to the lib directory of your ANT...

Read More
Loading