SOLVED

Marketo Form Field Calculation

Go to solution
JMC01
Level 1

Marketo Form Field Calculation

Hi all,

 

I was hoping someone could assist me with a forms-related query.

 

I am trying to create a form with the ability to display simple calculation of previous form field selections.

 

Simply put, within the form:

 

- Field A (Product Price) currently as a currency field

- Field B (Product Quantity) currently as a integer field

 

I would like to have a Field C that follows, which will automatically calculate Field A x Field B.

 

I have looked into Formula fields, however I am unsure if they are applicable to my ask and have been unable to use them within the form.

 

Any assistance would be greatly appreciated!

2 ACCEPTED SOLUTIONS

Accepted Solutions
Michael_Florin
Level 10

Re: Marketo Form Field Calculation

If you really need to write the result of your mathematical operation into a Marketo field, you can't do this with Marketo alone. You will need to bring in an external service that does the calculation for you. You could look at https://flowboo.st/ or check out Marketo's Self-Service Flow Step and use the Adobe Runtime I/O: https://experienceleague.adobe.com/en/docs/marketo/using/product-docs/core-marketo-concepts/smart-ca...

If you need the output of your calculation only on an email, you can do this via Email Script Token. Velocity - its language - can do math. https://experienceleague.adobe.com/en/docs/marketo/using/product-docs/email-marketing/general/using-...

View solution in original post

SanfordWhiteman
Level 10 - Community Moderator

Re: Marketo Form Field Calculation

To be clear, if you’re talking about all 3 fields being on the form — much as I appreciate Michael’s mention of FlowBoost! — there’s no need to use anything on the server side.

 

Field C can be automatically populated with Field A * Field B whenever A or B changes, then A, B, and C can be stored in Marketo.

 

Here’s a demo form I put together for an earlier thread showing a similar real-time calculation:

MktoForms2 :: Total Numeric Fields

 

Of course if C is always the product of A and B it’s a bit of a waste to store C when (as Michael also mentioned) you can calculate it dynamically whenever you need to output it: use Velocity $math.mul() in emails or JS on LPs.

View solution in original post

2 REPLIES 2
Michael_Florin
Level 10

Re: Marketo Form Field Calculation

If you really need to write the result of your mathematical operation into a Marketo field, you can't do this with Marketo alone. You will need to bring in an external service that does the calculation for you. You could look at https://flowboo.st/ or check out Marketo's Self-Service Flow Step and use the Adobe Runtime I/O: https://experienceleague.adobe.com/en/docs/marketo/using/product-docs/core-marketo-concepts/smart-ca...

If you need the output of your calculation only on an email, you can do this via Email Script Token. Velocity - its language - can do math. https://experienceleague.adobe.com/en/docs/marketo/using/product-docs/email-marketing/general/using-...

SanfordWhiteman
Level 10 - Community Moderator

Re: Marketo Form Field Calculation

To be clear, if you’re talking about all 3 fields being on the form — much as I appreciate Michael’s mention of FlowBoost! — there’s no need to use anything on the server side.

 

Field C can be automatically populated with Field A * Field B whenever A or B changes, then A, B, and C can be stored in Marketo.

 

Here’s a demo form I put together for an earlier thread showing a similar real-time calculation:

MktoForms2 :: Total Numeric Fields

 

Of course if C is always the product of A and B it’s a bit of a waste to store C when (as Michael also mentioned) you can calculate it dynamically whenever you need to output it: use Velocity $math.mul() in emails or JS on LPs.