11. Validation Rules

11. Validation Rules

One of the most challenging tasks in CRM system is ensuring the validity of data in it. A poorly maintained set of data can cost a company in more ways than one - your activities are slowed down, you will have inaccurate reports and it's plain annoying to have to manually verify details of each record when you have more important activities to deal with.


Validation rules help you overcome this problem by arresting the wrong kind of data even before it can enter CRM.

Basics of Validation Rules

  • Validation rules in Zoho CRM will allow you to define the accuracy and validity of the data  that enters CRM. That is, you will define the undesirable values for a field in a validation rule. If a field value entered for a record matches the criteria defined in the rule, CRM will throw an alert and will not allow the record to be saved.
  • While defining the validation rule you can choose whether throw an alert when specific condition is met or when the condition is not met.  Example : You want the deal discounts to be 15%. You can define a validation rule in two ways:
    • Throw alert when condition is not met - User will be alerted whenever the condition is not met or the amount entered is less than 15%. 
    • Throw alert when condition is met - User will be alerted whenever the discount amount entered meets the specified condition or is more than 15%. 
  • The error message is customizable.  Example : You don't want deal discounts ever to be greater than 15%. If you were to set this validation rule in CRM, the essence of your validation rule would be the following:
    • "If Discount is greater than 15% throw an alert message".

      Error to be displayed: "Sorry! We don't allow a discount greater than 15%".

  • You can further drill down the rule by defining different custom error messages based on specific criteria. For instance, the discount for India should not be greater than 15%, but the discount for the UK can be upto 20%. Here you will have branch conditions for the discount fields and specify appropriate error messages. You learn more about these multiple conditions in the following sections.
Availability
Permission Required
Users need Module Customization profile permission to create validation rules.

Create a validation rule

  1. Go to  Setup  >  Customization  >  Modules and Fields.
  2. Select the module for which you want to create the validation rules.
  3. In the [Module] page, click the  Validation Rules  tab.
  4. Click  + Create Validation Rule.
  5. In the  Create Validation Rule Popup  window, perform the following actions:
    • Choose the layout  that the field you wish to validate, belongs to.
    • Choose the field  and define the primary condition to initiate the rule.
      For instance, if you want to validate the discount field to keep out discounts more than 15%, your primary condition will be,  "Discount > 15%" .

  6. Click  Next .
  7. In the  Validation Rule Editor , specify the criteria for validation.
       

  8. Select an  Execute rule  from the drop-down list.
  9. In the  Validation Rule Editor,
     enter the alert message  that should be thrown for records that meet the condition.
    Example:  Sorry! We don't allow discount greater than 15%. 

    Note that this error message will be displayed for  all the records  that meet the criteria. Which means, whenever a deal is created with more than 15% discount, this error message will be displayed.

  10. Move your mouse over to the  More  icon and click  Edit , when you have to create multiple conditions.
    For instance, sometimes you may have policies that define discounts based on the region. Say for India, the maximum discount that can be offered is 15%, but in the USA, it can go up to 20% and so on. You can define these additional conditions in the validation rule and customize the error messages as required.

  11. To  Which records would you like to apply the rule on?  select  Choose based on specific conditions.
  12. Define each condition and specify the appropriate error message.
  13. Click  Add another option  to change the value of the primary field and configure different alert messages as required.
  14. Click  Save .


    Now, depending on the validation rule, different error messages are displayed when the Region is chosen as UK and India.

Note
  1. If a primary field or a secondary field used in a validation rule gets updated via workflows, Blueprint, APIs, Import or Webforms, this field update takes precedence. Which means, the validation rule gets overwritten by the field update. As a consequence, CRM will accept the value entered a result of the field update over the validation rule. Learn more about the consequences  here .
  2. Following is the split up of number of conditions within a validation rule.
    1. 10 Parent Conditions per rule
    2. 5 Child Condition per parent condition
    3. 5 criteria per child condition
  3. Validation rules are layout-specific. This means, under a single module, say Leads, you can configure different validation rules on the same field for different layouts.
  4. Validation rules are executed in the order in which they have been created.
  5. Validation rules cannot be supported for Lookup, Multi-select lookup, Multi-picklist, Formula, Auto-number and Multi-line field types.
  6. When you create a validation rule as well as Blueprint validation for the same field, and if the two conditions are different, Blueprint overrides the validation rule.
    That is, as long as the field is within a process, the Blueprint validation is applicable. When a record has exited a process, the validation rule is effective.
  7. Validation rules are supported in the following areas:
    1. Create (Web version)
    2. Quick create (Web version)
    3. Edit (Web version)
    4. Quick edit (Ajax - Web version)
    5. APIs
    6. Copy customization
    7. Sandbox
  8. If records generated via webforms meet the validation rule criteria, they will be submitted for manual approval of records
  9. For existing rules, if you want to specify whether the alert be thrown when the condition is met or not met, you can simply edit the rule and choose  When criteria is not met or  When criteria is met  under  Execute Rule.

