Uspacy Knowledge Base
All materialsAutomationConditional actions

Mathematical operations in Conditional Actions

Mathematical operations in Conditional Actions

We'll look at how to use mathematical operations (addition, subtraction, multiplication, division) in CAs with practical examples

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.

AD_4nXcrSM1Sza3HuHt5A4L04I5dFMJZR6swhpuOYf1FAHHN-BI4rVc63iqFN9TxGNfPo8iWhe-2cRjfv66YSOnCCx0gwuCFRcBETdySOOCqFM69RJSNAG_F5wJpCtSW_3D4KsUlOnuG4A

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.

AD_4nXd4DpavIpcg0HjCx_-8McNl13diZ2yZMP2LTdHyKS5Vd38H8RLIsa11tN7o-UdPdYaNtYYLo-V0jDhEc58EDtIwWzdx8mJ2i_Nny_p_eOPENXZdVQtvg8FQX3GpASWPJTxi40fLGg

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:

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.

AD_4nXf18Vo8KrSIpyKkpWEx4Sr5RJo7o0txyTArfd8s0fPt6KaK2W8wl6dOLHWgNeu2XQ32NOykuxOz_26tpaRIWRwqH7m5wzcA7ZsS_bB4An8jgR6IdISrjod6gztlkhbZVopH9-1pfA

Enable mathematical operations for it.

AD_4nXccu1aDwLhKKNzrtM44ZX2AxPJkKkee_dM_i4s-awFT_6wZEhOlTi4x6mXYs0EtfxOxM1yDQdrlXssUNw-CHaBlYU1KdQRIGPrhSOqc3kWAMS4GWP9Hg-XkbXag1RILFnmQEi7X

Enter the formula remembering the seconds rule (72 hours = 60×60×72 = 259,200 seconds).

AD_4nXdRUBdc9JX-XatHH5lgdD6jpqumEHfdeA5knGZh0Zkx_zJ1Q4G-2Gytx5cH06XT1bIz86R2cQmHoiBttZ2I-aiUHgALWaZt1-X5P0HcDy2m86_8N_iL2EzcMMgFsPpWU-W9d-PDegAD_4nXcnGzCb4fL5qMS8rV9vzX_XS7Gs2VZ3_znBxWT-O59015B_WzRmeX2450QGJNZDEyvSbwEqz7HQ6r7Jzaf1r4MZ1uBx2VfRT2axnvAJr2t7hX0jofeuiwFLoBY8Dyi_zFhGO7DE

Finish creating the conditional action.

AD_4nXcSC1C-BdxEJVvG3rEP_AlWQUYltUKUO8q0QiNyFncVchdgDG1J4veHAXHi6aHMGiNBKqwUHXGOOO8RfUUGTCrrb53-99kH2E2znJbtOXRmmQ_awMlu4Kl4fN2oPE_g9iUrTTUqzw

Result: When assigning a task, the deadline field will fill automatically with the calculated value.

AD_4nXcl_Z0rNMQYCMcgZiI_eZoI6me-Wo-AbbhZrzqgZgvG1asjf92ruD_9HTvoQ7Ok0d4MlHxVMHIujx4uR6waVOUPOk0mC7i-SQfaXXjoY843HUGVBuMxnxJcilCtt2grDSW5BkizxQ

✅ Done.

AD_4nXdfexevYyJWiIVX6c3SysCj8-qbyuFRIAlxPNwHUwyLgZLfvkbEs4LR__O7h8AYNgtu-kzX8JRUsVfWjb6BWNM5_lxcQh5TTePrFlawMVaYji4FBY4O5KQEUdhZx6yiQFKtxkBqkw

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.

AD_4nXcHG1ExXfBnUSxnKLKYFUsy2Rfu3KALz5rgDHUdeFFmC6uYvW7P3xF6QT6j3uCbHSDp0iOgRCo7Hug4g4EJaMh9Eq6g4xZKm6O2x6BQVSeUW98WpNCl7d0bObL7mreWYNyLrLKSqw

Enter a formula to subtract 15 minutes (15×60 = 900 seconds) from the deadline.

