Re: Including content/snippet in email based on CO data

Anonymous
Not applicable

Including content/snippet in email based on CO data

I'm looking for a way to automate a pre-event email reminder with event info changing based on the date of the event (stored in a custom object). Ideally, we would be able to use velocity script token to access the event date and then call a specific content block or snippet based on that data. I understand that snippets may not be doable via velocity but is there a workaround or some other method?

Building a segmentation for each event isn't ideal because we have several events and registration types and it wouldn't be practical to manual create a segment for each type of content. We could also include all the content in a velocity script token but we'd like to keep the content separate so producers can add/edit copy without accessing/breaking the velocity script.

We thought of using a custom object to hold the event information (linked many to many to the event registration object) but I've read that edge object isn't accessible to include in email content?

Thanks in advance for the help!     

Tags (1)
4 REPLIES 4
Jep_Castelein2
Level 10

Re: Including content/snippet in email based on CO data

Not sure about your specific setup, but ideally you should store an event date in a Program Token, not in a Custom Object. Same for Event Content, that should ideally be in Program Tokens.

SanfordWhiteman
Level 10 - Community Moderator

Re: Including content/snippet in email based on CO data

We thought of using a custom object to hold the event information (linked many to many to the event registration object) but I've read that edge object isn't accessible to include in email content?

That's correct, and an important technical reason that COs will not work here.

As Jep mentions, the principal reason is this is distinctly Program-level data and should not rely on the fragile and complex connection between a lead, a program, and a junction object.

If your goal is separation of concerns, you can create a Velocity "data" token for each content variant (storing only that content) then assemble the content using a "code" token. This is the way I typically split up Velocity tasks, so some tokens are user-editable while others are developer-only.

Anonymous
Not applicable

Re: Including content/snippet in email based on CO data

Thank you for the response!

I have a working example where I'm accessing the custom object (event purchased) to pull in the lead's event date then based on that date I am calling the matching variable set in a separate scripting token. I was unaware I can restrict access to some tokens - I'm very interested in having a "code" token do all the processing and pull the appropriate data token - is there some documentation on that? Thanks again!

SanfordWhiteman
Level 10 - Community Moderator

Re: Including content/snippet in email based on CO data

It's not a formal permission system applied to individual tokens but a matter of where in the folder hierarchy you place them, plus well-disseminated guidelines.