This topic will walk you through formulas. This includes comparison, conditional, and logical formulas.
Workflow Designer formulas enable you to build complex logic calculations directly into your workflow configurations. This reduces manual data entry in launch forms and gives legal teams confidence that the data in their contracts is calculated correctly.
Formulas are a powerful way to automate complex calculations that live within your templates, however, they can increase the complexity of your workflow building process. Formulas are built with a few guidelines to ensure you do not have any unexpected outcomes in your workflows.
Formulas include comparison, conditional, and logical functions, which can be combined to create powerful logic that you can apply to your agreement fields and their values.
To learn more about how to use formulas, refer to Manage Formulas.
Ironclad offers three formula functions that enable you to compare two values that return true or false based on the result of the comparison:
You can use Equals() to compare values of any type, while you can use GreaterThan() and LessThan() to compare numbers, monetary amounts (of the same currency), and dates.
WonderWeb Inc. uses Equals() to check that their string or text value, such as the governing law, is New York:
Equals([Governing Law], “New York”)
WonderWeb Inc. uses Greater Than() to confirm that a numeric field, such as the contract value, is greater than another numerical value of the same type:
GreaterThan([Contract Value], MonetaryAmount(100000, “USD”))
WonderWeb Inc. uses Less Than() to confirm that the start date is before the end date:
LessThan([Start Date], [End Date])
Ironclad offers three formulas that enable you to combine or negate boolean values:
For And() and Or(), you can enter one or multiple inputs. You can only enter one input in the Not() formula.
WonderWeb Inc. uses And() and Not() to check that the Counterparty is located in California, and additional approval is not required:
And([Counterparty In California], Not([Additional Approval Required]))
WonderWeb Inc. uses Or() to check that the product package is premium, or the contract value is greater than $500k:
Or([Is Premium], [Contract Value GT 500k])
The If() formula function enables you to assign a value to a field if a condition is true, or a different value if the condition is false.
WonderWeb Inc. uses If() to define that the monthly price is returned if pricing is monthly, and otherwise the annual price is returned:
If([Is Monthly Pricing], [Monthly Price], [Annual Price])
WonderWeb Inc. wants to calculate a deployment expiration date based on the start date, contract value, implementation plan, and plan transition date.
The two possible implementation plans are Standard and Accelerate. The Standard Plan previously meant implementation would occur within 60 days. However, as of December 31st, 2022, Standard Plans sold will support a 90-day implementation runway, and only customers with the new Accelerate Plan will have implementation within 60 days.
The deployment expiration date must be 60 days after the start date if the implementation plan is Accelerate or if the start date is before the plan transition date 12/31/2022, and 90 days otherwise.
RelativeDate([Start Date], If(Or(Equals([Implementation Plan], "Accelerate"), LessThan([Start Date], Date(31, 12, 2022))), 60, 90), "days")
Ironclad offers three formula functions that enable you to manage durations on your contract.
Duration() will convert a string into a duration object, while DurationMSValue() takes a duration object and converts it to milliseconds representing the length of the duration. FormatDuration() returns the formatted text equivalent of a duration object based on the format specified and optionally comma separated.
Duration([Contract Term Length])
DurationMSValue(Duration([Contract Term Length])) - DurationMSValue(Duration("1 month"))
FormatDuration(Duration([Contract Term Length]), "number", true)