In Uspacy Conditional Actions, you can use mathematical operations to create dynamic conditions, calculations, and logic for action execution. This allows you to build more flexible scenarios based on numerical values in fields — for example, deal amounts, discounts, deadlines, creation dates, etc.
How to find them?
You can configure a conditional action with mathematical operations when you select options such as Create, Change fields, or Add a waiting.
When filling out the form, fields that allow you to enter mathematical formulas will appear. These are fields of type Integer, Number with fractional part, Date, and Money. They will have a special button enabling you to input mathematical formulas.
Available mathematical operations
In formulas, you must use standardized mathematical operators:
+ addition
– subtraction
* multiplication
/ division
Any other symbols (e.g., ×, :, or words like “plus”, “minus”) are not supported and will cause a formula execution error.
Also, standard math rules apply:
🟣 You cannot divide by zero. If the divisor is zero, the system cannot perform the calculation, and the action will not run.
🟣 The order of operations is:
First operations in parentheses
Then multiplication (*) and division (/)
After that addition (+) and subtraction (-)
Usage details
🟣 Fields of type Row, Text, List, and Label can be used in mathematical operations (i.e., be referenced in formulas, but not contain formulas themselves).
Only if they contain numeric values. If the field contains even part of text, the formula will not work.
💡 For example, a discount field with only numbers (e.g., 5, 10, 15) can be used in formulas — calculations will succeed.
But if values contain symbols other than digits (e.g., 5%, 10%, 15%), the system cannot recognize it as a number, and the formula will fail.
✅ Allowed: 5, 10, 15
❌ Not allowed: 5%, 10%, 15%
🟣 Formulas do not support multi-select fields (fields where multiple values can be selected).
💡 For example, if you use the formula Deal amount × Discount and the “Discount” field is a list allowing multiple selections (e.g., 5, 10, 15), the formula will not work even if all values are numeric.
❌ Not supported: Discount = 5, 10, 15 (multiple selected)
✅ Supported: Discount = 10 (single selected)
Make sure the field is not multi-select and contains only one numeric value for the formula to work.
🟣 To “shift” a date (e.g., add hours or days), add values in seconds.
💡 For example, to set a task deadline 72 hours after its creation date, use:
Task deadline (date or date and time type) + 60 * 60 * 72
where 60 * 60 * 72 equals 72 hours in seconds (60 seconds × 60 minutes × 72 hours = 259,200 seconds).
Examples of use
Example #1 (Tasks)
We want to set a conditional action that automatically sets the deadline for a task to be +72 hours from its creation.
Select Change fields when assigning the action, and add the Deadline field.
Enable mathematical operations for it.
Enter the formula remembering the seconds rule (72 hours = 60×60×72 = 259,200 seconds).
Finish creating the conditional action.
Result: When assigning a task, the deadline field will fill automatically with the calculated value.
✅ Done.
Example #2 (Tasks and Activities)
We want to create a conditional action that will create an activity 15 minutes before the task deadline.
When assigning the action, first select Waiting, then To date, and enable mathematical operations.
Enter a formula to subtract 15 minutes (15×60 = 900 seconds) from the deadline.
Then add a Create – Activity action.
Set up the fields and information for the activity creation.
And of course, we define the start date and time of the activity. Here, we also apply a mathematical operation.
We enter the same formula as before — we need to subtract 15 minutes from the deadline date.
☝🏻*(15 × 60 seconds = 900 seconds
We set the end time of the activity and save the conditional action.
Let’s take a look at the result. We have a task that is about to expire.
Result: An activity will be created 15 minutes before the task deadline expires.
✅ Done.
Example #3 (CRM)
Given:
A List field named Discount percentage (values 20 and 40)
A Deal amount field (type Money)
Goal: Calculate the Discount amount and update the Deal amount field to account for the discount.
Set a conditional action triggered by deal changes, with the condition that the Available discount checkbox is set to Yes.
☝🏻 In our case, this field is a checkbox — when it is selected, the value is set to "Yes."
Select Change fields and add the necessary fields.
First, calculate Discount amount and enable the use of mathematical operations.
Then we start writing the formula.
☝🏻 We need to calculate the discount amount. The formula is simple:
Discount amount = Deal amount * (Discount percentage / 100)
☝🏻 Also, remember the rule about the List-type field. For it to participate in the calculation, its values must be presented only as numbers, WITHOUT any extra symbols like (20%) or text like (20 percent).
Also, if you are working with sales in multiple currencies, for example both UAH and USD, for convenience use the modifier for the Deal amount field — Currency value in field.
Next, move on to the Deal amount field. Add another field.
Activate the use of mathematical operations here as well.
Then start writing the formula.
☝🏻 We need to calculate and update the deal amount, taking the discount into account. The formula is:
Updated Deal amount = Deal amount - (Deal amount * (Discount percentage / 100))
The currency setup is the same as when configuring the previous field, Discount amount.
Now save the conditional action.
Then test it in practice by checking the discount availability checkbox.
As a result, you get the updated values. Done ✅
If you have additional questions or you need to contact the support, send a request to this email [email protected]