Formula Fields are very useful at extending capabilities and allowing users to quickly create automatic calculations rather than manually entering results. A formula field is a custom field that automatically calculates values based on a formula expression. Formula fields are read-only, meaning users can't directly edit the value. Instead, the value is calculated based on the formula and the values in the source fields.
This is not a new concept, since most CRM systems such as Salesforce, Zoho, Hubspot, freshworks, vtiger, salesloft, MS Dynamics, and Sugar all have the ability to create formula fields.
If you are familiar with Excel, than you know how handy formula fields are as they allow us to create simple or even more complex formulas based on data from a record and from its related records if needed.
Some examples of use cases that come to mind are:
Dynamic Payment Calculations for Appointments or Services
For example, if each appointment hour costs $150
Formula: ( {{appointment.only_end_time}} - {{appointment.only_start_time}} ) * 150
Lead scoring based on Engagement and Attribution
Formula: IF( {{contact.attributionSource.utmSource}} = "google", 10, 5 ) + ( {{contact.email_open_count}} * 2 )
Visualize Lead Temperature (using IMAGE and CASE)
Formula: CASE(
{{contact.rating}},
"Hot", IMAGE("/img/samples/light_Red_fire.gif", "Hot"),
"Warm", IMAGE("/img/samples/light_Yellow.gif", "Warm"),
"Cold", IMAGE("/img/samples/light_Blue_snowflake.gif", "Cold"),
IMAGE("/img/samples/light_grey.gif", "No Rating"))
Add 30 Days to an Enrollment Date
Formula: ( {{contact.enrollment_date}} + 30 )
The ideal situation would be whenever your are creating a custom field and you choose the Formula Field Type, it would allow you to open a formula editor where you could construct the formula and insert other fields, operators, and functions.
Here are some Operators that should be included:
Math Operators (+, - , *, /, ^ )
Logic Operators ( =, <, >, <=, >=)
Logic Functions ( AND, OR, IF, CASE, ISBLANK, ISNEW, NOT, IS)
TEXT Functions ( FIND, CONTAINS, HYPERLINK, IMAGE, INCLUDES)