Clone User – Lightning Awesome

Standard

Way back in the old tyme days of 2014, Salesforce was running a contest called #Salesforce1selfie. I decided to try porting my clone user flow (Spoiler, totally worked) but that isn’t the fun part. The fun part was using flows for MY gain!

marsha marsha marsha

Andrew, Andrew Andrew

But, that was 2014 and it is now 2017 and Lightning is now the cool kid on the block. So, going to take a revisit to the old clone the user app and see about making it more 2017 than 2014.

First things first, I had to recreate the clone user flow. Surprisingly enough, you really just need to follow my previous mentioned post and you are good to go. You gotta make sure to activate it though.

The real change is on the page layout. The easiest way to to do this is to go to a user record, click on the gear icon and then click on edit page. Sorry for the crappy screenshot, new computer.

user click on gear.PNG

Now that you are on the page edit layout (I am sure there is a better technical name!), I would do the following, though the ONLY required part is adding a flow widget.

  1. Add in a tab widget.
    tabs
  2. Reorder the tab widget so that related is on the right.
    swap done
  3. Rename details tab to your variation of clone user.
    renamed section
  4. Drag a flow widget to that tab.
    flow widget
  5. Set the flow to be your clone user flow and the variable to be the record id.
    pass variable

Go ahead and save the changes and make sure it is set to be the default of whatever you have setup. Click into a user profile and behold, the tab that says Clone User!

user page

Click on that tab and WOOT, the user ID from the source is passed.

clone user on page.PNG

The rest is literal history. You don’t even need to really update the original flow!

Questions, comments – Let me know!

 

andrew

You know who likes innovating? I like innovating.

Standard

You know who likes innovating? I like innovating.

This-Guy-Jim-Halpert-The-Office.gif

NOTE – Not actual salesforce admin writing blog.

Thus, when I saw that Salesforce Seattle was hosting an app innovation workshop, I decided to sign up.

The class was pretty neat, the group brought out a SE that showed us how to build out some apps and how the new lightning interface was going to make app building EPIC.

And then, just like that, it was our turn to build an app. We separated out into teams and planned (And ate tacos!). We had 2 hours to build out an app that was mobile, had some business value and used the lightning interface….and had a clever name.

No problem.jpg

NOTE – Not actual blog writer.

My team (Fairy Godmothers) decided to tackle a problem that is all too familiar to sales teams (and ghost busters) …you know what I am going to say here, “Who ya Gonna Call”?

ghostbusters6.jpg

NOTE – Not actual team photo

Being that I have never done sales, this is all anecdotal, but the nods of both the AE’s and SE’s in the room told me that I was on to something. I have noticed that a salesperson will get on a call that should not require a technical resource and then BAM! The potential customer brings a nerd along and the hard questions start to flow. The salesperson then is left scrambling for resources, vowing to never let this happen again! The next call the salesperson goes on they invite the SE and the SE just listens in and play angry birds. On a side note, I once worked at a large company that the meetings would get so large because of this phenomenon, it would take like 10 minutes to do introductions.

Being that we only had two hours, I decided to keep this simple. No custom objects, just using the functionality Benioff gave us! So flows were used…because…well…I love flows. But seriously, using flows also gives me the ability to create advanced, code like (Dare i say, low / no code?) functionality without worrying about things like UI and, well, code.

The flow itself is not anything spectacular (two hours!). Screen Shot 2016-12-21 at 10.17.40 AM.pngIf it is launched via the app, it just pulls up a list of the users open opps. The user selects one and then is presented with a list of current active users and a selection around communication methods. Selecting email will send an email, but selecting text sends out an email using the email to phone number “hack” (is it a hack any more after it has been around as long as this one?).

However, there is one bit of fun that I want to call out (as I have done before). I pass a variable to the flow which is then analyzed. This variable is ONLY populated when a flow is launched from a record, so if this variable is populated, we would know that the flow started from a specific record. By doing this, I can build out decisions that adjust the functionality. In this case, I have two start screens, one for when the flow is launched via the app (and shows all opps) and one for when it is launched via record (and just goes right to the fairy godmother selection).

Screen Shot 2016-12-20 at 9.15.09 AM.png

“And then the running back goes around the TE..BOOM!”

By doing this, you can avoid using two flows what is essentially the same functionality.

To get this working on the individual record, you have to use a visualforce page

NOOOOO.jpeg

NOTE – this is the blog author writing code (just kidding).

because the button URL hack just won’t work as expected. You can place a flow on the record page layout, but I wasn’t able to figure out how to pass a value. If you know now, shoot me a tweet (@jok3r4o2) OR send me a message through the success community. If you are local to Bellevue, I will buy you a coffee.
Anyways, not a huge deal to create a VF page. I have documented it a few times AND by doing a VF page on a button, it allowed me to make it mobile really easy by just adding an action!

<apex:page standardController=”Opportunity” showHeader=”false” sidebar=”false” >
<flow:interview name=”life_ring”>
<apex:param name=”varSourceOppId” value=”{!Opportunity.Id}”/>
</flow:interview>
</apex:page>

Alrighty, so that is the nuts and bolts of my two-hour build. Pretty dang happy with this app and will probably put into production. But, how I would I make it better? Well, cue the Scooby Doo transition!

giphy

 

  • Show users that are logged-in. I found a really cool table when building out the flow called “AuthSession”. https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_objects_authsession.htm This is the table that shows who is logged in and how. Now, it wouldn’t be as straightforward as just using this as a dynamic lookup, but still, the idea that you could see who was logged in before you contacted them is pretty great.
  • Finding Relevant Users. Using the power of flows, we could do some data crunching to build out a profile of a specific opp (product, competitor, etc…) and then use this information to pull only fairy godmothers who have had experience in these areas.
  • Gamify! This type of app lends itself to gamification. I would have built this out so that Fairy Godmothers got credit or went up a lead board (AKA, Dashboard) for the help that they do. If you go down the gamification path, brush up on Maslow’s Heirarchy of Needs to figure out how to reward employees.
  • Communicate in multiple ways. I am using email and text, but it would be a good next step to also post in chatter. You could also use a service like Zapier or IFTTT to post to slack.

And that my friends is that! As I said, be sure to check out an app innovation workshop. I came away excited for Lightning UI and all the neat things it can do along with a great app idea and a couple Starbucks Gift cards.

As always, did I miss anything? Do you have a great idea for an app and just need a bit of help? Find me on success.salesforce.com and drop me a line!