Skip to main content

mbr_math

Overview

ActiveMember360 mbr_math is used to perform a calculation using the value from and storing the result to any contact field in your ActiveCampaign application.

Usage

The URL used for the mbr_math webhook is constructed using your site URL and parameters.

A sample of the URL structure required is as follows:

site_url/?mbr_math=my_security_code

The mbr_math URL is used as the webhook URL in an ActiveCampaign automation.

Site URL & Parameters

Site URLDescription
site_urlThe WordPress site URL from which the WordPress user is to be deleted. This can be found in WordPress, Settings, General, Site URL. It must be specified exactly as shown there.
Default: none.
Required: yes.

Parameters

ParametersDescription
mbr_mathSet to the security code used to authenticate the use of mbr_math. The security code used must be defined as detailed in ActiveMember360, Settings, Security, Security Codes.
Default: none.
Required: yes.
fieldThe name of an ActiveCampaign contact field to use as an operand. The field can be any contact field in ActiveCampaign. The available field names can be found in [ActiveMember360, Utilities, Contact Fields][utilities-contact-fields]. The lower case version of the Perstag should be used as the field name.
Defaults: none.
Required: no.

Required: yes.
operationThe math operation to be performed.
Permitted Values: add, sub (subtract), div (divide), mul (multiply), pow (power), mod (modulus), sqr (square root), max (maximum), min (minimum).
Default: none.
Required: no.
valueThe second operand for the math operation to be performed. This can be any value including that stored in the specified contact field in ActiveCampaign. The available field names can be found in [ActiveMember360, Utilities, Contact Fields][utilities-contact-fields]. The lower case version of the Perstag should be used as the field name.
Default: none.
Required: yes, except for sqrt (square root)
targetThe name of an ActiveCampaign contact field in which to save the result. The field can be any contact field in ActiveCampaign. The available field names can be found in [ActiveMember360, Utilities, Contact Fields][utilities-contact-fields]. The lower case version of the Perstag should be used as the field name. If set to the special value 'noupdate' no result will be stored.
Default: field
Required: no.
roundThe decimal rounding to apply to the result. If a positive value is provided the rounding will occur after the decimal point, if a negative value is provided the rounding will occur before the decimal point e.g -1 round to nearest ten. Halves are always rounded up. 0 means any value will be rounded to an integer
Default: 0
Required: no.
decimalThe number of decimals places used to store the result into ActiveCampaign. If a value of 0 is specified, which is the default, the value will be stored as an integer.
Default: 0
Required: no.

Examples

Important

In all examples my_security_code must be replaced by a security code defined in ActiveMember360, Settings, Security, Security Codes on the WordPress site.

This webhook URL will take the value stored in the field "fieldname1", add 300 to it, and store the result back into the same field as an integer:

https://yoursite.com/?mbr_math=my_security_code&field=fieldname1&operation=add&value=300