Cleaning the data that matters…and not all data matters!

Standard

In my previous post, I alluded to a list of 5 concepts that make data cleansing a bit easier (Not fun, not easy – peasy but easier). In this post, I am going to expand on the concepts of “Knowing your data” and “Classify your data”

It's about half the battle

GI Joe talks about knowing

.But, before we get into the methodology and the doing, let’s talk about tools used. We are actually only using two tool to build out the functionality found with in this post, reports and formulas. However, because the methodologies discussed below is different than most organizations approach to cleaning data (Ocean…Boiling) there will be work on you to get folks bought into the ideas of not just trying to clean everything. So, I guess if you want to get technical, a third tool is the soft grey matter inside your noggin!

First things first. To help me “Know” and “Classify” my data, I am going to write a report that has two bucket fields, “Customer” and “Pipeline”. The bucket fields are looking at two custom field that are rollups counting the number of booked opportunities and the number of open opportunities. These are my two primary classifications because I am going to use a combination of these two classifications to score the value of an account to my company.

1)      Non Customer, No Pipeline (Least Valuable)

2)      Non Customer, Pipeline

3)      Customer, No Pipeline

4)      Customer, Pipeline (Most Valuable)

My fictional org for “Kramerica” wants all 481k of their accounts cleaned. Before jumping in and just starting to cleanse, I set up a report that breaks down an account based on past purchases and pipeline. Just by using two bucket fields, I can see that 14,000 accounts (About 3%) that are high value (Customer with Pipeline), 13,000 (3%) are medium value (Non Customer with Pipeline) and 54,000 accounts (11%) that are medium value (Customer No Pipe or Non Customer Pipe). I have just reduced the pool of accounts that should be cleansed by nearly 83%.

Numbers don't lie

Dry those eyes, it is not as bad as it seems

Unfortunately, there is still a number that is not very friendly standing between us and Maragriatville.

Margaritaville is real, google maps told me!

Which is just outside of Dallas apparently.

