This plugin performs simple operations such as add, subtract, divide, and multiply. Arguments of those operations may be values from payload, profile, etc. The result is returned as an object of new values.
Each operation must be in separate row. Operations may share variables.
This calculation will divide the value from profile that is located in traits.private.interests.sports by the number provided in payload (time_passed). Value of time_passed can be a time that passed from the last visit. The above equation will return the following result.
Example 2 - variables
This simple calculation assigns value to variable decay_rate. Then uses this value to compute result.value. This equation will return the following result.
This way you can construct object that have different values that are calculated and assigned to variables. Of course the variable ca be assigned to profile, session, etc. This is the last example with variable result.value assigned to email@example.com
Calculations may have several operations.
The result of this calculation is:
Each number can be replaced by variable or a field from profile, event, etc.
The result of this operation is:
And the event@counter equals 1.