Can I add two tokens together and get a percent of a token from Last month?

GrabCADKesa
Level 1

Can I add two tokens together and get a percent of a token from Last month?

Hello Marketo Community,

 

So I'm trying to find a way to take a custom token that will have the integer of lead of how many times they have printed an order and add it to another token. Now I have two tokens, One is for Printing Locally and the Other is printing Remotely. Is there a way that i can take both of these tokens and add them together?

 

Also if that is possible can I take a percentage of what that token was in the last 30 days and see if the token has increased or decreased in a percentage?

 

Thanks for the help

7 REPLIES 7
SanfordWhiteman
Level 10 - Community Moderator

Re: Can I add two tokens together and get a percent of a token from Last month?

These tasks can only be done with the assistance of a webhook.

Jo_Pitts1
Level 10 - Community Advisor

Re: Can I add two tokens together and get a percent of a token from Last month?

@GrabCADKesa ,

and whilst @SanfordWhiteman won't say it by name (as he is the creator of it), FlowBoost is the webhook tool to use here.

Cheers

Jo

Darshil_Shah1
Level 10 - Community Advisor + Adobe Champion

Re: Can I add two tokens together and get a percent of a token from Last month?

You could use velocity script to perform the said math operations if the data was stored in the one of the places that velocity can refer/access, but unfortunately velocity cannot reference the data from non-VTL custom tokens. It can only reference data from the attributes on the person, opportunity, program member, and custom objects, apart from the data in the  variables/macros defined in other velocity script tokens. But w/o data defined in any one of those, you need to use webhook as Sandy and Jo advised. 🙂

 

SanfordWhiteman
Level 10 - Community Moderator

Re: Can I add two tokens together and get a percent of a token from Last month?

You can read other {{my.tokens}} from Velocity... but I think the OP doesn't really mean "custom tokens," rather custom fields on the Person.

Velocity couldn't write the calculated value back to another field, in any case. It could only display it in an email.

Darshil_Shah1
Level 10 - Community Advisor + Adobe Champion

Re: Can I add two tokens together and get a percent of a token from Last month?

Ahh, thanks! May be I got mis-led from the post as it mentioned custom tokens (but probably they meant custom fields token as you said)! Also, I get that velocity can reference data set in other Velocity{{my.tokens}} embedded in the same email asset, but AFAIK - it cannot reference data from other custom tokens like the text tokens, right?

 

And yes, totally - velocity cannot update data in the fields, just print the data in the emails. 

 

SanfordWhiteman
Level 10 - Community Moderator

Re: Can I add two tokens together and get a percent of a token from Last month?


Also, I get that velocity can reference data set in other Velocity{{my.tokens}} embedded in the same email asset, but AFAIK - it cannot reference data from other custom tokens like the text tokens, right?

You can read from other {{my.tokens}}, but we strive to avoid that unless it’s critical for a complex workflow.

Darshil_Shah1
Level 10 - Community Advisor + Adobe Champion

Re: Can I add two tokens together and get a percent of a token from Last month?

Gotcha, thank you! 🙂