So, we are going to take things up a notch and write a set of formulas that will score the data that is entered on our account records. The folks in charge of data management (and that might be you), decided that Address, Phone and Website were most important. Yeah, I didn’t put state / country, but that is because of the change making it a picklist field, and we will just assume Kramerica is using the picklists. I am going to end up creating four formula fields. Three formulas will look at the data contained in the three fields. The fourth field will sum the scores of the three fields and then based on the totals, grade the data “Good”, “Acceptable” and “Poor”. The formulas don’t have to be complex, even something basic like if(len(FIELD=0,1,0), which will check for the presence of any data in those fields.

Just the ones that matter

In this case, red is good because red = less work!

That was a fun diversion, now, go back to the original reports with primary / secondary classifications. We add in the data grading field. Now, you can see how many of your most valuable accounts actually need the most help. In the case of Kramerica, we want to distil down that 14% (68k accounts) even further so we can focus on valuable accounts that have a data score of zero (no values in any of the fields) or one (at least one field has some data in it). Applying the formulas and the buckets to my data set reduces the amount of accounts I need to look at from 54,000 to 18,000.

I think this deserves a quick, bullet pointed recap:

–        Initial data set, 480k accounts

–        Valuable Accounts:

o   Customer / Pipeline (Most) 14,000

o   Pipeline / Non Customer 13,000

o   Customer / No Pipeline 54,000

–        Data scoring of valuable accounts:

o   Zero data score = 5,000

o   One data score = 13,000

–        Reduced my “need to clean” by nearly 90+%

My SFDC admin is amazing

I get this way whenever I shake loose a bit more time in the day.

Yeah, that is pretty awesome. However, there is the question of what do to with all those “other” accounts. Here is where it goes from awesome to AWESOME (in a monster truck voice). Since you have already established what makes an account valuable, once an account meets a certain threshold (gets pipeline), you know that it then needs to be cleaned up…and of course, you know what needs to be cleaned up because you are already scoring it.

2014-06-01 20_51_21-awesome monster truck - Google Search

 

PS – For bonus points, create a nice email alert telling the reps their data is bad, and make it so it sends them that notice every time they edit the account OR opportunity…just put on a timer so it only sends once per day!

Advertisement

Don’t start cleansing data yet!

Standard

Data is a fickle beast.

One minute, you have amazing dashboards and reports… your finance nerds are seeing into the future with clarity a weather man can only wish to have…the next minute, you have gremlins everywhere causing chaos in the most basic of processes and you can only give accurate forecasts for five minutes in the past.

Don't feed data analysts after midnight!

All your data are belong to us!

I suspect this has been happening since mankind developed the first CRM, which was on Oracle Clay Tablets.

Oracle V1

You should see the servers needed for this!

Having been on many data cleansing projects in the past, with many more in my future, I decided to sketch out some ideas I have picked up along the way. Don’t worry, I will go back to my techie salesforce nerd stuff next week!

“It is a never ending story”

Cleansing data is not a project with a start and an end, it is a process that needs to be ongoing. If you have data coming in, you will have data that needs to be cleaned. Build it into your budget, chant the mantra, do whatever it takes, but embrace the fact that as long as you are around any CRM you will be doing data clean up.

“Business Involvement”

Even though dirty data and data cleansing will never go away, it will become a smaller task once you get your users sold on the idea of clean data. At the very least, you need your users to care about the system at the best they will become advocates of clean data. Boeing used to have a program called “FOD FREE”. FOD is “Foreign Object Damage” and it prompted their employees to be active in keeping the work environment clean. It was a huge success through marketing and  engagement, AKA, Business Involvement.

“Clean with a Purpose”

There are two methods to getting business involvement in data cleansing, carrot and stick. Personally, I prefer the carrot approach. Know why you are doing it, and be able to explain that to the business. Tell them in “What’s In It For Me” (WIFM) terminology why their data is changing and what outcomes they can expect. Have them involved in any process modifications or validation rule building. If you get them at least interested in clean data the process will be much less contentious.

“Know your Data”

Seriously, run some DANG reports. Know the numbers because someone will ask. Know the up and downstream impacts of dirty data. Know use cases. Have a really nice power point set explaining this things, and gear the presentations to different user levels. If you do not  know your data, how can you clean it???

On a side note, I swear by “You suck at powerpoint” as a great learning aid around presentations!

“Classify your Data”

Classifying data is just chunking up your data into sound bite groupings. The key here is “Sound Bite”. You can say something awesome like “Customers with an account that has at least 3 contacts that all have been sent an email in the past three years”, but after the first couple words, all anyone will hear is “blah blah blah”. Instead, have sound bite ready classifications. Thinking in “Sound Bite” terms will also help with reporting and formula writing, covered next week!

Here are some suggestions for accounts:

Primary = Customer, Non Customer

Secondary = Active (Open Pipeline), Non Active (No Pipeline)

Tertiary = Marketable (Contacts with Email), Non Marketable (Contacts without Email)

It’s looking a lot like Christmas (Sigh)

What really gets me excited about classifications is that it helps you NOT boil the ocean. It is not unrealistic to have hundreds of thousands of account records, and if you were to set about trying to clean them ALL, you would be wasting time and money on records that really are the equivalent to that fruitcake you got last year. It is just taking up space, but you don’t want to throw it out because someday you might have a reason to use (re-gift) it.

fruitcake

Yes, I did just compare your data to an old fruitcake

The above tips are not the end all be all, just things I have picked up along my career. But, if you are rolling into the discussion on data clean up just keeping these in mind you will be at a point where you have the business engaged in the ongoing process of data cleansing on a known set of data that involve a set of agreed upon classifications…or, in other words, you will be setup for success!

Oh, and now that this stuff is out of the way, we can get back to more techie stuff next week!

 

Andrew

Add followers with Flows

Standard

Chatter (in my opinion) is one of the really neat features of salesforce, allowing users to follow records that might be important to them is just one of the “Killer Apps” of this functionality. Ironically enough, being that this is a social network, is the request for that one can just add followers automagically if  “X” condition is met. There are even a couple apps on the appexchange for that.

Automated Networking, Jumbo Shrimp, Stop / Keep Moving, OxyMoron

Automated Networking, Jumbo Shrimp, Stop / Keep Moving, OxyMoron

To me, this takes a bit of the social out of “social networking”, so I am going to sketch out a solution that is a bit more personable but still makes it easy to add a follower

In a nutshell, it goes a little something like this:

1)      Within a record, the current user feels that another user (or themselves) should be on the follow list

