SOLVED

Re: Form with check boxes and workflow to send respective content

Go to solution
adele_briggs
Level 3

Form with check boxes and workflow to send respective content

I think there must be a solution for this, but because I am new to Marketo I don't always know the best way to approach a request.

 

I need to build a form which has a multiple select check box. [To be used at an event to be able to send content that is relevant in a follow up email] - is this possible.

 

The fields would only be in Marketo, not linked to CRM. 

Can I build a workflow that identifies if the box has been checked to send the information.  

Would it have to be a separate email for each option?

Or could it be dynamic?

 

Any advice, direction appreciated.

Thanks 😊

 

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
Kaitlyn_Simko
Level 4

Re: Form with check boxes and workflow to send respective content

Yes, you can make a smart campaign (either a batch or a trigger) that looks for the change data value of your field.  If you are wanting to send the prospect an email showing them their selection, that is possible too.  Use lead tokens.

View solution in original post

SanfordWhiteman
Level 10 - Community Moderator

Re: Form with check boxes and workflow to send respective content


I need to build a form which has a multiple select check box. [To be used at an event to be able to send content that is relevant in a follow up email] - is this possible.

To reduce confusion for later readers, there’s no such thing as a “multiple select checkbox.“

 

There’s a Checkbox field type.

  • That’s one checkbox, intended to be mapped to a Boolean field in the database.
  • It sets the Boolean to true or false.
  • It may be required or not required.
  • If not required but left unchecked, it sets the value to false (i.e. it always has the capacity to change the server value).

 

And there’s a Checkboxes field type.

  • That’s one or more checkboxes, intended to be mapped to a String field.
  • It allows zero or more boxes to be checked.
  • If required, at least one box must be checked.
  • If one box is checked, the server value is set to the value attribute of that checkbox.
  • If more than one box is checked, the server value is set to the value attributes of all the checked boxes, concatenated in DOM order and separated by a semicolon (;).
  • If not required and no boxes are checked, the current server value will not be changed.

 

So if you’re using a Checkboxes field, the server value in Marketo could look like “oranges;apples;pears”. (If you output the {{lead.token}} for that field, you’d see that whole string.) Therefore, if you want to know which boxes were checked, you have to use a Filter with the Contains operator. Note this type of Contains match can be prone to unexpected results, so I recommend enclosing each value in some special character like a square or curly brackets. In other words, store [oranges] instead of just oranges.

View solution in original post

14 REPLIES 14
Kaitlyn_Simko
Level 4

Re: Form with check boxes and workflow to send respective content

Yes, you can make a smart campaign (either a batch or a trigger) that looks for the change data value of your field.  If you are wanting to send the prospect an email showing them their selection, that is possible too.  Use lead tokens.

adele_briggs
Level 3

Re: Form with check boxes and workflow to send respective content

Thank you for this reply. 

 

I created some custom fields, brochure 1 and brochure 2. I've created some URL tokens to the brochures. In the email I have incorporated the tokens.

 

I don't know how to link the two together?

If brochure 1 = true, then URL token is displayed...?

 

😕 

 

SanfordWhiteman
Level 10 - Community Moderator

Re: Form with check boxes and workflow to send respective content


I created some custom fields, brochure 1 and brochure 2. I've created some URL tokens to the brochures. In the email I have

If brochure 1 = true, then URL token is displayed...?


This logic requires Velocity.

 

i.e.

#set( $MARKETO_BOOL_TRUE = "1" )
#if( $lead.requestedBrochure1.equals($MARKETO_BOOL_TRUE) )
<a href="https://www.example.com/brochure1.pdf">Get Brochure 1</a>
#end
#if( $lead.requestedBrochure2.equals($MARKETO_BOOL_TRUE) )
<a href="https://www.example.com/brochure2.pdf">Get Brochure 2</a>
#end
adele_briggs
Level 3

Re: Form with check boxes and workflow to send respective content

Thank you so much for your comment. I wasn't sure what/how Velocity was used, after a quick google I've just found this Velocity Article to help me incorporate into the form. I'm going to build the tokens and test it out now. I'm excited about this!

adele_briggs
Level 3

Re: Form with check boxes and workflow to send respective content

I've created a script token.

I've updated the email to include the script token.

It doesn't seem to be working as I expect. I'd expect to see the Link in the email depending on what tick box is true.

The Field Name is brochure1 and brochure2.

I'm not sure if I have missed anything?

 

 

#set( $MARKETO_BOOL_TRUE = "1" )
#if( $lead.brochure1.equals($MARKETO_BOOL_TRUE) )
<a href="https://mhrglobal.com/sites/default/files/2020-07/MHR%20brochure.pdf">Get MHR Brochure</a>
#end
#if( $lead.brochure2.equals($MARKETO_BOOL_TRUE) )
<a href="https://mhrglobal.com/sites/default/files/2021-05/People_First_Brochure_0.pdf">Get People First Brochure</a>
#end

 

 

SanfordWhiteman
Level 10 - Community Moderator

Re: Form with check boxes and workflow to send respective content

How have you ensure that the Velocity names of the properties are brochure1 and brochure2? Did you select them in the tree on the right-hand-side of Script Editor and (for testing) drag them onto the Velocity canvas?

adele_briggs
Level 3

Re: Form with check boxes and workflow to send respective content

thanks for that. I've pulled in the properties. the only detail that changed was the parenthesis. the email is now soft bouncing with the following error.  I am assuming it is the change to the code that affected the send. I am not sure if it is now correct?

 

5000 Lexical error, Encountered: "e" (101), after : "." at *unset*[line 406, column 24]

 

#set( $MARKETO_BOOL_TRUE = "1" )
#if( ${lead.brochure1}.equals($MARKETO_BOOL_TRUE) )
<a href="https://mhrglobal.com/sites/default/files/2020-07/MHR%20brochure.pdf">Get MHR Brochure</a>
#end
#if( ${lead.brochure2}.equals($MARKETO_BOOL_TRUE) )
<a href="https://mhrglobal.com/sites/default/files/2021-05/People_First_Brochure_0.pdf">Get People First Brochure</a>
#end


SanfordWhiteman
Level 10 - Community Moderator

Re: Form with check boxes and workflow to send respective content

You can’t use curly braces there (basically never use curly braces inside a #directive). That’s what the fatal error is from.

 

It looks like your properties are as originally named, but you didn’t have them checked off in the tree.

 

Please highlight your code using the Syntax Highligher (“Insert/Edit Code Sample”) next time for readability — thanks!

adele_briggs
Level 3

Re: Form with check boxes and workflow to send respective content

Thank you. I'll look to see how I check them off in the tree, remove the brackets and try again 😁

 

Apologies for not highlighting the code 😟.