Summary
"Rules" is a feature within the "Data Model" Global Tool for admins
Each Rule is configured on a specific data model (e.g. Company or Deal), and either locks the data in your chosen fields, or makes it mandatory to have data in them, or makes records undeletable
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, or undeletable records
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
π₯ Quick video overview
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 or deletions do not take place (via locked fields and undeletable records) 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, and which records can't be deleted, under which circumstances.
Field Rules can be very advanced - e.g. 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 Model" Global Tool for admins.
Each Rule you create applies to your choice of field(s)/records on your choice of data model (e.g. you can create Rules for Companies, and Rules for End Users, and so on).
Click the image to view it enlarged
There are three 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
Undeletable - this technically affects whole records rather than specific fields (although it works via the standard "_id" field) - it means that the records in question can't be deleted
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 or undeletable records.
π 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
There will likely be times where you don't want certain data to be edited (either deliberately or accidentally) - use locked Field Rules for this
You may want to prevent particular records being deleted by particular groups of Users in particular situations - here you can use undeletable Rules
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"
Once Finance have marked Deals as having had their Line Items reviewed, prevent general Users (those without the Administrator Role) from deleting those Deals
How to set up Field Rules
π Important to note
You will need the correct permissions to be able to access the "Data Model" 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.
Navigate to the "Data Model" Global Tool for admins, found in the "System Admin" menu (which you access by clicking on your tenant name or initial/logo in the top left)
Select your choice of data model from the column on the left-hand side, and then click on the "Rules" tab
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:
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"
In the "Type" dropdown, choose whether you want your field(s) to be locked or mandatory, or records to be undeletable
If you selected "Locked" or "Mandatory" (not "Undeletable"), use the "Field(s)" dropdown (and checkboxes within) to select your choice of one or more fields - these are what the Rule will apply to
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
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 set "Field Conditions" (or "Conditions" in "Undeletable" Field Rules), which are based on fields on the model that the Rule is on
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 / Bob") 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
Optionally, write a "Message"
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 to 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.
Undeletable records example
In this example we are using the newer revenue data structure including the Deal and Line Item models, as described here.
Line Item (Subscriptions and Fees) are "children" of Deals in this data structure.
In our organization, the Finance Ops team have a process where at a specific point they review the Line Items of a Deal, and after this time, it should not be possible for general Users (e.g. CSMs and Salespeople) to delete the Deal, only Users whose Role is "Administrator".
An admin in our Planhat tenant has set this up as an "Undeletable" Rule on the Deal model.
Click the image to view it enlarged
Now when someone from the Finance Ops field has validated the Line Items of a Deal, they enable a toggle switch (custom field) on the Deal model to mark that this has been completed. Deals with this toggle turned on (i.e. set to "True") match the conditions of this Rule, activating it.
Now, if I, a general User (who doesn't have the Role specified in the conditions of the Rule), try to delete such a Deal, I find that I cannot. In the example below, the name of the Rule is shown as a tooltip message.
Click the image to view it enlarged
π 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.

































