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.
Table of contents
Set up equations in your automationSet up equations in rules
Use case
To set up equations in your automation
In most cases you’ll want to use automation maps for your equations because they give you the most customization and reporting for your automation.
- Create a custom numeric field.
- Click Contacts → Automations, then either edit an existing automation map or start from scratch.
- Click What happens next? → Update contact.
- Click your new Update contanct 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:
- [Your Field]+1 will increase the value of a numeric or price field by 1.
- [Your Field]*5 will multiply the value of a numeric or price field by 5.
- [Your Field A]/[Your Field B] will divide the value in field A by the value in field B.
- Complete your automation map, and click Publish → Save and Publish.
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 → New Rule.
- 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 Save.
Use Case
If you would like to offer a coupon to reward top customers, you could set up an automation map that will 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.