RSVP Alert

Jeffrey_Hanraha
Level 3

RSVP Alert

I have an email alert partial set up to go to our sales team, where I'm have an issue is I'm not sure what token to use that will tell them if the person is attending or not attending when they have filled out the form. We are using the Event RSVP field below is how the checkboxes are set up.

Yes, I'm coming|true

No, I won't be there|false

Thanks!

13 REPLIES 13
Floyd_Alvares2
Level 8

Re: RSVP Alert

Hi Jeffrey,

Is this Event RSVP field on the lead object in Marketo?

If so you could just leverage the {{lead.Event RSVP}} in the email. That should appear when you click on the tokens section in the email editor.

You could customize your email to look more reader friendly like

I am attending: {{lead.Event RSVP}}

Hope this helps

Floyd

Edit: Sorry just realised that the field is a checkbox. which would only display a 1 or 0 value. 1 = true and "blank" = false. If we need to make this more user friendly you may need to leverage email scripting token to replace the 1 with True and blank with False.

Process would be something like

1. Creating a Email Script "my token": Managing My Tokens - Marketo Docs - Product Documentation

2. Add velocity scripting code (example)

##check if the Event RSVP = 1

#if(${lead.Event RSVP} == "1")

## set display value is "Yes, I am attending"

#set($display = "Yes, I am attending")

#else

## set display value is "No, I am not attending"

#set($display = "No, I am not attending")

#end

##print the value

${display}

3. Add the mytoken value into the email.

SanfordWhiteman
Level 10 - Community Moderator

Re: RSVP Alert

Booleans are "1" or "" (empty string) in Velocity, not "1" or "0", see https://blog.teknkl.com/velocitip-boolean-string-number-and-message/ and https://blog.teknkl.com/marketo-vtl-strings-all-the-way-down/.

In the first linked post I describe how to use $display.message to choose output based on these Boolean-like strings; another way to do it is like

#set( $mktoBoolean = { "1" : true, "" : false } )

#if( $mktoBoolean[$lead.EventRSVP] )

Yes, I'm attending

#else

No, I'm not attending

#end

Finally, when posting code, use the Advanced Editor's syntax highlighter so it's readable.

https://s3.amazonaws.com/blog-images-teknkl-com/syntax_highlighter.gif

Floyd_Alvares2
Level 8

Re: RSVP Alert

Thanks for the correction Sanford. Not sure why I wrote 0 when I referred to it as blank in the same line.

Also thanks for the tip - brand new to posting in this forum.

Floyd

Jeffrey_Hanraha
Level 3

Re: RSVP Alert

Thanks Floyd and Sanford, I tried both scripts and this is what is happening.


If I Select Yes, I'll be attending on the form, the email alert says No, I'm not attending.

Any ideas of to why this my be happening?

Jeff

SanfordWhiteman
Level 10 - Community Moderator

Re: RSVP Alert

Remember to check off your field in the tree on the right hand side of Script Editor.

It sounds like your field is not present in the Velocity context.

Floyd_Alvares2
Level 8

Re: RSVP Alert

Hi Jeffrey

Can you confirm

  • Event RSVP is a boolean field type in Marketo?
  • Also on form submission that the Event RSVP field is checked to true on the record when the option "yes i am attending" is selected?

Thanks

Floyd

Jeffrey_Hanraha
Level 3

Re: RSVP Alert

Hi Floyd,

I can confirm the following:

  • Event RSVP is a boolean
  • "Yes I am attending" is set to true when selected

Thanks,

Jeff

SanfordWhiteman
Level 10 - Community Moderator

Re: RSVP Alert

And the Script Editor checkbox, like I said.

Anne_Angele1
Level 4

Re: RSVP Alert

A simpler answer may be to have two alerts - one for attendees, one for declined - so you can simply write in what you want it to say, rather than using a token. Use a choice step to send attendee version if Event RSVP = true; otherwise, send declined.