SOLVED

Ways to use the calendar token?

Go to solution
Anonymous
Not applicable

Re: Ways to use the calendar token?

That's clever, but I want to keep anyone from having to tinker with any code, no matter how simple. Also, I'd like to remove as much redundancy as possible.

I'm just going to use Marketo's existing calendar tokens for now and accept the redundancy. Later on I might look at using the API. That way, I'll be able to add calendar links anywhere I like so long as I know the program ID, and if I have to make any changes to dates, they'll be applied everywhere the moment the program is updated.

And no one in Marketing will ever to look at anything that looks remotely like code.

Thanks for the tips though, Sanford! I hadn't realized you could separate the tokens in that way. I thought each token was self-contained.

SanfordWhiteman
Level 10 - Community Moderator

Re: Ways to use the calendar token?

I'm just going to use Marketo's existing calendar tokens for now and accept the redundancy. Later on I might look at using the API. That way, I'll be able to add calendar links anywhere I like so long as I know the program ID, and if I have to make any changes to dates, they'll be applied everywhere the moment the program is updated.

FYI, calendar tokens themselves don't actually work w/the API last time I looked. But you can use regular text tokens (maybe that's what you meant).

Thanks for the tips though, Sanford! I hadn't realized you could separate the tokens in that way. I thought each token was self-contained.

Yep, Velocity context is shared across tokens (in insertion order).  I often add a dictionary object to the header in the template, then read it in the email.

Anonymous
Not applicable

Re: Ways to use the calendar token?

Thanks again, Sanford!

Yes. To be clear, we're not going to use the Marketo calendar tokens at all when we go the API route. We're going to build an outside application that, when provided with the program ID, pulls specific tokens from the program using the API and uses them to generate and serve the user the ICS file/link dynamically.

Bonus there is that we should be able to provide a bunch of different formats just by appending a parameter, similar to what www.AddEvent.com does, to help the application serve the right file/link. Also, we should be able to use it on our site, social media, et cetera.

Not sure if the date and time information can be pulled from the "main event" entry in the program's calendar. That would be ideal, but, if not, some additional tokens should be fine. At least they'll all be in one place.

SanfordWhiteman
Level 10 - Community Moderator

Re: Ways to use the calendar token?

Sounds pretty DoS-y though... you're going to call the Programs API multiple times on every hit (program-level data and token data)?

SanfordWhiteman
Level 10 - Community Moderator

Re: Ways to use the calendar token?

Also, so you avoid the DoS vulnerability, why not use an interstitial LP as your "service"? The LP will have access to all the {{my.tokens}} and it can immediately build and redirect people to the calendar URL.

Anonymous
Not applicable

Re: Ways to use the calendar token?

Yeah. Maybe. That does sound easier.

Anonymous
Not applicable

Re: Ways to use the calendar token?

Good work though, on Agical.io. At least that gives people an option.