Creating Validation Rules - Zoho Desk Knowledgebase

Creating Validation Rules



Go to any website with a registration form, and you will notice that they provide you feedback when you don't enter your data in the format they are expecting. For example, when the phone number field on a form is not filled in or does not contain 10 digits, a message will pop up, notifying you of the error. You must re-enter the phone number correctly to be able to submit the form. This is called form validation — one of the easiest ways to ensure data accuracy as part of your data collection process.

When it comes to customer service, you need accurate data to provide a precise solution. Any conclusion drawn based on inaccurate data can slow you down when you have more important activities to deal with. Validation rules in Zoho Desk help you overcome this problem by arresting incorrect data even before it can enter your help desk.

Availability
  1. Only users with Profile permission to Manage Layouts and Fields can access this feature.
  2. You can create a maximum of 10 validation rules per department.

Basics of Validation Rules
  1. Validation rules enable you to validate value for a particular field to ensure that you receive the data you expect and that it is in the proper format.
  2. When the data entered in records do not meet the standards, you can include error messages to display to users. This way, you can ensure that everyone contributes to quality data.
  3. A validation rule for a field can consist of conditions like whether a value needs to be filled in, a specific expression it shouldn't contain, the minimum and maximum length of the data, whether it needs to start or end with something, or if it shouldn't be empty.
  4. Example:  You want the passport number of travelers when their travel type is "International." If you were to set this validation rule in Zoho Desk, the essence of it would be the following:
    1. Layout: Tickets | Primary field - Passport number | Secondary field - Travel Type
    2. Condition: When "Passport Number is empty"  and "Travel Type is International."
    3. Error to be displayed: "Sorry! Passport Number cannot be incomplete if Travel Type is International".

Note:
  1. If your goal is to require users to enter some value, whatever the value is, don't use text field validation. Check the "Mark as required" field instead.


Creating a Validation Rule
To create a validation rule:
  1. Click the Setup icon (  ) in the top bar.
  2. In the Setup Landing page, click Layouts and Fields under Customization.
  3. Click Validation Rules under the Layouts and Fields sub-menu.
  4. In the Validation Rules page, select the desired module and the department (when more than one exists) from the drop-down menu.
  5. Click Create Rule in the upper-right area.
  6. In the Create Validation Rule pop-up window, do the following:
  7. Choose the field and define the primary condition to initiate the rule.
    For instance, if you want to validate the passport number field, so it is filled for international travel, your primary condition will be, "Passport Number <is empty>."




  8. Click Next.
  9. In the Validation Rule Editor, enter the alert message that should be thrown for records that meet the condition. Note that this error message will be displayed for all the records that meet the criteria.
    Example: "Sorry! Passport Number cannot be incomplete if Travel Type is International".
  10. Move your mouse over a Secondary Condition and click Edit icon (  ), when you have to create multiple conditions.
    As per our example, you can enter "Travel Type" as "International" as an additional condition in the validation rule.




  11. Click the Plus icon (  ) to define multiple secondary conditions and specify the appropriate alert message.



  12. Click Add another option to change the value of the primary field and configure different alert messages as required.
  13. Check Apply to Help Center to validate tickets submitted through your help center.
  14. When you're done, click Save.

Points to Remember
Here are some points to keep in mind while creating validation rules:
  1. Following is the split-up of the number of conditions you can create within a validation rule.
    1. 10 Parent Conditions per rule
    2. 5 Secondary Conditions per parent condition
    3. 5 criteria per secondary condition
  2. Validation rules are department-specific. This means, under a single module, say Tickets, you can configure different validation rules on the same field for different departments.
  3. Validation rules are executed in the order in which they have been created.
  4. If a primary field or a secondary field used in a validation rule gets updated via one of the following means, this field update takes precedence. Which means, the validation rule gets overwritten by the field update.
    1. Import: Updated on importing new tickets or overwriting existing records
    2. Workflow Rules: Updated as a result of workflow action
    3. Blueprint: Updated as a result of the After Transition settings
    4. APIs: Updated via the API method
    5. Web Forms: Updated as a result of submitting form
  5. The primary fields used in a validation rule will not be available for mass updates.
  6. The primary field used in a validation rule must be visible on the Help Center to validate tickets submitted through it.