AD_4nXd-xzilDXBuKOwjRZ0pn5TLAq7tgLZxQjD8-eWxjQnKaL4cMASmMQw_OflUwlApt2e49js2CZUZCybFTXOpgiXhWVrCVfbyYBErVaHPNbi7OPd9_J1wnTJhSy-q0I2BYSqgIjzc4AAD_4nXd12Vbept92muKCQMUaLinEZHNhRZgLPlfqpYtTzXY2VanlBxFlgptTKK_DyIE2eiAg3SHAejoheo9Ovgq5OjdycTp-eabQrUFon_qUUWzKNTaBeJi1P8x-iDkULg8oDHSTSX-JCA

Then add a Create – Activity action.

AD_4nXdYI3EWqw9H3MzPTJqBNkpiakK_4Nf6k_aQkIbtZmJha1I1B53H3cMtl03njW1K_F1LemB5xpGAuCSu0NOYF54ReeZbIYrCpnUufjWyixwAqk76AWGezt7G0ULnEoIjeo8fImn5UAAD_4nXdzDGn7A4yl08Wf2ULkmQSanN9xo97zf0W3NtiyfMnWsaphC30GTRVWIEptGhzboXAl6LCMC5P4a4seKVefO9zhKdAswmsJvIOOmDv8-yIcHEj-DbZMETgK6vuTLKNJZT7gsnIBUQ

Set up the fields and information for the activity creation.

AD_4nXfnLzZJIkNqK27D5V0y4WS3ZkAc0ybf2S4r2pcEMpt6s33zpHfyJiDtG-fVnG7mb00fdmZcboSnNL50CsP5EhIl4E8_594jJbr8cVLIZwDEyJi1_bwTZM2t9y0dEcOgRT_83grovg

And of course, we define the start date and time of the activity. Here, we also apply a mathematical operation.

AD_4nXe64bxZu8QBtHqCItqlZaDPcQKOoEH6qX4qZ6-cnIpAoAeseWbmik6zf15JbCY6l_iTBNOe-Ve-HIpviw0oeD4eWAwxwyOTLkYpgAnVF52lqzeVTPw6m4Y6njNJmkcnZPNLUj_Lqw

We enter the same formula as before — we need to subtract 15 minutes from the deadline date.

☝🏻*(15 × 60 seconds = 900 seconds

AD_4nXfoLUxn2936JY-6trQ5UfDgwXAkuIgUu4CQooh7RrXmJZ7iFhFiQ7B0WGgL7nV0MBClgxDscDC7B3wKw9exhS-1buEgyDARGQEP-P8bGm3tisM8ykwx06e1JbPoq_qL-qEvSNcQGQAD_4nXdDxOVxTYAJj0jh7V0UlhAAaxcaS4Vhs7hzBSYdAVYWzfL9jHb0siiand8kCK-KMUhNmgxL2gUfQ5csEujUspCeJ3MsHWYyQK6lVRvLjStgD7q0_0MDTCUH5wT_s_84hJdD4z9e

We set the end time of the activity and save the conditional action.

AD_4nXeaASFL8Agk5-GyXCgnMbhBMYuPFfW6XaICi0Rdtv3Yp1VPT86Ssob2HJSBbseY5_MvlYY8Qs8S930VWgAy2LOuzc_xH45q3PO4fFb8C_VBOVj_zzpo-1cpfY7o39tnKsoDnCUz

Let’s take a look at the result. We have a task that is about to expire.

AD_4nXfQelyogx5StoAMY_HdK4XcYn7U1dTr4yBHbDwHhGJBn0RgeQbhZ_4oygOj-uPSF4VTbUmi-PlVq5x-7qaaGcT6gdZML18agPNP8JP4WQIgJsSV7k05pKFEQ03LjE8CYazK2bfrUA

Result: An activity will be created 15 minutes before the task deadline expires.

✅ Done.

AD_4nXftBQg1NeGA5J_H4jBWmlVuQ9vaHmZxUOsQFM4mbV5AuPiSV4Pk7PDNNVWijcDsJJVMenSqU58kYH47zPzgoWTKqOW68tlL5GJNmDLnImhi6kpCdvPqPsc3jcdyF3YbPFNO1G-Mgw

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."

AD_4nXcZVpAz4rcPB8CNQGwNaqgat6eAo_mmzKBOvsZa9-ItNpqV6cwtrGV-daeuuzAo1i7Ze4_3HkWd_LNJ6YB0U-xiy427Wpd9m4tWGkQEqueVkUc5MPLX4jKSToZpmHOOHt01aY5B

Select Change fields and add the necessary fields.

AD_4nXfKl_nkKZSE189Aq2Fo4Ps-E7-GzyHlCdJtd9JIMevCchUIV49EqgBRugJH3zwkrFmF8AQuNYqVxw_40722K8Etom6vJ7vP8cJtCkkOM1gWTNZmw2ADwyXNPUdoHSameFedqoRd

First, calculate Discount amount and enable the use of mathematical operations.

AD_4nXfy3388j2AhSXmnzwiSLUjnVhja7hK2SzhIeki0TcOqWOfCBoik1HcGmpspmkCZT7TBrYTe8T37L5GZNwx9Y7CyvPUMTNTkNndckWaZkWT1AmYFQ3P34WIohf_UDE2lURc4A32QuA

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).

