How to list all event login links that a lead registered for in one email? | Community
Skip to main content
Danielle_Wong
Community Manager
April 12, 2021
Solved

How to list all event login links that a lead registered for in one email?

  • April 12, 2021
  • 1 reply
  • 2494 views

We have an event that has multiple sessions. Each session has a specific login link. We don't want to send 8 different emails with each login link. Is there a way to use velocity scripting to do this? If so, is there a resource I can be pointed to for this?

 

Thanks!

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by SanfordWhiteman

That doesn't seem like the right way (it also starts with an #elseif which is a fatal syntax error in any case).

 

Didn't you imply the field contains all of the possible values, semicolon-delimited? In that case it doesn't equals() just one value.

 

The string needs to be split() on a semicolon, then you loop over the sub-values to look for matches.

1 reply

SanfordWhiteman
New Participant
April 12, 2021

How are you gathering the registrations? Is it a single form? One multi-valued field or several fields?

Danielle_Wong
Community Manager
April 13, 2021

Single form, with checkboxes for each session. When each checkbox is selected, the values are concatenated into a field. 

 

Though, that process can be updated to better accommodate solutions for getting the links in one email.

 

Below is the script I was attempting to utilize for this, but am unsure the tweaking needed:

 

#elseif ( $lead.EventOptions.equals("Event1") ) #set ( $EventTitle = "Event1 Title") #set ( $DateTime = "March 12, 2021 at 10am") #set ( $EventLink = "link") #elseif ( $lead.EventOptions.equals("Event2") ) #set ( $EventTitle = "Event2 Title") #set ( $DateTime = "March 13, 2021 at 11am") #set ( $EventLink = "link") #elseif ( $lead.EventOptions.equals("Event3") ) #set ( $EventTitle = "Event3 Title") #set ( $DateTime = "March 14, 2021 at 12pm") #set ( $EventLink = "link") #else #set ( $EventTitle = "") #set ( $DateTime = "") #set ( $EventLink = "") #end

 

 

SanfordWhiteman
SanfordWhitemanAccepted solution
New Participant
April 14, 2021

That doesn't seem like the right way (it also starts with an #elseif which is a fatal syntax error in any case).

 

Didn't you imply the field contains all of the possible values, semicolon-delimited? In that case it doesn't equals() just one value.

 

The string needs to be split() on a semicolon, then you loop over the sub-values to look for matches.