SOLVED

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

Go to solution
Danielle_Wong
Level 8 - Community Advisor

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

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!

1 ACCEPTED SOLUTION

Accepted Solutions
SanfordWhiteman
Level 10 - Community Moderator

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

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.

View solution in original post

4 REPLIES 4
SanfordWhiteman
Level 10 - Community Moderator

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

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

Danielle_Wong
Level 8 - Community Advisor

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

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
Level 10 - Community Moderator

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

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.

Danielle_Wong
Level 8 - Community Advisor

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

@SanfordWhiteman Thank you for the guidance. I will work to modify this and see if it works for me.