Quotable Quotes for 500 or how I learned to love SFDC CPQ.

Standard

Boy Howdy! It has certainly been a while since I have posted here! Hope everyone was missing me. I have a particularly interesting blog post for you all today…it explains my truancy AND talks about some neat stuff I have been doing!

51kdgksaudl

But, first, we have to go back in time to August 1…You see, on August 1, 2016, I made the jump from where I was to a funky little place called Auth0. There I was, admiring a shiny new macbook and an almost pure like driven snow org when my boss interrupted my revelry by saying:”Hey, glad to have you, we just got Steelbrick and you will be configuring it”. Jump forward to August 10th and I am installing into Sandbox. The next 55 days were a blur (Oh yeah, we went live last Friday, 55 business days after starting!) …taking training, reviewing documentation, asking questions, redoing, redoing and redoing… The net result is, however, that on October 28th we went live with Salesforce CPQ.

Now that you know the setup, let’s get on with the rest of the blog. First off, some high level process orientated goodies.

  • Have someone who knows the company build out the smartsheet workbook…and it should not be the sys admin. I am SUPER fortunate in that my boss was able to crank out the smartsheet doc for me to start with. If I had to do this myself, it would have been a huge timesuck.
  • As a sys admin, figure on 100% participation on this one. I am estimating an easy 400+ hours to get this puppy up and running. Of course, if you read this blog post and follow some of my suggestions, you should be able to shave at least 10% off that total. But, long story short, make it widely known that this is your priority.
  • Simplify where you can. Do you really need that approval step? Do you really want a listing for Product X that makes you no money and you only sell once per year?
  • Embrace the Chaos – things will change. Stay flexible, learn the tool and prepare!

OK –  think those are some good pieces of advice to start with. Now, let’s get into some fun stuff. Here are my top pieces of actual technical advice.

  • If you are running with basic approvals, build out your approval steps as formulas that can be referenced by the approval process. This is perhaps one of my favorite all around tips for salesforce, but super applicable here. Let’s say that you have an approval process that looks at a specific percentage field and you only want an approval to happen if that field is above 50%. IF you have activated that approval process and then need to make a change, you will have to clone / activate / test etc… However, if you make the approval step a yes / no formula that looks at your fields, you can adjust the formula without having to monkey with your approval steps.

~ What? You want SFDC specific stuff? OK – fine!~

  • Create an admin layout for quotes / quote lines. Seriously, go in there RIGHT NOW and do it. Then, add all the SFDCcPQ fields to that layout. This will save you a bunch of time.
  • On the topic of new things. Go forth and create a CPQ ADMIN App. You will then need to create a bunch of new tabs for it. I created tabs for block prices, line columns, actions (products / price), dimensions (products / price) and template sections. Throw that stuff along with the OOTB tabs on the admin app..you will thank me later.screen-shot-2016-10-31-at-1-43-50-pm
  • Replace the “New Quote” button. So, just for a good exercise, after installing the package, create a quote with the out of the box new quote button. It is brutal. I replaced this with a “Create Quote” button that uses a flow to bring over all the fields I need and also to ask any questions. The net result is that I get less confusion and a way faster process.
  • I also want to call out the field “Watermark Shown” on the quote layout. This field is what controls if a watermark is shown or not. Add it to your layout and be aware that it defaults to unchecked, so will have to devise a mechanism to default it to checked (Cough, flow, cough).

I think this covers the basic stuff. I will try to write more as I think of it. Overall, the experience was a good one. I would HIGHLY recommend that if you are a small shop and you can spare your sys admin for a couple weeks that you try and do this yourself. It is totally doable and as an upside, you get to know where all the dark corners are and how to fix stuff on your own.

Anyone else mess with SDFC CPQ? What has been your experience? Any specific section of the above post you want me to expand on?

Advertisements

Fuzzy Searching in Salesforce Flows

Standard

Salesforce flows are a magical thing, like good coffee at work and unicorns.

coffee unicorn.jpg

This is how I want my coffee delivered.

 

I have come to realize that there are limits to even the most magical things (BOOO!).

The limitation I have found in flows is around how you search for records…but, let me be clear, it really isn’t a big deal. For most people, finding records using the typical “equals”, “contains”, “starts with” and “ends with” functions will work just fine. I however, found myself going down a path where that wasn’t going to quite cut it. The challenge is how to search on a text input in a manner that is more google like. I don’t know what the kids now a days call it, but back in my day, we might call if “Fuzzy Matching”.

