Calculate Custom Fields

Follow

LeadByte allows you to calculate the sum of two custom fields which will populate into an additional custom field. This is a helpful tool that will enable you to post out the results of the calculated fields via your delivery and/or responder. Subsequently, you will be able to accommodate a ruleset that you may have set up to accept or reject leads based on the calculated field.

Example:

You are running a loan campaign that is collecting a leads income surplus/deficit. However, you do not want to directly ask this question so you are collecting the monthly income and the monthly expenditure. Using the calculated custom field will automatically calculate the difference between these fields and populate an entry that is not visible to the lead on the form.

For the below campaign, I am aiming to collect the leads monthly income (Monthly_Income) and monthly expenditure (Monthly_Expenditure).

LeadByte - Campaign Fields and 2 more pages - Personal - Microsoft_ Edge 2022-04-27 at 2.33.01 PM

However, I want to calculate the difference between Monthly_Income and Monthly Expenditure (data1 - data2). To achieve this:

  • Create the custom fields and label them with the necessary labels
  • Create another custom field and set the "Required" field to "Calculate"
  • On the field that is Calculating the two fields, select "Options" and click "Settings"
  • Input the two fields you would like to calculate the sum between the two fields

Screen Recording 2022-05-19 at 01.18.01.33 PM

For an example lead, I am using the below JSON request:

{
"key": "API_KEY_HERE",
"lead": {
"campid": "CAMPAIGN_ID_HERE",
"email": "test_email@test.com",
"firstname": "Sean",
"lastname": "Barton",
"monthly_income": "1600",
"monthly_expenditure": "1200"
}
}

I have submitted the lead with the Monthly_Income value as £1,600 and the Monthly_Expenditure value as £1,200. This has outputted the below lead:

Image 2022-05-19 at 9.09.56 AM

As you can see from the above, the Surplus/Deficit has been calculated despite the field not being provided in the JSON request.

 

As always, if there are any questions regarding this process, raise a ticket with our Support team. 

Was this article helpful?
0 out of 0 found this helpful

Comments