Skip to main content
Field Rules

Rules are a key part of field management, enabling you to lock or make mandatory your choice of fields, based on conditions you configure

Carly Hammond avatar
Written by Carly Hammond
Updated over 2 months ago

Summary

  • "Rules" is a feature within the "Data" Global Tool for admins

  • Each Rule is configured on a specific data model (e.g. Company, or Opportunity, etc.), and either locks the data in your chosen fields, or makes it mandatory to have data in them

  • You choose whether each Rule applies to just Users, or also other "actors" (such as Automations). You can optionally set conditions (either based on fields or User properties) to define when the Rule is enforced

  • You can even write your own custom message to display in Planhat when a User (you or one of your colleagues) encounters locked or mandatory fields

Who is this article for?

  • All Planhat Users

  • This is particularly relevant to Planhat admins/builders who will be configuring Field Rules for their tenant

Article contents


Introduction

Data is the foundation of all customer/prospect management. You need that data to be accurate and complete to truly understand your customers/prospects, and be able to take the most effective action. With Field Rules, you can ensure that unwanted edits do not take place (via locked fields) and that all key data is recorded (via mandatory fields).

Planhat can be highly customized, and these Rules are an example of "top down" (admin-led) customization. You get to choose which fields should be locked and which should be mandatory, under which circumstances.

Field Rules can be very advanced - with a single Rule affecting multiple fields and controlled by complex conditions with multiple criteria - but it's also really quick and easy to set up simple Rules too.


What are Field Rules?

"Rules" is a feature available as part of the "Data" Global Tool for admins.

Each Rule you create applies to your choice of field(s) on your choice of data model (e.g. you can create Rules for Companies, and Rules for Licenses, and so on).

Click the image to view it enlarged

There are two types of Field Rules:

  • Locked - the data in the fields in question can't be edited

  • Mandatory - the fields in question need to have data for the record to save

Each Rule can apply specifically to Users (i.e. you and your colleagues), or also include Automations/Integrations/API.

As part of each Rule, you can optionally set conditions (criteria) that define when the Rule applies. These conditions can be based on:

  • properties of the model (e.g. when field X is set to value Y, then apply the Rule and lock field Z)

  • properties of the User (e.g. lock field Z for Users with Role A but not Role B)

You can also define a custom message within each Rule to display via a tooltip to Users (you and your colleagues) to give additional information regarding the locked or mandatory fields.

πŸš€ Tip

A feature related to "locked" Field Rules is the "Locked (UI only)" checkbox you can see applied to individual fields when creating/editing them. This is a simpler feature than Field Rules - it applies specifically to a single field in isolation, only blocks changes made by Users in the UI, and always applies to the field rather than applying when certain conditions are met. For example, Formula Fields are automatically locked in this way, because their values are calculated rather than entered in the UI.

Click the image to view it enlarged


Why use Field Rules?

Field Rules are really useful - and indeed necessary - for organization, data hygiene, and completeness and control within your Planhat tenant.

  • In many circumstances, you will have vital data points (fields) - data that needs to be filled in - use mandatory Field Rules for this

  • And there will be times where you don't want certain data to be edited (either deliberately or accidentally) - use locked Field Rules for this

Some example use cases are:

  • Always

    make Opportunity fields "Owner" and "Sales Stage"

    mandatory

  • Make the Opportunity fields "ARR", "Expected Close Date" and "Products"

    mandatory

    when "Sales Stage" is

    any of

    "Closing" or "Closed Won"

  • Make the License fields "Stage", "ARR", "Value", "Product", "Start Date" and "End Date"

    locked

    for Users not on the Finance team

    when "Stage" is "Pending Approval"


How to set up Field Rules

πŸ“Œ Important to note

You will need the correct permissions to be able to access the "Data" Global Tool for admins, and the Rules tab within it.

