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
- Only users with Profile permission to Manage Layouts and Fields can access this feature.
- You can create a maximum of 10 validation rules per department.
Basics of Validation Rules
- 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.
- 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.
- 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.
- 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:
- Layout: Tickets | Primary field - Passport number | Secondary field - Travel Type
- Condition: When "Passport Number is empty" and "Travel Type is International."
- Error to be displayed: "Sorry! Passport Number cannot be incomplete if Travel Type is International".
Note:
- 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:
- Click the Setup icon ( ) in the top bar.
- In the Setup Landing page, click Layouts and Fields under Customization.
- Click Validation Rules under the Layouts and Fields sub-menu.
- In the Validation Rules page, select the desired module and the department (when more than one exists) from the drop-down menu.
- Click Create Rule in the upper-right area.
- In the Create Validation Rule pop-up window, do the following:
- 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>."
- Click Next.
- 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". - 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.
Click the Plus icon ( ) to define multiple secondary conditions and specify the appropriate alert message.
- Click Add another option to change the value of the primary field and configure different alert messages as required.
- Check Apply to Help Center to validate tickets submitted through your help center.
- When you're done, click Save.
Points to Remember
Here are some points to keep in mind while creating validation rules:
- Following is the split-up of the number of conditions you can create within a validation rule.
- 10 Parent Conditions per rule
- 5 Secondary Conditions per parent condition
- 5 criteria per secondary condition
- 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.
- Validation rules are executed in the order in which they have been created.
- 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.
- Import: Updated on importing new tickets or overwriting existing records
- Workflow Rules: Updated as a result of workflow action
- Blueprint: Updated as a result of the After Transition settings
- APIs: Updated via the API method
- Web Forms: Updated as a result of submitting form
- The primary fields used in a validation rule will not be available for mass updates.
- 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:
- Click the Setup icon ( ) in the top bar.
- In the Setup Landing page, click Layouts and Fields under Customization.
- Click Validation Rules under the Layouts and Fields sub-menu.
- In the Validation Rules page, click the toggle corresponding to the validation rule to OFF.
- 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:
- Click the Setup icon ( ) in the top bar.
- In the Setup Landing page, click Layouts and Fields under Customization.
- Click Validation Rules under the Layouts and Fields sub-menu.
- In the Validation Rules page, move you mouse pointer to the rule you want to delete and click the Delete ( ) icon.
- Click Yes, Delete to confirm.
Notes:
- When you delete a validation rule, the rule and 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 first to delete the rule, after which you are free to delete the field.
Related Articles
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 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 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 ...
Creating Time-based Automations
Time-based rules are similar to Workflow rules for the reason that both define actions that will trigger alerts, create tasks and update fields in Zoho Desk. However, time-based rules are triggered when a timed event occurs, and not immediately after ...