I am working on the GDPR compliance and wanted to list the selected opt-in(s) for the various types of content in my custom field Consent Notes. It keeps giving me an error though, so I'm wondering what's the problem. Here's the full thing I started off with in my Change Data Value flow step:
{{system.dateTime}} | Consent set to TRUE | http://page.woodwing.com/subscription-center.html | Yes, WoodWing can use the information I provide on this form to send me communication in line with my preferences above. | Newsletters={{lead.Newsletter opt-in}} | Events/Webinars={{lead.Events / Webinars opt-in}} | Whitepapers/eBooks={{lead.Whitepapers / eBooks opt-in}}
The step worked without the last part where I list the different opt-ins.
To find the error I brought it back to the basics:
{{Lead.Events / Webinars opt-in}}
And still get an error in my Activity Log: Choice had one or more invalid tokens.
I even went into the rich editor to make sure I use the right tokens by having the editor fill them and them copy and paste them. I'm sure the token is correct.
Is the conclusion that I cannot concatenate Boolean values in a string variable?
Solved! Go to Solution.
I'd use a datetime field here instead, stamped with the time someone opted in. It carries more information and is (as you know) stringified as expected. Really, booleans are not as useful as they seem; save for data storage requirements (only taking up a bit, which few people care about w/a system like Marketo) they don't represent anything a non-empty datatype can't do just as well.
So in the meantime I did find out that indeed I cannot use Boolean in the String concatenation - that's a pity, really.
Anybody any suggestions how to squeeze this information in a string?
I'd use a datetime field here instead, stamped with the time someone opted in. It carries more information and is (as you know) stringified as expected. Really, booleans are not as useful as they seem; save for data storage requirements (only taking up a bit, which few people care about w/a system like Marketo) they don't represent anything a non-empty datatype can't do just as well.
Awesome work around Sanford Whiteman!
Then you can set the default token value to FALSE and you either have a date when marked true or a FALSE value.
Thanks Sanford, I see how this could work in a new environment. I'm afraid I have too many dependencies on the existing fields already to still make this change. But an eye opener for the use of Booleans vs. other types of variable in general!
Hey Gerard,
I tested this and received the same result. Options to resolve this include:
This would probably be a good idea to submit with the hopes that Marketo can provide TRUE or FALSE values for boolean fields when used in text area. Maybe there is a technical reason why this can't be done, but they should at least scope feasibility because alot of other customers will run into this same issue if they are tracking consent comments related to GDPR (which we ALL should be doing...)
Happy to submit the ida for you if you'd like. Let me know.
Sincerely,
Keith Nyberg
Thanks Keith, very useful information. I will need to dig a bit deeper to decide what is the most appropriate solution in my case.
Hey Gerard,
Had to laugh when I read this post; you and I are taking a VERY similar approach to this, bud! I also worked out that booleans don't like being added to strings. And there's another gotcha, too... Marketo will write a datetime to a string in the instance timezone...
So, what I've done to overcome this is to change my Consent - Change Log (which is similar to your Consent Notes field) using choices in the Change Data Value flow step
Choice 1:
If Consent - Preference - Information Opt-In is 'true'
Attribute: Consent - Change Log New Value: '{{lead.Consent - Preference - Information Timestamp}} (EST). User changed INFORMATION Opt-In to TRUE. {{my.linebreak}}{{lead.Consent - Change Log}}'
Default choice:
Attribute: Consent - Change Log New Value: '{{lead.Consent - Preference - Information Timestamp}} (EST). User changed INFORMATION Opt-In to FALSE. {{my.linebreak}}{{lead.Consent - Change Log}}'
This checks the value of the relevant opt-in field and then writes the timestamp (with the instance timezone specified) and then hardcodes the change that was made to the opt-in. The bit at the end is a bit of 'Whiteman Wizardry'... it basically prepends the new change to the old one, but instead of using a pipe, it uses a token linebreak.
Almost done with my Preference Centre... it's been a slog!!
Good luck!
g