AD_4nXfm-ziU9xXZ_TKB2evNHwpEsqF5RzKgY8FA2i0dRcJc1ga2K29LNDEg7ZKyB1glgg21AsXC4pwQX16A8C92GjxGA3rdN7dwrIZYgeEckM2MW3vKTJheETGrZKhVlN1t-DByGhYj

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.

AD_4nXfNy18aJHq_vLNsgBiwrR3u1akgz0unpC7jymGuQcRQZb3wbv1_Fdi-0NGl6KpeYQ79OpBXvpDskyG3nWYgIiYYBhKZ2oMEyLT_w78D7Rh-RDnLwibyW9FToog9LaI-D0NwLkrmTQ

Next, move on to the Deal amount field. Add another field.

AD_4nXcDoQN5mgVITZvPFm26My--RYE7nTV8sK46APxaDhE9jZy-B5L-ZsvCZnzcixSirBBI-i9KnMFd18syMGp2nGUqxs-gGFajhRiD8oBRy9FfCS_sAVcW78tdz2JkzfCsheeon1TdlQ

Activate the use of mathematical operations here as well.

AD_4nXd4b3CVOX__Voku8TXHUCGm9mFurOerGN0skbBmZTdVpGRtpYvywEsd1En4EXlV0gRae_5ltKipg2vQnDvS4y_nyF3EYoRg1ryvoBAqbtjLGVoCKMKQqM9qMWNsh-WQ2_NdWFwkmg

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))

AD_4nXc1XPuxCKtbxpzsiQpILOCvqLb86nAqAy04CNA75q1AOd0318xyPu14HwnRGtKDQbDcRglzSX--MJ8Vdr0jGN5mUmd0_JfZJYHJ3eB1QUYHuTNN5DTwI2NePmURAUM1EQeIq4_pHQ

The currency setup is the same as when configuring the previous field, Discount amount.

AD_4nXcnfKNr6I4psXox3lF9IUr5xZHmJSrhj_V6HfWFNw4cfSVFWlExR3Ew-UXh5zf6Oi1xuqh-0-bE1KMfRgeuI3Nj7pFm-Di-MrFaZzkoDwPnrzmKmSOe82qiiSXrwwGR66CQ2Sz_DA

Now save the conditional action.

AD_4nXcgpXnxMtdf8-Zwm8KmUaQBuL4DLGVFrGECp6AdHDCy8Ulb-i9KgOW9r-OS8iAlFaQENKyVT5PPcZXGhe-MadOBeja1x-Vb_WthZzyfIaEcrPytHtIXgMgCgNcvjNPoQgBE8Kr4

Then test it in practice by checking the discount availability checkbox.

AD_4nXcsh9kkNlAYC5aX4bT228yXvoq1OykL0KOQA7UwjVZs0fzMxqvPB1PLH1v9t-mrGBH2U0tm7-w1OMGo3sqxg5HyWkSp_RoKVsqFBiiPFRepq_lhQU-o5o_9DLQC7yfpQ1Wc1i5_

As a result, you get the updated values. Done ✅

AD_4nXcpBu9x4Y1rcsL9PCBiPyXZR3eD1naarZHxDSC1WCmlHe-Qd9qS7yNrjrgpljikqScApSjYMrzbJvRyPHz2ZPOytmiNWc4zvnGQBkfmkT2Xt_PynRA7SwwHJhFqwkJMay0EC5_7

If you have additional questions or you need to contact the support, send a request to this email [email protected]

Created: June 18, 2025 / Updated: July 8, 2025