Ensuring Data Quality with Validation Rules

14494598091_c20d191f6e_z

Let’s just say that having a messy room was not an option when I was growing up. I was raised in a house where being organized mattered. That even applied to chores.

And that philosophy has carried over to my job as a sales operations specialist. I’m always looking for ways to keep our Salesforce instance organized. I want the highest quality data possible, and that means making sure all the relevant information is in its proper place. It’s the Salesforce equivalent of making sure clothes are neatly folded in dresser drawers.

One way of helping maintain a structured Salesforce instance is by using Validation Rules.

Here is Salesforce’s definition: “Validation Rules verify that data a user enters in a record meets the standards you specify before the user can save the record.” Yeah, that’s a mouthful. In plain English, Validation Rules force users to add more pertinent information to a record.

Salesforce has some required fields that must be filled out on every new record. You know, standard information like the person’s name, company, contact information and so on. But you can also add Validation Rules that force you to add supporting data that improves the quality of that record. It’s a way of guaranteeing that you’re not going to miss information that’s important to your business.

For instance at LeanData we use a Validation Rule to ensure we know the specific location of new accounts within California. When a sales rep adds a new account to Salesforce, he or she enters “California” is the state field. But we want to know where in California that account is located. That’s why we created a rule that requires the sales rep to add that additional information about the city for the account.

You can’t save the record in Salesforce until those blank fields are completed. And if a rep tries, this happens.

Before

So, this is how we create that Validation Rule.

STEP ONE: In your search bar, look for “Accounts.” Then beneath “Accounts,” select Validation Rules. Click New, which takes you to the Account Validation Rule page.

STEP TWO: You will have to provide a unique Rule Name. In this example, we’re using “California City Rule.” Check the Active box and provide a brief description of the rule we are creating. In this case, I’m writing: “When the Billing State field is California, the Billing City field cannot be blank.”

Step 2 (1)

STEP THREE: Now you will need to determine your Validation Rule’s Error Condition Formula. Since our Validation Rule is going to include multiple logic statements, we will choose a Function in the box on the right-hand side of the screen. Select “And” and that automatically will insert the “And” function into your formula box. In your formula box, you will now see written: “AND(logical1,logical2,…)” This is where we insert our logical statements. Replace “logical1” with (CONTAINS ( BillingState, “California” ) ) Now, replace “logical2” with BillingCity = “ ”

End Result Formula:
AND ( (CONTAINS ( BillingState, “California” ) ), BillingCity = “” )

Step 3 (1)

So two quick notes. First, BillingState and BillingCity are API names of fields in Salesforce. Second, you should finish this step by clicking on “Check Syntax” to make sure that your formula has no errors.

STEP FOUR: You need to create an error message. This will appear when a rep doesn’t enter the city and zip code information. (Essentially, you’re telling the rep that he or she is not passing “Go” and will not collect $200 until filling out that information.) In this case, our error message will say: “When the Billing State field is California, the Billing City field cannot be blank.” Then you have to tell Salesforce where to put the error message. Depending on your account layout, I recommend putting it at the top of the page.

Step 4

That’s it. So what we’ve done is create a Validation Rule that forces reps to fill out that important information. The ultimate result is your data quality will be improved. And your Salesforce instance will be a little less messy.

 

About the Author

Jonathon J. Leon Guerrero is a pre-sales solutions consultant and head of Sales Operations at LeanData.

More Content by Jonathon J. Leon Guerrero
Previous Article
A Tale of Three Sales Processes
A Tale of Three Sales Processes

The challenges for sales and marketing operations pros never end. Dirty data. Frustrating tools. Inefficien...

Next Article
Opportunities, Marketing Touches and The Power of One
Opportunities, Marketing Touches and The Power of One

There’s a lot of value in building reports in native Salesforce with an object and its child objects. And o...