2)      The current user clicks a button. In this case, I have called it “Pied Piper”

3)      A flow is launched that does the following:

1. Looks up a user based information given

2.Attaches that user to the current record as a follower

As usual, I am just sketching going to provide the foundation for this functionality. The magic here is that you can flows to do some neat stuff like attaching multiple users, adding comments, tags, etc. You don’t have to add this stuff in, but I would encourage playing around with it to see what you can / can’t do. Also, a quick Caveat. I found that a user will have to have “Modify All” permissions on the object you are pushing this out to. 

That aside, now we get to the Nuts & Bolts of the matter. I have got a couple of components that I am going to be using:

  1. A visual flow
  2. A custom button driven by a URL
  3. A nice cup of Coffee (Optional, or not)

This flow function sounds exciting and awesome (Follower Updates, Magic!), but is really basic. There are four components to this flow, Entry screen, Record lookup, Record Create and the confirmation screen (optional). There is however a critical variable, varAccountID. This is the variable that houses the ID that is passed over via URL. Just be aware when you are building this out!

The Components

Salesforce Flows, How awesome

On the entry screen, there is a text box for entry of a person’s name. The text box value is passed to the Record Lookup. One of the easiest improvements would be making this multi search (name, ID, email), just something to keep in mind.

Search Box

The flow does a look up on name, and returns the userID.

2014-05-13 13_15_27-Flow Designer_ public_FlowFromFlow

 

 

Next up is the Record Create on the object Entity Subscription. In this case, the parentID is the accountID, but it can be anything. SubscriberID is just the UserId pulled above.

2014-05-13 12_49_55-Flow Designer_ public_FlowFromFlow

Once the record is created, there is a confirmation screen. This is an optional step, but something I like to do.

Confirmation

Now that I have a flow in place, I create a button (Pied Piper) on the account layout.

Pied Piper Button

1 story point was spent on the clever name

This button is nothing fancy, just running a hyperlink that will open up the flow AND push over the accountID of the record the user is currently in. I did add the retURL on the end so that instead of a loop, the user is returned to the accounts page.

Behind the Curtain

Just to reiterate, this is the foundational work. You could implement this into production and have something that works but it isn’t going to be awesome. Here are the required proof shots!

 

As always, questions or comments, hit me up!

 

andrew

What (approximately) 48 hours with Apex has taught me

Standard

Friday afternoon, around 2:00 I got a message telling me to check out SFDC99.com. At first, I was skeptical, here is yet another blog that is going to teach me Apex / java/ html etc…I had read it all before and have failed just about every time. Part of it was how the knowledge was presented, part of it was me saying “It is 20XX, why am I still having to write lines of code” and part of it was that I can do a BUNCH of cool stuff already with the goodies in Salesforce, what will learning Apex do for me.

Apparently, not my future.

Where we are going, we don’t need code

This blog was different though, the tutorials were written in a conversational and logical manner that made sense and also didn’t come across as a developer talking to a kindergarten class.It also dawned on me…I was doing this stuff already. Sure, it might be through flows or crazy clever formulas and workflows, but the logic was there. My bias was pretty much erased completely once I saw this question:

1. If you can solve a business need using either a workflow or a trigger, which should you use?

Always use a point-and-click solution (workflow) when possible!

  • It’s easier for your team to create and maintain workflows
  • Workflows are easier to find when debugging unexpected behavior in your org
  • Workflows never break!
  • You don’t have to write test classes
Pretty much every developer I have ever worked with

In internet time, this meme is so old it farts dust

The reason this question really hit me was because I have ran into MANY developers that are code first, ask questions (and write documentation, test, get feedback on, deploy correctly) later.

Having seen and supported the aftermath of this type of developement, I really took a to the whole #ClicksNotCode and #ButtonClickAdmin philosophy to heart. Seeing a developer actually answer this question like I would was like a golden ticket.

Golden Ticket of Apex

First time your class runs with 100% coverage (even though trigger is 5 lines)

It told me I could still believe in all the good stuff that makes a system like Salesforce.com great WHILE learning the dark side.

So, it has been approximately 48 hours since I started doing this thing, and here is what I have learned:

