Roboteka
Roboteka · Robots · Sum of array elements

Sum of array elements

The "Sum of array elements" robot adds up all numeric values of an array in Bitrix24 (Alaio) business processes and robots. It takes a multiple-value field or another robot output, understands comma as the decimal separator and spaces inside numbers. It returns the sum, the count of elements included, and the count of non-numeric elements skipped.

The robot sums array elements as numbers — standard business process tools cannot add up a multiple-value field. Each element is converted to a number: spaces and non-breaking spaces are removed and comma is treated as the decimal separator ("1 500,50" becomes 1500.5); non-numeric elements are skipped and do not break the calculation. Typical use cases: add up amounts from a multiple-value payment field; total a budget over a list of values collected by another robot; verify all elements are numeric by comparing the included and skipped counts. An empty array yields a sum of 0. It returns the sum, the count of numeric elements included, and the count skipped — use them in the next steps of the business process.

What input parameters does the robot accept?

Parameter Type Required? Default
Array of values string yes

What does the robot return?

Parameter Type
Sum double
Numeric elements counted int
Non-numeric elements skipped int

Scenario: total upsell amount on a deal

  1. A deal multiple-value field has accumulated upsell amounts
  2. The robot adds up all elements of the array
  3. The resulting sum is written to the Total upsells field and drives a stage condition

Related robots

Related articles