Using string field for preference center

Kim_Gandy1
Level 7

We're looking update how we auto opt-in subscribers to fulfillment emails they're paying to receive. If a subscriber is new or renews, we want to auto opt-into the fulfillment newsletters UNLESS they've manually requested to opt-out via their preference center.

Currently all newsletters in our preference center are managed by boolean fields in a form, which do not allow for a NULL value.  I'm considering changing them to string fields that display a checkbox. The string  would allow "yes, no, null" values in the field. This would help in the trigger campaign opting in users, and leaving preferences as is if the value is "no".

Smart list

Trigger = subscription date updated

Flow

Change data value, if newsletter preference is "yes or null" to = "yes"

Any thoughts on using a string field vs boolean? Possible changes I should think thru? I've reviewed Josh Hill​'s Building a Full Subscription Center in Marketo - Marketing Rockstar Guides and multiple community threads, but didn't see anything on my question.

13 REPLIES 13
SanfordWhiteman
Level 10 - Community Moderator

I'd sooner use an integer field as an enumeration. Values can be -1 (null) 0 (false) 1 (true).

Kim_Gandy1
Level 7

So by default, all new leads would have to be changed to show -1 until subscribed? How would I backfill this value?

SanfordWhiteman
Level 10 - Community Moderator

Smart Campaign? Or you could switch it so -1 is false and 0 null. Just saying I tend to use enumerations instead of freeform strings, because it's faster, smaller, and has no possibility of typos.

Kim_Gandy1
Level 7

Hi Sanford Whiteman​, just following up. Any thoughts on the issues I ran into with integer field on form?

SanfordWhiteman
Level 10 - Community Moderator

I'll look at this later tonight and let you know.

Kim_Gandy1
Level 7

Sanford Whiteman​, I know it's been a minute, but did you ever find any additional helpful tips to make an integer field work for this logic?

Desired action: Data value change from -1 to 1

Test result: Data value changes from -1 to 0

SanfordWhiteman
Level 10 - Community Moderator

Sorry Kim, forgot about this. I do have the answer and will try to get to it next 24h.

Kim_Gandy1
Level 7

Hi Sanford Whiteman​,

Hate to be a pest, but understand if you don't have time to troubleshoot this with me. I need to stay on schedule with this project, so let me know if you can assist or I need to find alternate solutions.

Really appreciate your help, as always!

Kim

SanfordWhiteman
Level 10 - Community Moderator
Kim_Gandy1
Level 7

Hi Sanford Whiteman​, we're testing driving an integer field for the preference center and ran into a snag. In keeping with your number structure (-1=null, 0=no, 1=yes), the following user actions do not update in the preference center. Any idea how to make this action work?

Desired action: Data value change from -1 to 1

Test result: Data value changes from -1 to 0

Kim_Gandy1
Level 7

Additional details, we're using the integer field on a form as a checkbox and the issue occurred. When we used a dropdown, the values updated properly, but checkbox would be a better user experience.

Kim_Gandy1
Level 7

How do I store values -1, 0, 1 on the integer? The user is seeing it as a checkbox, but a number needs to be stored on the lead record.

Josh_Hill13
Level 10 - Champion Alumni

You'd need some jquery/script to display the value to the user on the page.

If someone is paying for this Email, wouldn't you rather setup something more like

Newsletter 1=Paid/Cancelled/Paid-Unsubscribed/Paid-Subscribed

and then display it to the user in a way that made sense - such that the understand that they are Paying and Subscribed or Paying and Not receiving?