1)      Just because you know code doesn’t mean you know salesforce.

2)      APEX is way more intuitive than whatever code you might have tried to stumble through last time.

3)      I am really thankful for my time supporting traditional CRM systems (Cough, Siebel, Cough) and having to muddle through gnarly SQL statements.

4)      Having to have 75% code coverage is tough, but if you think about what you are trying to do with your trigger and then build out from there, you will do good.

5)      Try and think how you would write a trigger to handle every transactions like getting coffee.

Next steps? Well, I just got my Head First Java book and have been working through that. Honestly, so far installing the JAVA SDK seems to be the hardest part (and I have installed Linux!), but that really isn’t a surprise since it is an Oracle Product.

Clicks not Code Larry, Clicks not Code

The new westcoast beef

I am also going to keep plugging away on the SFDC99.com tutorials. I have went through Chapter4 and am going to spend some time here getting a better grip on the basics before I move along. I am also going to keep “doing what I do” in terms of new functionality in SFDC. I love all the fun stuff like flows and workflows, but much like a padawan with a new lightsaber, I am going to try and use it as much as I can.

Nuts! My lightsaber test class only ran 45% of the lines!

I missed class picture day

 

Andrew

Delegation Made Awesome (Salesforce1Selfie Number2)

Standard

With my first salesforce1 selfie I took on user setup and reduced my “Click Load” when it comes to setting up users.

For this salesforcesforce1selfie, I am taking a swipe at the delegate process.

The org I support has quite a few approval processes and within these processes are a mix of related user (manager, for example) and named user approvals. Supporting these processes can be quite a challenge, especially around summer time since we are not using the delegate functionality. We have tried to roll out delegates, but never quite get off the ground with adoption. After taking a close look at the delegate function, reviewing notes from our last attempt and talking to the SFDC_IT team member I believe the lack of adoption is due to:

1)      No obvious click path to delegated approver screen (Click on Name, Click on Drop Down, Select “My Setttings”, Click on “Approver Settings”, enter delegate )

2)      Unable to start / stop time delegates

3)     Can’t turn on via mobile

4)     Too much mail if the Delegate is left “on” (See #2)

I believe that if I can add functionality that will help with the above, I can increase adoption of delegates. At the very least, like my clone user app, I can use it myself during the summer holiday season!

Hold on tight, here we go!

images

We got a long way to go and a short time to get there!

First things first, I needed to create an input method for my users that could be both easy to use and upfront. Therefore, I built out a custom object / tab combination, which I named “Out of Office”.

Out of Office

Can’t miss that!

I have as few entry fields as possible, both to speed the time to release but to also make it as easy as possible for the user:

1)      Start Time – Defaulted to current date

2)      End Time – User selectable date fieldThree Fields, one defaults

3)      Delegated Approver – Lookup field to user table

*Now, you might be reading this and shouting / typing furiously/ muttering about missed opportunities. I agree with you, and I feel certain that future revisions will get new / better functionality (Filtered Lookups, Approvals, On behalf of…etc), but this is about a good foundation to build on.

A quick look at workflows and I can see that I will have to do this with a combination of workflows and flows since I cannot update the Delegated Approver field with workflows, and

Narf

You know what I am talking about

In the interest of time, I am going to give an outline of the methods used to get this functionality up and running rather than the step by step.

Step 1, FUNctions used to update the delegate:

Workflow “OOTO Created” is triggered up on record creation. This workflow has two immediate actions, an email alert to both the delegate and the record owner and a flow trigger that runs a flow in the background that handles the actual update to the delegate. The flow really is basic, just a record update. I threw in a lookup out of habit.

2014-04-29 07_56_00-Presentation1.pptx - PowerPoint

The workflow also has a timed based action, which is the secret sauce. This time based action is based on “return date” – 0 and ticks the box “Back in Office”. Do not overlook the re-evaluate workflow rules after field change check box!

2014-04-30 08_30_30-Field Update_ Mark as returned ~ salesforce.com - Unlimited Edition

Step 2, FUNctions used to remove the delegate

Workflow “Remove Delegate” is ran when the field “Back in Office” is set to TRUE. This worklow has two elements (as I wrote it), but could get away with one. The main element is the flow trigger. This trigger launches another basic trigger that just deletes out the delegate from the record owner. The only thing special I did on this was to put in an extra field update in the flow so I can tell if it ran. I have a similar field update in my workflow. I found these to be very helpful when testing because I could visually observe how my updates were working.

