Wednesday, January 29, 2014

Email to Case: Specify From Addresses and Setting up Case Feed

The Question:

So this is a simple one, but the question seems to come up all the time, especially with people who are less familiar with Service Cloud. Can I specify the "From" address on case emails so it doesn't default to the Agent, but rather to a address that makes sense like, "Support@mycompany.com"?

The Answer:

Yes!

How?

Good question. The easiest way, is to use the coolest Service Cloud Feature. It's called, Case Feed. Haven't heard of it? Shame on you! It's fantastic, and will make your Techs lives better. Check it out today! 
I digress, the great thing about Case Feed is that it allows you to specify in the individual page layout the ONLY email addresses allowed as shown below, here's how I did it:

1-) ENABLE CASE FEED! This  might be the hardest step for many of you. But don't be intimidated, all of your existing case page layouts, record types...etc will stay intact even if you enable case feed. Also, you can have it on a user by user basis, so some users see case feed, and other users see the standard case page layout!

To Enable case feed go to Setup->Customize->Cases->Support Settings here you will check the checkbox that says, "Case Feed Enabled"

Ok, now it's enabled. What next?

2-) Next you'll have to  setup your page layout and record type. If you navigate to the case page layouts you'll see a new section. It looks like this:
The key here is to notice the middle section. Page Layout for Case Feed Users. It's telling that it says, "FOR CASE FEED USERS" this is Salesforce's way of telling you that only certain users will see these page layouts.  Also you should notice the little drop down arrow.

If your anything like me and come across something like this in Salesforce you have to click it, which you should do anyway.

You'll now be presented with three options:

  • Edit Feed View
  • Edit Detail View
  • Delete
Delete is straightforward and we'll skip that. Edit Detail View is going to be the "Detail" part of your new case feed. Or in other words where you add and remove fields.

The Feed View is where you get to introduce cool new stuff! Primarily where you can specify the "FROM ADDRESS(ES)". This is shown below:


Now that it's set your outcome should look like this:



Look how pretty! It defaults to my support address now. I didn't have to do anything else.


Notice that when I click on the drop down there is no other option available. Not even my own address. No longer do I have to worry about clients responding to an email from a tech and it going into the Technicians personal email box! It will always come back to salesforce.

The last thing that you want to do in setting up case feed is start to enable it for end users. To do that there is two things.
  1. Ensure that the new "Case Feed Page Layout" is assigned to a record type. (Just like you would any other page layout)
  2. (And this is VERY important), From the PROFILE update the "Use Case Feed" permission to TRUE.

That's it. You've both now enabled Case Feed, and narrowed the available Emails for a single page layout. Your support center can now send and receive emails flawlessly with Clicks and Not Code!






Tuesday, January 28, 2014

Formula How To's: How do I extract an exact value from a comma separated list?

How do I extract an exact value from a comma separated list?

Recently, I was presented with the challenge of trying to extract an exact value from a comma separated list. In my scenario, I was trying to identify that one of the values in the list, was an exact match to a specific value on the current user's record. 

Why would I want to do this? Specifically, this allows me to use a "True" or "False" value in a list view, report or dashboard to display records. This presents the idea of a "dynamic" list, report or dashboard that is specific to the user viewing the list, report or dashboard without changing the data or the parameters thereof. 

Scenario:

As previously stated, I had a field that was a concatenated comma separated list. In my scenario this field was being set by a trigger, but regardless of how the data gets in the field the idea is the same. Next, I had a field on the user record that may have been a value in the comma separated list at anyone time on any given record. 

Formula:


AND(
If( 

/*Checking to see if the initials are here at all*/
Contains(Field_Im_Looking_at__c,$User.User_Field_value__c)
, True, False),
OR(

/*Checking for an exact match in the first set of values*/
IF(Find($User.User_Field_value__c+',', Field_Im_Looking_at__c)>0, TRUE, False),

/*Checking for an exact match somewhere in the middle. */
IF(Find(','+$User.User_Field_value__c+',', Field_Im_Looking_at__c)>0, TRUE, False),

/*Checking for an exact match at the end of the string */
IF(TRIM(RIGHT(Field_Im_Looking_at__c, LEN($User.User_Field_value__c))) = $User.Field_value__c, TRUE, False)
))

Break it down:

Ok, so breaking down this formula, I've changed the field names to "Field I'm Looking At" and "User Field Value" for simplicity sake. In the "AND" statement, I am looking to see if the value even exists within my set of values, and then the second condition contains my "OR" statement which searches for my exact value. You might not need the "AND" statement at all, and could probably do this with just the "OR" statement, but this worked for me and so I kept it like that.

Within the "OR" statement, I am checking for three conditions. They are:
  1. Is my value the first value in the list?
  2. Is my value a middle value in the list?
  3. Is my value the last value in the list?
The first two values are fairly easy to search for because I know that my value will look like: "VALUE," or ",VALUE," it's important to recognize the commas here. They are what ensure you are getting the exact value and not a partial value.

Note: If you have the scenario where a partial is possible with the end of the value (or in other words the first value in your list has a potential for being a partial), you might want to modify the first if Statement to be something like:

IF(Trim(Left(Field_Im_looking_at__c, LEN($User.User_Field_value__c))) = $User.User_Initials__c, TRUE, False)

In my scenario this wasn't possible and so I did not account for it.
What does that do? Well, simply it takes the value from the user record and trims everything but the number of characters for the value you are looking for. It then will compare the two values to see if they are a match. If they are, then you get a "True", if not you get a "False".

Application for use:

Now that I have this formula, I inserted it into a Formula Check box field. Now my users can leverage this field in list views simply looking for a "True" or "False" value to know if the records are applicable to them. This cuts down on a lot of complex reports and filtering for my end users. I hope it's helpful to you and as always this is one more thing that you can do in clicks and not code.