4 Replies Latest reply on Jul 9, 2016 3:51 PM by Karina Guerra

    Adding token values for a grand total

    Jared Shurtliff

      Sorry is this has been asked before (although I didn't find it anywhere), but is there a way to create a token that will add up the values of other tokens for a grand total? We need to create a form that allows the user to select from a number of different price points, and would like to send a confirmation email with all of those items added up for a grand total. Is that possible?

        • Re: Adding token values for a grand total
          Rachel Noble

          I'd test this before assuming it works, but in program tokens you can set them up so that they are +/- the current value.

          Seems like you could just set up a trigger for "Filled out form" and add all of them into different Change Score flow steps?

          • Re: Adding token values for a grand total
            Jamie Lewis

            you can do this with a velocity script in the email.  Check out developers.marketo.com for a description of how to use velocity and check in this community for examples.  I am sure you will find a suitable example to copy.

            1 of 1 people found this helpful
            • Re: Adding token values for a grand total
              Rajesh Talele

              Hi Jared Shurtliff


              As Rachel and Jamie suggested, you can use


              1> Marketo flow actions

              Only if your 'grand total' is a 'score' type field in Marketo. And the others are lead tokens.

              Then you can add one flow step each to add individual lead field token value to that score field.

              Then you can merge the grand total field token in the email.


              2> Velocity scripting

              If you already have this 'grand total' field created in Marketo and it is not a score field, you then will be better off using velocity script to 'on the fly' calculate the 'grand total' for the email. Please note that the 'grand total' you calculate in such a way will not be stored in Marketo database for future use. It is only for 'display only' in that email.


              3> Use custom javascript on the Marketo landing page

              On the Marketo landing page where you get these price points, add the 'grand total' field as a hidden field. And before you submit the form to Marketo, add up and populate the grand total value. Then simply use that value where ever you need to use including email.

              You will need to code in Javascript


              4> Use Web hooks

              But frankly, one of the above 3 options are better suited for this simple ask.


              Hope this helps


              Rajesh Talele