2014-04-30 08_42_16-Workflow Rule_ Remove Delegate ~ salesforce.com - Unlimited Edition

Move along, nothing to see here

Now, for the brass tacks, how does it work? Well, it works pretty dang good. I have been monkeying around with this for a couple weeks now and I can attest to the basic functionality. The only real weak link in the process is that I cannot directly influence the field “Receive Approval Request Emails” setting via the flows. That, however, can be handled with business process.

2014-04-30 08_45_27-User Edit_ Andy Johnson ~ salesforce.com - Unlimited Edition

Curse You!

Now, for the 10,000 dollar question. How does it look on Mobile? Well my friends, it looks pretty darn good. Salesforce1 does such a nice job of packaging up the objects created that you get a very nice experience out of the box. This is such a nice contrast to previous mobile versions. I can focus now on making the user experience that much better.

2014-04-29 07_56_56-Presentation1.pptx - PowerPoint

Yeah, that is awesome

For example, I built out a field that shows a message based on a couple parameters: “if(Back_in_Office__c =FALSE,”Out of Office, returning “& text(Return_Date__c) ,”In Office”)”

I added this field to a new compact layout, and viola, the user can now, at a glance, see if they are in office or out of office, and if they are out of office, when they are coming back (NEVER!)

In OFfice

Awwww

Out of Office

Woo Hoo!

 

So there you have it, another piece of adminsitrivia solved with Salesforce, Visual Flows, and Salesforce1

 

Andrew

 

 

More information about my #Salesforce1Selfie

Standard

Salesforce.com is running a twitter contest asking for selfies of Salesforce1 Apps. The majority of posts Salesforce is receiving are user-centric and I think that is great, but just not the way I am going (for now). I built an app for the Administrator. More specifically, I built one for myself. The reason is pretty simple, during my day I get to do a bunch of different things and most are pretty fun. However, setting up new user is not on that list. This is because there are two typical scenarios:

1)      “Hi SFDC Team, please set me up in Salesforce with permissions like my colleague”

2)      “Hi SFDC Team, please set me up in Salesforce” Both of these scenarios can get messy fast…and by messy I mean way too many clicks. I did a quick sketch in Visio and found that at a very high level, there are 7 steps involved in the first scenario. That is way too much (In my opinion) for me to do a couple times a week.

TOO MANY STEPS

More fun than…checks list…not much

Therefore, I decided to make something that will reduce the number of steps AND let me easily share out the process AND can be done via the mobile AND be my entry in the #Salesforce1Selfie contest that hopefully will ensure I can stay somewhere awesome during Dreamforce 14.

2014-04-21 21_09_33-Fitzgerald Hotel - Google Maps

The Fitzgerald…not a bad place, but if I win I won’t be staying there.

There are three basic ingredients to my selfie, which I will go into more detail on in three carriage returns: 1)      Flow

2)      VisualForce Page (Don’t Panic!)

3)      Navigation

The flow starts with the basics “Input, Query, and Output” structure. My input is the name / email / id of the clone source. You can search three different ways from just one text box (More on that here, “One (flow) field to rule them all”). The query returns all the information you need to create the user record, which I had found previously while working creating users with the Excel Connector.

Pulled from Clone Source

Set it and Forget it!

I display that information on the confirm screen, which is where the cloned user email / name is entered. The finish button creates the user.

Create User Fields

And this is why I automate this stuff.

There is one interesting thing I need to call out here. If you were to create the user through the regular method, alias is autogenerated. Not a big deal except that Alias is limited to only 8 digits. I just default it to “NewUser” and will direct the new user to change it. You could do something fancy with workflows if you want. At this point, I have a flow that is crazy handy for use just with in the UI. I do plan on modifying this before I push to production so that the clone user search screen is skipped when launched via custom link on the user page. But what about mobile?

But will it load salesforce 1

“Where is the salesforce1 App?”