Fozzie_bear.png

Fuzzy, Not Fozzie!

For example, let’s revisit my Jaeger Dispatching System (Special Note, Pacific Rim 2 is scheduled). This system uses dynamic drop downs for the Jaegers, but, what happens when you have a bunch of Jaegers’?  You can build out a record search based on a text box, but, as mentioned before, you are limited to “equals”, “contains”, “starts with” and “ends with” functions. At this point, you might be saying, fine, just use a “contains” operator…and that would work, except what happens when the user spells something wrong? Contains is just two wild cards, so if you entered in “Dangur” instead of “Danger” you would not get a hit.

 

What happened next is pretty funny. I started thinking about how there are patterns in words…and then started thinking about how the pairs of letters could work. Spoiler alert, it totally worked. I proved it in Excel by just using a vlookup and some formulas, so I got pretty excited. It was then that I googled this matching pairs thing and found out that yep, some one wrote about all the fancy math behind it.

http://www.catalysoft.com/articles/StrikeAMatch.html

So, after building out the proof in Excel that this would work, I set about trying to get this to work in Salesforce…specifically a flow. I want to be able to enter in some characters into a text box and see returned results based on how well they matched my search term.

The first thing I did is create a field that removes the spaces from the Jaegers’ names and made them lower case. I don’t want it being “Cherno Alpha”, I wanted “chernoalpha”. This is done via formula field. If doing this in real life, I would build out my formula to also remove punctuation, but this is just for my Jaeger dispatch and my blog, so I am just removing spaces.

Thus, concludes the non flow part of this blog…what follows next is like 100% awesome, you have been warned.

TAKETHISCAT.jpg

Woot! FINALLY got to use this meme!

The first couple things are pretty basic, I have a start screen that has a text box. Next, I have a fast lookup on my Jaeger object. This gets all the Jaegers and puts them all in a collection. Next up is my loop, where I go through each Jaeger record. The only “gotcha” is that when you do the fastlookup, you need to bring over your formatted text from the record. Screen shots of this would be pretty boring, so here is a picture of all the giant robot toys.Jaeger Toys.jpg

Within the loop, I start with two assignments that copy the formatted Jaeger Name (no spaces) and the search string to variables.
I am going to use these variables for the rest of the functions, including the formulas. I take the search string that was entered and format it up.  I remove the spaces, count how many pairs I have and if the value has a remainder, I also remove the last character. I do this because otherwise the matched pair logic would be searching on a single digit, which would skew the results. The formula also checks if the search string is just 3 char, and if it is, it will treat these three char as one “pair”. Pictures and Text!

Formatted Search String

if(len(substitute({!Search_String},” “,””))<>3,
if(
mod(len(substitute({!Search_String},” “,””)),2)<>0,
left(substitute({!Search_String},” “,””),len(substitute({!Search_String},” “,””))-1),
substitute({!Search_String},” “,””)),substitute({!Search_String},” “,””))

Now I have to compare my first matched pair to the formatted name. of the search string that was formatted. I use a formula to get my matched pair:assignment - formatted search string.png

if(len(substitute({!Search_String},” “,””))<>3,
lower(left({!varSearchStringUseCopy},2)),lower(left({!varSearchStringUseCopy},3)))

 

The flow will next do a name check via the decision function. If the Formatted Jaeger Name contains the current matched pair, the flow adds a value of 1 to the counter variable and adds the current pair to a variable that will show the matches and the ID of the current record to another variable. Ugh, that was hard to read, here is a picture:assignment - match found

If the pair is NOT a match, well, I don’t really do anything with it but you might want to shove it to a debug variable. In fact, if you are starting this from scratch, I would HIGHLY suggest you do this!

Next up is yet another assignment, this time though, we are removing the pair was just searched on. This is done with, you guessed it, a formula:

if(len(substitute({!Search_String},” “,””))<>3,
substitute({!varSearchStringUseCopy},left({!varSearchStringUseCopy},2),””),substitute({!varSearchStringUseCopy},left({!varSearchStringUseCopy},3),””))

remove search string

Once that is completed, we check to see if there are more pairs to check. This is done by looking at the number of pairs left after the current pair is removed. This is in a formula I like to call “DisappearingSearchString”:

