Fun with Formulas

I know that formulas may not seem like a “process automation” but I think it meets the criteria because it’s automating an additional step for a user while insuring data quality.  Any time we can automate something for our users we’re helping to minimize user error or forgetfulness and saving them time and effort.  For the savvy admin formulas are a lifesaver.

#1 What should an admin consider before creating a formula?

  • Keep in mind that formula fields are read only, only the formula can define the value in the field.
  • Does the formula calculate differently depending on the scenario?
  • Test the formula in a sandbox environment before adding it to the page layouts in production.
  • If a formula is complex, it helps me to write it out on paper before building it in the formula editor.

#2 Steps to create a formula:

  1. Define the formula parameters before building the actual field in Salesforce.  
  2. Name the formula field and select the formula return type.formula1
  3. Build the formula.  Here is a list of formula operators and functions with explanations.  I prefer to build formulas in the Advanced Formula builder.formula2
  4. Confirm the formula syntax is accurate.formula3
  5. Define how blank values will be handled.formula4
  6. Set field level security and add the field to the necessary layouts, just like with any custom Salesforce field.

Now, for some of my favorite formulas!

#3 Example -The Power of One

There are many blogs and community answers that reference this concept created by Thomas Tobin.  Basically you’ll create a formula field on an object, the formula will equal 1, it’s that simple.   

Power1

So, why is this such a big deal?  Well now you can do math on things like the average number of activities on Closed Won opportunities.  By adding this formula to Activities and Opportunities we can create a formula in a report that will calculate and visualize the average.

   Power1v2

#4 Example – Image formulas

It’s always nice to allow your users to have a visual on their records, in list views or reports.  Formulas that display images based on a set of criteria are a great way to impress your users and your manager with your admin super powers.  Here’s an example, I’ve built an event management application for my event planning team, I’d like to display a warning on the Event Milestone Tasks when it is overdue. 

image

The IMAGE function is comprised of 3 parts; the image location, the alternate text and the size.

**For bonus points, a rollup summary field can be used to allow the event management hierarchy to roll up so that the warning image would display on the Event parent record record anytime one of the child records in the event plan was also overdue**

#5 Example – User ID formula

Most of the time the standard Record Owner field on every record in Salesforce all we need to create views and reports on the records that a user owns (ex–My Cases).  We can do this by selecting My in views and reports.

My Report  My View

But we can’t use the Salesforce standard ownership field to reflect when a user is related to a record via another lookup field.  For example, in our Event Management app the Event Owner/Record Owner might assign Event Milestones to other users.  The assignees would want to see only the work that has been assigned to them.  We can create a hidden checkbox formula field that will check to see if the user viewing the record is the user in the Assigned To field.  

My formula

Now, as an admin I can create a single “My Assigned Records” view or report for my users to use, instead of having to hardcode their name in separate views.

My formula view

A system admin should look to formulas to reduce keystrokes for users, get rid of manually calculated math (all of it), and to enhance data quality. Making things easy and accurate every time increases user adoption and makes everyone much much happier.

Come back next week for Dependencies and Validation rules!

Check out the Saasy5 Pinterest board for more process automation resources.

Visit Saasy5 on Pinterest, each blog will have a board with pins to the resources used to write the blog.  Here’s this week’s board.  Since the Salesforce world is HUGE let me know if I missed something that should have been pinned and I’d be happy to pin it.

Advertisements

5 Things to Think About Before Automating a Process

Salesforce has done an excellent job of providing tools for a system admin to use declarative process automation.  In the next few weeks Saasy5 will review several of the process automation tools available to admins; starting with the basic and moving to more complex.  I’ll use examples to review the functionality of each tool.  But first I wanted to spend some time on what factors admins should consider before automating a process.

1. Is the process consistent every time it’s executed?

While no process is exactly the same every single time it’s executed, if a process executed in the same way based on a set of criteria the majority of the time it should be considered for automation.

2.  Does the process have multiple steps that are replicated?

A lot of times users get lost and fed up in Salesforce when they are required to execute the same action repeatedly.  Enter process automation!!!  Salesforce has a tool that can do that for your users so that all users have to do is trigger the automation process by entering a set of criteria.  This saves them time, increases adoption and decreases the risk of human error.  Oh yea, and it will save you some headache!

3. Does the process involve other teams?

It’s important to think about the who is involved in the process you’re trying to automate.  Are there multiple  groups or teams involved in the process?  How will the process transition from one team to another.  If you can, automate those transitions between team members because each transition is a point where the process can easily get off track or an important step can be missed.

4. Does leadership need to visualize the status of the process on each record throughout the org?

Always consider what leadership will view as success when working in Salesforce.  What are the metrics they are looking at to quantify the success of a project?  This goes for process automation too.  Are they looking for time saved internally?  A more seamless customer experience? Cost savings? Or insight into individual workloads?

5. What steps need to be tracked in Salesforce and what steps, if any, are performed outside of Salesforce.

Process automation helps our users do their jobs more efficiently because the system is doing the work for them.  It helps leadership know that a process is being executed properly. And it helps admins ensure that data is accurate for a given process.  The ultimate goal should be to keep as much of the process as possible in Salesforce or at least tracked in Salesforce.

Even after considering these 5 items there are crucial interactions with clients and team members that can’t be automated and require a personal touch.  I once tried to automate a process that really needed personal touch, it failed miserably, clients felt less valued and it hurt the work we’d done to try to help them in the first place.  

I’m looking forward to diving deep into the Salesforce toolbox of automation!

Visit Saasy5 on Pinterest, each week I’ll have a board with pins to the resources I used to write the blog.  Here’s this week’s board. Since the Salesforce world is HUGE let me know if I missed something that should have been pinned and I’d be happy to pin it.