You will also need Field Rules to be available in your tenant's package. If Rules are not available to you currently, or your tenant has reached a limit, please speak to your Planhat CSM.

  1. Navigate to the "Data" Global Tool for admins. If you've pinned it, click on its icon in the top left of your Planhat tenant (in the gray bar), or otherwise you can find it under the ellipsis

  2. Select your choice of data model from the column on the left-hand side, and then click on the "Rules" tab

  3. You can click on an existing Field Rule in the list to view/edit it, or click the orange "+ New Field Rule" button on the right-hand side to create a new one

    Click the image to view it enlarged

    When you first go to create a new Rule, you'll see a modal like this:

  4. Make sure you give your Rule a name - you won't be able to save your Rule unless you do. Make it nice and descriptive so it's clear in the list what it is and what it does - e.g. "Product field mandatory"

  5. In the "Type" dropdown, choose whether you want the field(s) to be locked or mandatory

  6. Use the "Field(s)" dropdown to select your choice of one or more fields - these are what the Rule will apply to

    • You can scroll through, or use the search box at the top to more quickly navigate to a specific field name

    • Click on any field you want to include, and a check (tick) symbol will appear next to it, and it will go to the top of the list

    • If you want to remove a field, simply click on its name again

  7. Under "Actor Type", choose whether you want your Rule to apply to:

    • "User"

      • This refers to Planhat Users, i.e. you and your colleagues

      • If you select this option, you'll be able to set conditions based on User properties (such as Role)

    • "All actors"

      • As well as Users making changes in the UI, this will include Automations, Integrations and API requests

      • It does not include changes made by the internal Planhat system - for example, when Company MRR is calculated daily based on current Licenses, that updated number is worked out by "the system". If you create your Rule and then encounter a situation where it has not been enforced and you would like more information about why that is, please reach out to your CSM or TAM, or our excellent Support team

  8. Next, choose whether to apply conditions that determine when the Rule will apply

    • If you don't set any conditions, then the Rule will always apply

      • For example, maybe you want every Company to always have the "Website" field populated - so you make it a mandatory Rule with no conditions

    • You can always set "Field Conditions", which are based on fields on the model that the Rule is on

      • The general format is field / operator / value(s), such as "Status / Equal To / Draft"

      • You can build complex conditions here if you wish, with multiple rules (which can be "Match all" or "Match any"), and even use nested groups

    • If you have selected "User" as the "Actor Type" (the previous step), you also have the option of "User Conditions"

      • This can be really useful if you want the Rule to apply to some of your team members but not others. For example, perhaps you want some fields to be locked for everyone but the Finance team, or everyone but Managers; or you want some fields to be mandatory for the Sales team, but not others

      • Again, the general format is field / operator / value(s); typical examples would be "Teams / None Of / Finance", or "Roles / None Of / Administrator"

      • πŸš€ Tip: You could create a User condition that just matches you (e.g. I could use "First Name / Equal To / Carly") if you want to test out a new Rule you're creating. Then you can simply remove or edit the condition afterwards, once you're ready to "launch" it

  9. Optionally, write a "Message"

    • These are displayed at relevant points in your Planhat app, to give additional information to the User about what rule has applied and why, and/or what they should do

    • You can see a couple of screenshot examples earlier in this article (in the "What are Field Rules?" section here)

  10. Finally, click the orange "Save" button in the top right


Organizing your Field Rules

Once you've created your Rules, it's easy to organize them and find the one you're looking for.

You can easily sort them by Type, Owner or Created Date - just click on the column header (and click again to swap between ascending and descending order). You can also search via the "Find in view..." box at the top.

Click the image to view it enlarged

You can also optionally create labels for your Rules, to categorize them. Click "+ Add label" on the right to create a new one - set a name and a color. You can apply them by clicking in the "Labels" column on the row of your chosen Rule. You can apply multiple labels per Rule if you like. You can then click on the label names on the right-hand side to filter your Rules list by that label.

To delete a Rule, mouse over its row, click on the ellipsis that appears, and then select "Delete".


Field Rules in practice

Let's take a look at how these Rules apply in practice, in the UI, via a couple of examples. We'll see what it looks like when a general Planhat User encounters these Rules being enforced.

Locked fields example

The admin of my tenant has created a Field Rule on the License model. It's set up to:

  • lock the fields "Product", "ARR" and "Value"

  • when the field "Stage" is set to either "Pending Review" or "Under Review"

  • and "Teams" is "None Of" "Finance"

  • with the message "Some core fields are locked down while the Finance team reviews Licenses."

I'm reviewing Licenses in a Data Table Page. I want to change the "Stage" field of this License from "Draft" to "Pending Review", as it needs a review from the Finance team.

Click the image to view it enlarged

As soon as I set "Stage" to "Pending Review", this License now matches the conditions of the Rule, and so the fields specified in the Rule become locked.

Click the image to view it enlarged

If I put my mouse over any of the locked padlock symbols, I see a tooltip message, which was set in the Rule, explaining why these fields are now locked.

My colleagues in the Finance Team, which are excluded in the conditions of this Rule, do not see these padlock symbols, and they are free to continue editing these fields. This means they can carry out their review process, and then change the Stage to "Finalized", which then stops the Rule matching this License, and unlocks the fields for everyone else.

Mandatory fields example

An admin has created a Field Rule on the Opportunity model that states that the "Sales Stage" and "ARR" fields are always required, for "All actors". They have included the message "Make sure you fill in the mandatory fields for this Opportunity!"

As a general Planhat User, I now go to create a new Opportunity (for example, by clicking "+ Opportunity" in Data Explorer).

The mandatory fields are shown in red with an asterisk. The "Create" button is grayed out if I do not fill them in.

If I mouse over either of these field names, I see the message explaining what I need to do.

Once I add data into the mandatory fields, the red color, asterisk and tooltip all go away, and the "Create" button in the top right is now enabled - I can create my Opportunity now it has all the required data.

The Rule will work in a similar way if I am editing an Opportunity rather than creating one. In this example, I open up an Opportunity and remove the data for the mandatory ARR field. This will update the field to show the red color, asterisk and tooltip message as we've just seen above.

Let's say I make a series of other changes to the data, and then click the "x" in the top right exit the Opportunity Preview. Because the mandatory ARR field has not been completed, I will see a modal appear warning me that the record cannot be saved. This prompts me to go back and ensure that it is filled in correctly.

Or, if I was making those changes to an Opportunity via a Data Table instead, I'll see a modal warning me of the issue and enabling me to fix it directly in the modal.

πŸ“Œ Important to note

The examples above showed a User making changes in the UI, but there are other ways that data changes to fields can be attempted in Planhat.

If you do bulk updates to tables, or import spreadsheets, any erroneous data will be rejected with a warning.

Integrations, Automations and API payloads are blocked if they break a Rule set to apply to "All actors". Your custom message will be surfaced in the API response, so there is a trace of the rule being broken.

Did this answer your question?