len({!varSearchStringUseCopy})

The whole process looks like this:

match process

If all the pairs have been used, the flow then checks to see if there were any matches with a decision point on the counter variable. If yes, then we add the matching data into a variable and then start the loop all over again. Because we will want to display some results in a table like format, be sure to append a text template that has a line break at the end of the string. To do this, create a text template with <br> in it.

build out result line.png

One of the things I really wanted was a way to see how many of the pairs were found in a given record. I do this with this formula:

({!varTripCount}/{!frmSearchStringPairs})*100

 

Before the loop starts all over again, any used variables are reset:

clear counters.png

So, enough talk! Let’s see how this works! For comparison purposes, I put in an alternate lookup that will use the “Contains” search function of what was entered in the input.

I also added more Jaegers, 8 in total!

Jaeger List.png

boom

 

First search string is going to be “Eureka”:

Eureka.png

and here are the results:Search Results - Eureka.png

The “Contains” function did what I expected and returned two records, “Striker Eureka” and “Eureka Smack”. However, it did not find “Striker Eurek”, but the matched pairs function did!

Let’s try this on another scenario. Suppose there is someone new in the Jaeger Dispatching Center and they forgot that it is “Cherno Alpha” and they enter in “Alpha Cherno”.

Search String.png

The “contains” search function would literally return ZERO results, whereas the matched pairs function would show an 80% match with Cherno Alpha.Results - Cherno Alpha.png

So, there you have it. With a bit of work, you can do fozzie…err…fuzzy search results with in a flow with Zero coding!

As always, if you have any questions, comments, or suggestions, please let me know!

Andrew

The hot fudge for your visual flow sundae

Standard

Flows really are a ground breaking piece of technology.

were not worthy

It was evident last year at DF14 by how often there were talked about. More stuff is being added every release and there is a great big community of users!

UI based flows are awesome for internal user, just pop the URL into a button and instant awesome! A question that is constantly being asked is, how do I get the pop up window to go away”

See, when you launch the UI version of the flow, it does it’s merry little thing and then takes you back to the start, which is not always ideal! Being that we are all really clever folks in this community, there are a bunch of ways around this, but a lot of them require visualforce / apex or a URL hack…but not many of them actually address the needs I had:

  • I need this to run with in a community
  • I would like the window to close once the flow is completed

First things first, we need the flow to run in a community. According to page 115 of the Visual Workflow Guide:

“Enable external users to run your flow by adding the flow to a Visualforce page and distributing that page through a Force.com site, Customer Portal, or Partner Portal.”

OK, no big deal there. This topic has been covered extensively on this blog and others! As a side note, this is how you get flows playing nicely with Salesforce1, so head over here to learn more…I will wait!

Ah, you are back! Now that we have a flow that will run on communities or internally. How the heck do we get the flow to close out the window? Well, after googling various iterations of “closing visualforce window” I finally just decided to google something like “close browser window javascript” (This was after googling “Moscow Mule Recipes”).

I wish this just came from one source, but I was really using the google hive mind that day! What I ended up doing is using some javascript in a visualforce page called “ForceClose”:

<apex:page showChat=”false” showHeader=”false” sidebar=”false” applyBodyTag=”false” applyHtmlTag=”false”>
<html>
<head>
<title>ESCAPE</title>
<script>
function closeWindow() {
window.open(”,’_parent’,”);
window.close();
}
</script>
</head>
<body onload=”closeWindow()”>

</body>
</html>
</apex:page>

NOTE! If this code looks familiar to someone, please let me know so I can give you a hat tip from little corner of the web!
NOTE + 1! I still have my #ClicksNotCode card, so I would imagine this is not near good code!

Now I have a flow that runs in a Visualforce page AND a Visualforce page that should (in theory) close itself. It is time to…wait, I wish this step could be more dramatic…maybe you could read this in a monster truck voice? Just in your head so you are not disturbing your neighbor! OK, carry on…join the two pages together! Just set your finish location on your flow visualforce page to be the forceclose page!Add Finish Location

And, that is that! So, how does it work? Well, pretty darn good! The super sweet thing though is that this is reusable! I now used the “ForceClose” page 5 or 6 times in various flows, and that is really nice!

As always, thanks for reading the SFDCinSEA blog! If you have any questions or comments, let me know!

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

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