Lead Field Calculations are currently available for Beta testing.
Contact Support to enable. Feature code: LEAD_FIELD_MATH
- Overview
- How do Lead Field Calculations work?
- How to add a lead field calculation?
- Working with formulas
- Formula functions
-
Conditional fields
Overview
Merchant Central can perform calculations using lead fields and save the result in a field you choose. Calculations can use basic math—addition, subtraction, multiplication, and division—as well as functions such as SUM, AVG, and LOOKUP.
For example, Merchant Central can add two sales values together, calculate an equipment cost, or determine a value used for lead routing, then automatically save the result in the appropriate field. This reduces manual data entry, helps prevent mistakes, and makes it easier to build more automated lead workflows.
How do Lead Field Calculations work?
A lead field calculation has three parts:
- A Calculation Result field — the field where Merchant Central shows the answer.
- One or more input (operand) fields — the fields that provide the values used in the calculation, such as quantity and unit price.
- A Calculation Formula — the math Merchant Central uses, for example quantity × unit price.
When a user enters values in the input fields, Merchant Central runs the formula automatically and shows the answer in the Calculation Result field.
In the example below, the two input fields are Annual Visa/MC Sales and Annual Amex Sales.
After the user enters the two values, Merchant Central adds them together and automatically fills in Total Annual Sales.
How to add a lead field calculation
To set up a lead field calculation:
- Add a calculation result field to your lead.
- Add the input fields to the lead (if they are not already there).
- Create a calculation formula.
The example below creates a simple formula that adds Annual Visa/MC Sales and Annual Amex Sales, then saves the total in Total Annual Sales.
Step 1: Create the calculation result field
- Navigate to Manage → Leads → Manage Lead Fields.
- Click Add/Remove Fields on the appropriate tab.
-
Click Add New Field, select Calculation Result as the field type, enter Total Annual Sales as the field name, and save it.
- Add two additional dollar fields named Annual Visa/MC Sales and Annual Amex Sales.
Step 2: Create the calculation formula
- Navigate to Manage → Leads → Manage Lead Field Calculations.
-
On the Formulas tab, click Add Calculation and select Total Annual Sales as the target field.
-
Use the Add Data Fields lookup to find and select Annual Visa/MC Sales and Annual Amex Sales. As you select the fields, they are automatically added to the Math Formula box on the right.
ℹ️ The lookup field only displays fields from the standard lead tabs, not from record set fields.
-
In the Add Operations section, select the Plus operator. When it appears in the Math Formula box, drag it between the two fields. As you build the formula, the Formula Preview field updates automatically.
-
Click Save to finish creating the formula. It now appears in the calculation list, where it can be edited or deleted at any time.
Step 3: Review and test the calculated field
When setup is complete, your new fields should look similar to the example below. If you want to move the fields, use Edit Layout under Actions.
Test the calculation by entering some sample values and checking that the result is correct.
ℹ️ Calculation Result fields show a small calculator icon. Hover over the icon to see the underlying calculation formula in a tooltip, or click it to highlight the fields used in that calculation.
Working with formulas
Keep these points in mind when using the formula builder:
- If you have more than one formula, Merchant Central runs them in the order shown on Manage Lead Field Calculations page. Drag formulas up or down to change the order.
-
For easier management, you can add sections on the Manage Lead Field Calculations page and organize formulas by dragging them into place. You can also use the search box at the top of the page to find formulas more quickly.
-
Use parentheses to control which part of a formula is calculated first. You can also type and add fixed numbers directly into a formula.
-
Percentage calculations are shown as decimal values by default. For example, 10% × 10% gives 0.01. If you want that result to appear as 1%, change the Calculation Result field format to percentage in the field settings.
Formula functions
Lead field calculations also support four useful functions: SUM, AVG, LOOKUP, and RANGE.
SUM
SUM adds together all values from the same lead record set field. It works with record set fields only, not fields on standard lead tabs.
For example, an Equipment record set can contain several equipment items. Each item can have an Equipment Cost. You can use SUM to add all of those costs together for invoicing.
To set this up:
- Create a Total Equipment Cost Calculation Result field on a separate tab.
- Create a formula that uses SUM to add all Equipment Cost record set values.
To create the SUM formula in this example:
- Navigate to Manage → Leads → Manage Lead Field Calculations.
- Click Add New Calculation.
- Select Total Equipment Cost as the target field.
-
Click SUM. A pop-up appears showing all available record set fields. Select the Equipment Cost field.
-
Save the function. It then appears in the formula box.
Now, when you add equipment items, Total Equipment Cost updates automatically with the combined cost of all entries from all of the record sets.
In the example below, Total Equipment Cost is $55.
AVG
AVG calculates the average of the lead fields you choose.
To set this up:
- Create a Calculation Result field where the average will appear.
- Create a formula that uses AVG, then choose the lead fields you want to average.
To create an AVG formula:
- Navigate to Manage → Leads → Manage Lead Field Calculations.
- Click Add New Calculation.
- Select the calculation result field that should display the average.
-
Click AVG and select the lead fields you want to average.
-
Save the formula. The target field will display the average of the selected fields.
LOOKUP
LOOKUP lets a dropdown choice provide a value that can be used in a calculation.
For example, imagine your lead has these three fields:
- An Equipment Model dropdown listing supported equipment models.
- A Quantity number field.
-
An Equipment Cost calculation result field.
When someone selects an equipment model and enters a quantity, Merchant Central looks up the value for that model, multiplies it by the quantity, and fills in Equipment Cost.
To set this up:
- Create a lookup table. For each equipment model, enter the value Merchant Central should use and choose whether that value is a dollar amount, percentage, or number.
- Create a lead dropdown with options that exactly match the names in the lookup table.
- Create a calculation formula that uses the looked-up model value, multiplies it by the quantity, and saves the answer in the Calculation Result field.
Step 1. Creating a lookup table
- Navigate to Manage → Leads → Lookup Tables.
-
Click Add Lookup Table, enter the table name, and save it.
-
Find the lookup table you created and click Manage Values.
-
Click Add Value to begin adding lookup values. For each value, enter a name, type, and value.
Step 2. Creating a lead dropdown
- Navigate to Manage → Leads → Manage Lead Fields.
- Click Add/Remove Fields on the appropriate tab.
- Click Add New Field.
-
In the pop-up, enter a name for the field, select the Dropdown type, and enter the dropdown options. The option text must match the lookup table values exactly, such as Dejavoo Z8.
Step 3. Creating a formula with LOOKUP
- Navigate to Manage → Leads → Manage Lead Field Calculations.
- Click Add New Calculation.
- Select Equipment Cost as the target field.
- Use Add Data Fields to add the Qty field to the formula box.
-
Click LOOKUP to configure and save the lookup settings. Select the Equipment Model dropdown as the lookup field and select the equipment lookup table created earlier.
-
When finished, add the multiplication operator and drag it between the LOOKUP function and the Qty field. Your formula should look similar to the example below.
The LOOKUP setup is complete. Test it on the lead page to make sure the calculation returns the result you expect.
RANGE
Use RANGE when one input value should produce a predefined output. Merchant Central checks which range the input falls into, then returns the output assigned to that range.
For example, an ISO could use a RANGE to choose a commission rate from a merchant’s monthly processing volume:
| Monthly Processing Volume | Commission Rate |
|---|---|
| $0–$24,999 | 0.01 |
| $25,000–$49,999 | 0.02 |
| $50,000–$99,999 | 0.03 |
If the merchant processes $75,000 per month, that amount falls in the $50,000–$99,999 range. RANGE therefore returns 0.03, which is 3%.
You can use that returned value in the rest of the formula. For example, if monthly net revenue is $4,000, the 3% rate can be used to calculate commission:
Monthly Net Revenue × RANGE(Monthly Processing Volume) = Commission
$4,000 × 0.03 = $120
Here, RANGE chooses the correct commission rate, and the full formula uses that rate to calculate a final commission of $120.
The following steps show how to create the RANGE and build the calculation formula used in the commission example above.
Step 1. Creating a Range
- Navigate to Manage → Leads → Manage Lead Field Calculations and open the Ranges section.
- Click Add Range.
- Enter Commission Rate for the Range name and select the Dollar input type.
- Enter the Min, Max, and Output Value for each condition.
-
Click Save when finished.
ℹ️ Use Add Row to add more conditions, or use the X icon to remove one. A Range can contain up to 10 conditions.
ℹ️ If you select Dollar as the Range Type, you will only be able to look for and select Dollar fields, and not any other types of lead fields.
Step 2. Adding the RANGE function to a formula
After you create a Range, you can add it to a formula just like any other function. In this example, the lead has two dollar fields—Monthly Processing Volume and Monthly Net Revenue—plus a Calculation Result field called Commission.
- Open the Formulas tab and click Add Calculation.
- Select Commission for the Target field.
-
Add the Monthly Net Revenue and the multiplication operand to the formula.
- Click the RANGE button.
-
Select the Monthly Processing Volume field as the input value, and select the Commission Rate range we created earlier.
-
Confirm that your formula looks as in the screenshot example below, and click Save to finish setting up the formula.
ℹ️ The RANGE function in the Math Formula box shows two parameters including the selected input field, and the selected range.
Step 3: Review and test the calculated field
To test the setup, open the lead page. Enter $75,000 for Monthly Processing Volume and $4,000 for Monthly Net Revenue. The Commission field should calculate automatically using the rate for that processing range.
Conditional Fields
Conditional Fields automatically fill in one output field based on a number entered in another input field.
The output field can be a dropdown field or a text field. Other field types are not supported.
For example, you can use Total Risk Score as the input and automatically set the Risk Level dropdown from that score:
| Total Risk Score | Risk Level |
|---|---|
| 0–1.3999 | Low Risk |
| 1.4–2.2999 | Medium Risk |
| 2.3 and above | High Risk |
If a lead has a Total Risk Score of 1.8, it falls in the 1.4–2.2999 range. Merchant Central therefore sets Risk Level to Medium Risk.
Configuring a Conditional Field
- Navigate to Manage → Leads → Manage Lead Field Calculations, open the Conditionals section, and click Add Conditional.
- Select the lead field whose value should be evaluated from the Input Field dropdown (e.g. Total Risk Score).
- Select the field that should be populated from the Output Field dropdown (e.g. Risk Level).
- Enter the Min and Max values for the first conditional range.
- Specify the Output Value for that range:
- For a dropdown output field, select one of the available dropdown options.
- For a text output field, enter the text value that should be assigned.
- Click Add Row to configure additional ranges as needed. You can add up to 10 conditional ranges.
-
Click Save when finished.
When Merchant Central evaluates the Conditional Field, it checks the Input Field, finds the matching range, and fills the Output Field with the value assigned to that range.