Re: Create/update calendar file token

Babu_Chikati
Level 3

Create/update calendar file token

Hi,

We are looking to embed calendar event in the marketo emails. We have created a .ics file token and added to to the email template. We wanted to update the calendar file token values via marketo API call, Can we create or update calendar file token via Marketo API? do not find any documentation on this.

 

Appreciate your help.

 

Thanks,

Babu

4 REPLIES 4
SanfordWhiteman
Level 10 - Community Moderator

Re: Create/update calendar file token

No. Recommend switching to Agical links instead and I’m sure many others would agree.

Babu_Chikati
Level 3

Re: Create/update calendar file token

Thank you Stanford! 

Would like to discuss little bit on this issue, following steps I have done to update Calendar file token via API

1. Retrieved Calendar file token details via API, following is token data returned from Marketo

"tokens": [
{
"computedUrl": "https://myurl",
"type": "iCalendar",
"name": "Calendar event",
"value": "{\"subject\":\"Test subject\",\"location\":\"Test location\",\"hyperlink\":\"Save the Date\",\"startDate\":1702551600,\"endDate\":1702560600,\"description\":\"Test calendar file\",\"timezone\":\"America\\/New_York\"}"
}
]

Note:

startDate value in token is 12/14/2023 11:00AM EST but API returns startDate as 1702551600

endDate value in token is 12/14/2023 1:30PM EST but API returns endDate  as 1702560600

 

2. Used following JSON to update Calendar file token, token values gets updated

{
"name": "Calendar event",
"value": "{\"subject\":\"NPB webnair\",\"location\":\"Test NPB\",\"hyperlink\":\"Event Date\",\"startDate\":1702551600,\"endDate\":1702560600,\"description\":\"Test calendar file\",\"timezone\":\"America\\/New_York\"}",
"folderType": "program",
"type": "iCalendar"
}

3. Problems comes where if I pass start and end date values in date time format (12/20/2023). Either API is throwing exception or token value gets corrupted.

 

can you please help me to understand how 12/14/2023 11:00AM EST is converted to 1702551600?

Thank you so much for helping on this.

 

Thanks,

Babu

 

SanfordWhiteman
Level 10 - Community Moderator

Re: Create/update calendar file token

Epoch time in seconds.

 

Note the call you’re using is not supported (as with Velocity tokens). Expect it to stop working at any time, that’s why I said “No” above.

Babu_Chikati
Level 3

Re: Create/update calendar file token

Thank you so much, Sanford!!

Got better understanding on iCalendar. Agical link is really cool!. We will be using agical links for sure.

 

Thanks,

Babu