Math Operation Workflow Action in Sparkforge
The Math Operation action performs simple add, subtract, multiply, or divide calculations against numeric, monetary, and date fields inside a workflow. Multi-step calculations require chaining multiple actions.
The Math Operation workflow action runs simple calculations against numeric, monetary, and date fields. Add, subtract, multiply, or divide. For dates, add or subtract days, months, or years.
Limitation: a single action handles one operation. Order of operations (PEMDAS / BODMAS) is not applied. Break complex math into multiple steps and store intermediate results in custom fields.
What you can do
- Calculate renewal or expiry dates by adding days, months, or years.
- Update lead scores based on contact activity.
- Compute commissions or payout amounts.
- Roll a counter forward each time a workflow runs.
Why use it
- Automation: remove manual math from lead scoring, commissions, and deadlines.
- Flexibility: works with custom fields, custom values, and dynamic variables.
- Accuracy: consistent updates across numeric, monetary, and date fields at scale.
Set up Math Operation
1. Open the workflow
Go to Automation and create or open a workflow. Add a trigger first — Math Operation needs something to run on top of.
2. Add the action
Click Add Action and pick Math Operation.
3. Name it clearly
Rename the action so its purpose is obvious in complex workflows (e.g., Add 30 days to renewal).
4. Pick a field
The Select Field dropdown gives three categories:
- Date Fields — system fields like Current Date and Date of Birth. Use for deadlines, reminders, age checks.
- Custom Fields — your CRM fields like Policy Expiry Date or Contract Start Date.
- Custom Values — static values you enter manually (e.g., add 30 days, apply a fixed percentage).
5. Choose operation type
- Date fields: add or subtract days, months, or years.
- Numeric and monetary fields: add, subtract, multiply, or divide.
6. Set the operation value
Enter a static number or use the tag icon to pull a value from a custom field. Dynamic values keep calculations in step with real-time data.
7. Add multiple operations (optional)
Use Add Operator to chain operations inside one Math Operation action. Useful for sequences like add then multiply.
8. Set the update field
The result is written into the Update Field. Make sure types match — numeric results into numeric fields, dates into date fields.
9. Save and publish
Click Save, then Publish the workflow.
FAQ
Can I do math on custom date fields?
Yes. Add or subtract days, months, or years on any custom date field. Negative values aren't supported on date fields.
Are there value limits?
Numeric fields accept positive and negative values. Monetary fields require values greater than or equal to zero.
Can I use the result in If/Else?
Yes. A common pattern: calculate a lead score, then route the contact based on the result.
Can a single action handle 1 + 2 * 3 - 4 / 5?
No. Each Math Operation action runs one simple operation between two values. To handle order of operations, chain multiple actions and store intermediate results in custom fields.
Frequently Asked Questions
Can Math Operation handle PEMDAS?
Can I use Math Operation on date fields?
Where does the result go?
Can the operand value come from another field?
Do monetary fields accept negative numbers?
Was this article helpful?
Thanks for the feedback.