The rounding steps expect a value or a value and a scale:
A value can be a number or context variable resolving to a number.
A scale rounds a value to a specified decimal place. For example,
scale 1would result in
No scalewould result in 16.
round <roundingMode Object> with scale <scale Number> as <roundedVariable Variable> using <roundingObject Any>
roundingMode - The specified rounding mode. Must be one of:
- up - Rounding mode to round away from zero.
- down - Rounding mode to towards zero.
- half down - Rounding mode to round towards "nearest neighbor" unless both neighbors are equidistant, in which case round down.
- half up - Rounding mode to round towards "nearest neighbor" unless both neighbors are equidistant, in which case round up.
- ceiling - Rounding mode to round towards positive infinity.
- floor - Rounding mode to round towards negative infinity.
scale - The scale to round by. Any integer for practical purposes is supported.
roundedVariable - The variable that holds the rounded amount.
roundingObject - The object to be rounded. This can be any object that resolves to a number.
And round up with scale 0 as callDur using B.incomingCalls.callDuration And round half up with scale 1 as roundedVariable using 14.46
The first example above accesses the first incoming call's duration. Next it is saved as a context variable named
callDur and rounds to whole seconds using the scale
The second example above rounds
14.46 half up using a scale of
1. The result is saved as a context variable named
This step is eligible for: