Re: Velocity script tokens do not work on programs created via API

Jon_Wright
Level 4

Velocity script tokens do not work on programs created via API

Hi

 

Seem to have stumbled on another velocity script issue in that script tokens don't appear to work on programs created via the API. There's no error, just seems to ignore the token(s) completely, although inherited script tokens do still appear to work, but that's not much help in the case I'm using it for.

 

Has anyone else experienced this?

 

Thanks

Jon

5 REPLIES 5
SanfordWhiteman
Level 10 - Community Moderator

Re: Velocity script tokens do not work on programs created via API

Hey Jon,

 

Sadly (though I have to test it) this wouldn’t surprise me. To be clear, you’re talking about creating from scratch using the API, not cloning using the API?

Jon_Wright
Level 4

Re: Velocity script tokens do not work on programs created via API

Hi Sanford - that was actually cloning via API. I thought it may have been related to fact I was cloning an event program to be a child of another event program. But also tested a clone which wasn't child program and script tokens still didn't work, that was both new and existing script tokens on the program.

Haven't tested creating a program from scratch - will test later.

Thanks

SanfordWhiteman
Level 10 - Community Moderator

Re: Velocity script tokens do not work on programs created via API

Let me know! It would be sadly predictable if Velocity tokens were unable to be used in API-created Programs, since the tokens aren’t supported via the API itself anymore.

Jon_Wright
Level 4

Re: Velocity script tokens do not work on programs created via API

Hi @SanfordWhiteman - just got around to testing this but seems script tokens do work when creating a new program via the API

Jon_Wright
Level 4

Re: Velocity script tokens do not work on programs created via API

So further updated on this if anyone is interested, it seems script tokens do work on a program cloned via the API, but not when the email is within a campaign folder...

 

And a further update to my update. It's not only script tokens that seem to be affected, simple text tokens also don't render when the email is within a folder on the program. Testing my OCD to the limit, deep breath...it's ok for emails not to be in their own folder

 

Right, hopefully final update on this. So issue is actually when folder names contain a period e.g. "3. Emails" - I guess related to same reason you can't use periods in token names themselves, so hyphens it is from now on.

 

@SanfordWhiteman FYI