I had decided that I wanted to use flows as an app rather than an action. The reasoning is that while in the webUI I am more than likely going to be launching the flow from a user I have found, but if I am accessing via salesforce1, I will be providing the search criteria myself. Therefore, I need to make an app. To use a flow with in an app or even a page is going to require just a little tiny bit of code. It is such a small amount, I don’t even have to give up my hashtag #ClicksNotCode for this blog posting. There is some official documentation out there that will talk about embedding flows within a visual force page. It is really good stuff and I highly recommend you reading it. I have used both the official method and also just used an iframe. Either way seems to work out just fine. You need to make sure to check the box “Available for Salesforce mobile apps”.

iframe visual force

Don’t take away my Clicks Not Code Card!

One thing you might notice is that your performance on the mobile device is not the same as in the simulator. I believe this is because the basic iframe / interview code given is making the device work hard to format the flow page. I consulted with Google and found a write up on panya.com that had a couple things I wanted to try. I was able to see a HUGE improvement in load times by putting in a few extra lines of code. Another tip is to just save this code somewhere and use it as your template.

FASTER!

I am giving it all she got’s captn!

“<apex:page showheader=”false” standardStylesheets=”false”> <html> <Head> <Meta name=”viewport” content=”width=device-width, initial-scale=1″/> </head> <body> <flow:interview name=”Clone_User”/> </body> </html> </apex:page>“ Now that I have my flow and my tab I am nearly ready to roll. I just need to add it to the Salesforce1 navigation. You can find the nitty – gritty here, but it is just as easy as going to Mobile Administration and Mobile Navigation. NOTE! If you do not see your VisualForce tab here, got back and verify that you checked the box “Available for Salesforce Mobile Apps”. Also, I have noticed along with some other caveats, visual force pages that were created before salesforce1 came out are only checked with the Salesforce Touch option. It looks like they cannot be modified to run with in Salesforce1. The punch list is complete at this point. To verify you can use the Salesforce1 simulator (<<Org>>.salesforce.com/one/one.app) or you can also see the results on your mobile device pretty easily by just logging in to your sandbox environment.

flow GO

Step One

Confim screen

Step 2

I really like how this turned out. In a very small amount of time, I was able to: 1)      reduce the amount of clicks in my current process by about 80% 2)      Create a nice URL based process 3)      Create a mobile app for admin use “on the go”   As always, let me know if you have any questions, comments, concerns or interesting ideas you would like me to research!   andrew

One (Flow) field to rule them all

Standard

I love it when in the course of an average day you have that moment when the light bulb gets turned to on, the heavens part and there in front of you is something new and exciting.

Image This is how my light bulb moments look, don’t judge me

For example, I was building out my clone user flow for #salesforce1selfies and started thinking about how I had my search page set up. It was fairly standard with a text box where I would enter in a user ID but like Freddy Mercury, I want it all.

I wanted to be able to search on name,email and user ID and I wanted to do it from within one text box.

Image“One field to rule them all, and in the flow logic bind them”

Really, it sounded pretty simple, but then again, you can sum up the lord of the rings trilogy by saying it was just about taking out the trash.

“All we have to do is throw the ring away, easy – peasy”.Image

 

Actually, it was easy…I mean, this was something I did while on my first cup of coffee. I started with my flow Mirepoix, input screen, query, output screen.

ImageIt’s just the base! You have to liven it up yourself!

To that base, I added in a decision with three outcomes:

Image

1)      Input Text “Starts With” “005”

Image

2)      Input Text Contains “@”

Image

3)      Else assume text is name

Image

These outcomes are each linked to a unique query and assignment:

1)      Input Text “Starts With” “005” –> Query ID with Input Text –> varMatchType = “UserID”

Image

2)      Input Text Contains “@” –> Query Email with Input Text –> varMatchType  = “Email”

Image

3)      Else assume text is name –> Query Name with Input Text –> varMatchType  = “Name”

Image

I put the varMatchType on as a visual debugger because I only have one output screen and I want to be able to see visually how I got there. Image

Fun and games aside, how does this work? Well, it works great! Here are some screen shots to prove it:

ImageImage

 

I would like to think it is because of my super ninja / bow / stealth / flow skills, but the reality is this is just a really good piece of functionality. I really like the potential here. Imagine creating one flow that does this type of analysis and routing…you could use it all over the place!

Hope you enjoyed this…questions or comments, let me know!

 

Andrew