Example Scenarios

Following are a few more day-to-day example scenarios in which you can configure validation rules.

  1. If the  Phone Number  field does not contain 10 digits, throw an alert.
       

  2. If the  SSN  field does not contain 9 characters, throw an alert.

  3. Holiday Inc  needs to validate the age of their travellers in special cases. Anyone under 18 or over 35 cannot be enrolled in adventure trips. So here, the validation rule could say,  If Age is Not Between18 and 35 , throw an alert.

  4. Zylker Inc is a software company that offers in-person product training as a separate service. However, for a customer to request personal training, they should have purchased at least 10 user licenses of their software. Otherwise a training request cannot be accepted.
    So a validation rule could be created to address this situation. If  Training  is selected as  Required , but  Number of Users  is less than  10 , throw an alert - Sorry, we need a minimum of 10 users for training request to be accepted. This can be further drilled down, based on the product chosen.
    • If Product is A - 10 users
    • If Product is B - 20 users
    • If Product is C - 30 users and so on. 


  5. If Lead Source is  Chat , but the Skype field is {Empty}, throw an alert.
       

Delete a validation rule

When you delete a validation rule, the rule as well as the alert message associated with it will be deleted. When you attempt to delete a field associated with a validation rule, you will be prompted to first delete the rule, after which you are free to delete the field.

To delete a validation rule

  1. Go to  Setup  >  Customization  >  Modules and Fields .
  2. Select the module for which you want to delete the validation rules.
  3. In the [Module] page, click the  Validation Rules  tab.
  4. Point to the rule you wish to delete and click the  Trash  icon and confirm the action.
    • Related Articles

    • 14. Configuring Workflow Rules

      Workflow Rules in Zoho CRM, are a set of actions (email notifications, tasks and field updates) that are executed when certain specified conditions are met. These rules automate the process of sending email notifications, assigning tasks and updating ...
    • 17. Scoring Rules

      Scoring rules help you prioritize leads, contacts, accounts, and deals based on record properties like fields, and customer touch points such as calls, emails, social signals, etc. You can assign positive and negative points to each property while ...
    • 13. Automating Workflows - An Introduction

      Workflow management helps you to automate your sales, marketing and support. You can automatically assign tasks to users, based on the criteria defined in the rules and update certain fields.  Workflow automation consists of the following components: ...
    • 16. Creating Workflow Tasks

      Workflow Tasks are among the actions associated to a workflow rule. A task is an activity that is assigned to a user. When you associate a workflow task to a workflow rule, it is automatically assigned to the user when the rule is triggered for the ...
    • 15. Email notification

      Email Notifications are among the actions associated to a workflow rule. They are email alerts that are sent to leads/contacts and users in the organization. When you associate an email notification to a workflow rule, the selected email is ...
    • Recent Articles

    • Add apps in Zoho ONE

      Log inZoho One and then clickDirectoryon the left. Go toApplicationsthen clickAdd application. Use the search bar to find the required application, then clickAdd. If you have one or more accounts in the application, you would be asked to choose one ...
    • Add SAML on Zoho ONE

      Note:See our application directoryto see if the application you need was already integrated with Zoho One. Log inZoho Oneand then clickDirectoryon the left. Go toApplicationsthen clickAdd application. InApplication without directory, clickAdd. Name ...
    • 24. Sync with Google Calendar & Contact

      This feature is for the Google Users. Google Apps users can refer to Zoho CRM for Google Apps Users Synchronizing calendar entries of Google Calendar and that of the Zoho CRM Calendar is now made easy with the Google Calendar Synchronization feature. ...
    • 23. Email Sentiment Analysis

      Sales team receive hundreds of emails every day but the ones that have a negative tone usually require an immediate attention over the others. But to identify the emails that need to be prioritized or require immediate attention, a rep has to leaf ...
    • 22. Zia competitor Alerta

      Every time a lead or a contact mentions your competitor in their email content, Zia will identify the name and notify the sales reps (or CRM users). They can take insights from their conversation, make a note of their interests, and understand their ...

    Videos