Incorporating equations into numeric and pricing fields allows you to customize your data for a multitude of uses, such as creating reports and automating follow-up based on criteria such as quantity and frequency of purchases. 

Follow the steps below to set up math equations with numeric or price fields in Ontraport.

Steps


To set up equations in campaigns:

In most cases you’ll want to use campaigns for your equations because they give you the most customization and reporting for your automation.

  • Create a custom numeric field.
  • Click Contacts → Campaigns, then either edit an existing campaign or start from scratch.
  • Click What happens next? element → Update Contact element.
  • Click your new Update Contact element element, then select your numeric or price field from the dropdown on the far left.
  • Choose the numeric or price to be updated in the “Update the field” dropdown and click Insert Merge Field.
  • Add in the merge field for your numeric/price field. From there, you can set up your equations to add, subtract, multiply, or divide:
    1. [Your Field]+1 will increase the value of a numeric or price field by 1.
    2. [Your Field]*5 will multiply the value of a numeric or price field by 5.
    3. [Your Field A]/[Your Field B] will divide the value in field A by the value in field B.


  • Complete your campaign, and click> Save and Publish.

To set up equations in rules:

If you simply want an action to trigger your equation to calculate, use a rule.

  • Create a custom numeric field.
  • Click Contacts → Rules → .
  • Name your rule and choose your trigger.
  • Click + Add Action → add “Change the Value of a Field” and select your numeric or price field to be updated from the dropdown on the far left.
  • See step 6 above for equations that can be used.
  • Click .

Use Case


If you would like to offer a coupon to reward top customers, you could set up a campaign that will automatically send coupon codes to your customers who frequently make purchases. For example, you can set up a trigger element for Product is Purchased. Following the trigger, add in an Update Contact element and select your custom numeric field. Insert the merge field for your field +1 (e.g. [Purchase Count]+1). Now add a goal for “Purchase Count” to be updated with a condition that “Purchase Count” is equal to five. Follow the goal with a send email element. This email will include the merge field for a personal coupon for this contact. This way, every time that a customer purchases five products from you, then they will be rewarded with a coupon.