Deactivating Validation Rule
You can activate or deactivate validation rules at any time. When you deactivate a rule, it is labeled as Inactive. Validation rules can be reactivated when needed.
To deactivate rule:
  1. Click the Setup icon (  ) in the top bar.
  2. In the Setup Landing page, click Layouts and Fields under Customization.
  3. Click Validation Rules under the Layouts and Fields sub-menu.
  4. In the Validation Rules page, click the toggle corresponding to the validation rule to OFF.



  5. Click Deactivate to confirm.

Deleting Validation Rule
Validation rules can be deleted when not in use. When you delete a rule, it will be permanently removed from your help desk and cannot be recovered.
To delete rule:
  1. Click the Setup icon (  ) in the top bar.
  2. In the Setup Landing page, click Layouts and Fields under Customization.
  3. Click Validation Rules under the Layouts and Fields sub-menu.
  4. In the Validation Rules page, move you mouse pointer to the rule you want to delete and click the Delete (  ) icon.
  5. Click Yes, Delete to confirm.

Notes:
  1. When you delete a validation rule, the rule and the alert message associated with it will be deleted.
  2. When you attempt to delete a field associated with a validation rule, you will be prompted first to delete the rule, after which you are free to delete the field.

    Zoho DataPrep Personalized Demo

    If you'd like a personalized walk-through of our data preparation tool, please request a demo and we'll be happy to show you how to get the best out of Zoho DataPrep.

    Zoho CRM Training

      Create, share, and deliver

      beautiful slides from anywhere.

      Get Started Now





              Zoho CRM Training Programs

              Learn how to use the best tools for sales force automation and better customer engagement from Zoho's implementation specialists.

              Zoho CRM Training

                  Zoho SalesIQ Resources



                      Zoho TeamInbox Resources




                                Zoho DataPrep Resources

                                  Zoho DataPrep Demo

                                  Get a personalized demo or POC

                                  REGISTER NOW


                                    Design. Discuss. Deliver.

                                    Create visually engaging stories with Zoho Show.

                                    Get Started Now











                                                          • Related Articles

                                                          • Creating Layout Rules

                                                            There are times when it would be ideal for showing different fields or sections on a layout based on field data. For example, if a field for "Issue Type" is selected on a ticket page, it would be nice if a section or field related to capturing more ...
                                                          • Creating Ticket Assignment Rules

                                                            Assignment rules help you automatically assign the tickets that are received in your Zoho Desk. The rule based on certain specified conditions can route tickets to the appropriate department and further assign ownership to it. While this makes sense ...
                                                          • Creating Functions in Zoho Desk

                                                            Functions are pluggable workarounds that let you accomplish tasks that is not doable out-of-the-box. For example, let' s assume that you want to prioritize customer tickets based on their sales probability in Zoho CRM. However, this option cannot be ...
                                                          • Creating Workflow Automations

                                                            Workflow Rules are a set of actions (alerts, tasks, field updates and custom functions) that are executed when certain specified conditions are met. These rules automate the process of sending email alerts, assigning tasks and updating certain fields ...
                                                          • Managing Notification Rules/Triggers in Zoho Desk

                                                            Zoho Desk provides a standard set of notification rules that can be used to notify your customers and agents. You can activate or deactivate these rules if needed. Also, notifications can be sent via e-mail or SMS/Text Message. Here are the standard ...

                                                          Resources

                                                          Videos

                                                          Watch comprehensive videos on features and other important topics that will help you master Zoho CRM.



                                                          eBooks

                                                          Download free eBooks and access a range of topics to get deeper insight on successfully using Zoho CRM.



                                                          Webinars

                                                          Sign up for our webinars and learn the Zoho CRM basics, from customization to sales force automation and more.



                                                          CRM Tips

                                                          Make the most of Zoho CRM with these useful tips.



                                                            Zoho Show Resources