Table of contents...
Conditional layouts in Zoho CRM offer an interface for you to seamlessly manage dependency between fields in a layout.
Your sales data are often inter-dependant. Consider the following examples.
- In a real estate company, the particulars required from a customer may be different depending on whether he/she wishes to buy an apartment or villa.
- In an educational institution, the particulars required from a student may be different depending on whether he has chosen Physics or Economics.
- In an insurance company, the particualrs required for a motor insurance policy may be different depending on the vehicle type - private car or a commercial vehicle.
So, the value you enter for one field will decide the necessity for a bunch of other fields. When you are filling the details for a Car Insurance Policy, the Commercial vehicle-related fields are not even requried - but they are still on your layout. You may be looking at 10 fields when you need only 5.
However, you cannot do away with the remaining 5 fields in the layout - as they are required when Commercial Vehicle is chosen. This is where conditional layouts enter the picture. Conditional layouts are created with layout rules, by which you can establish an interface in which certain fields are shown depending on the value entered in a previous field.
As a result you are able to make your layouts dynamic - as the entire structure of a layout changes based on field values you enter. Note that you are not eliminating fields from the layout, you are only controlling how a layout appears based on certain field values.
Let's look at how to create a conditional layout with the help of a scenario.
Zylker Insurance Pvt Ltd offers motor insurance products such as car insurance and commercial vehicle insurance.
In this case, if Zylker includes all these details in a single form/layout, there is a slight difficulty. That is, when a customer needs a policy for a car, the form unnecessarily asks for details regarding commercial vehicles as well. Observe the details in the table below:
|Field||Private Car||Commercial Vehicle|
|Purpose for which vehicle will be used||✘||✔|
|Nature of goods normally carried||✘||✔|
|Type of Permit (Goods Carrying Vehicle)||✘||✔|
|Type of Permit (Passenger Carrying Vehicles)||✘||✔|
|Hazardous Substances Description||✘||✔|
The above table lists fields that are required for a commercial vehicle but not a private car. This means an entire section in a form becomes unnecessary the moment you choose "Private Car".
This only causes clutter in your form and delays the process of creating a record.
This is where conditional layouts enter the picture.
In the above example, using layout rules, you can achieve a dynamic setup in which only when "Commercial Vehicle" is chosen, the Commercial Vehicle details appear - in other cases it remains hidden. This way, you can optimize your forms.
- Click Settings > Setup > Customization > Modules.
- From the list of modules, select the required module.
In this scenario, select Leads.
- Select the required layout. Example, Motor Insurance layout.
- Go to the Layout Rules section.
- Click New Layout Rule.
- In the New Layout Rule popup, enter the following details:
- Enter a name for the rule.
- Describe the rule.
- Choose the layout for which this rule is applicable. Example, Motor Insurance
- Choose a primary field that controls this rule. Example, Type of Vehicle
- Choose a condition to initiate the rule. Example, Type of Vehicle is Commercial Vehicle.
- Click Next
- In the Rule page, the Condition specified is prepopulated. So click Trigger an action.
- Choose from the list of actions. Example, Show section.
- In the Create Action right pane, specify the section to be shown. In this scenario, Commercial Vehicle details section.
If you have further conditions and actions, you can specify them as required in a similar way.
Now when you create a lead in the Motor Insurance layout, the Commercial Vehicle details section is displayed only when you select Commercial Vehicle type. Otherwise, it is hidden.
There are three actions that can be triggered when layout rule critera are met.
- Show Field: Choose this action when you want specific fields to be shown only when the prescribed criteria are met.
- Show Section: Choose this action when you want specific sections to be shown only when the prescribed criteria are met.
- Set Mandatory Fields: Choose this action when you want to make a few fields mandatory only when the prescribed criteria are met.
In the same Zylker Real Estates scenario, assume the following conditions.
- You want to display the field "Hazardous Substance Description" only if "Nature of goods is hazardous". If it is non-hazardous, the Description field is not required.
- You want the Commercial Vehicle details section to be displayed only when you select Commercial Vehicle type. Otherwise, it is hidden.
- Only on choosing Commercial Vehicle, you want the field "Company" to be mandatory. For a private car insurance policy, Company is not mandatory.
In these cases, the following could be layout rules and actions.
As you can see, based on specific field values, you can make fields and sections appear or disappear and mark fields as mandatory. This makes your layout very dynamic.
- The [Record] Owner field currently cannot be chosen as the primary field that controls the layout rule.
- Layout Rules are applied only on Create/edit and view pages.
- Layout rules are not available for records generated via import, webforms, Quick Create/Lookup Create and APIs.