SOLVED

How do I only show customer newsletter option to customers in email subscription center?

Go to solution
Tim_Marcacci
Level 2

How do I only show customer newsletter option to customers in email subscription center?

Hi Marketo Community,

I'm building out a form for an email subscription center on a Marketo landing page and have a customer newsletter field that I planned to show (through the visibility rules section) only if the person was a customer. To do this, I tried to include the field "SFDC Type" = Customer which would be hidden but still allow the visibility rules to work with the customer newsletter field. However, it turns out the field "SFDC Type" is the only one that cannot be used in the form builder.

Believing that this functionality was a reasonably basic necessity for most subscription centers, I moved on to my next workaround by creating a segmentation group that would dynamically display two forms (one with and one without the customer newsletter field) depending on who visits the subscription center landing page. To my dismay, "SFDC Type" is again the only field that cannot be used for segmentation.

I submitted a case to Marketo and after some back and form communication was told that this was basically impossible. I brought up that Marketo's very own subscription center has this exact functionality that I want, figuring that there was no way they weren't using their own product, but was told that it was custom coded and to talk to our CSM about hiring them to custom code a subscription center for us. That's not going to happen.

Call me stubborn or just naive, but I can't accept that this is impossible. It seems like a very basic feature that's a near necessity for most subscription centers. Has anyone else had this problem, figured out a workaround, or used a completely different method?

Any and all opinions are welcome!

-Cheers

1 ACCEPTED SOLUTION

Accepted Solutions
SanfordWhiteman
Level 10 - Community Moderator

Re: How do I only show customer newsletter option to customers in email subscription center?

Very simple.

{{lead.SFDC Type}} is still an embeddable token.

Embed that token in the LP to govern visibility. (An easy way to do this is to create another dummy field and set that field's value, using the Forms 2.0 JS API, to the value of {{lead.SFDC Type}}).

MktoForms2.whenReady(function(form){

  form.setValues({ SFDCTypeProxy: "{{lead.SFDC Type}}" });

});

View solution in original post

12 REPLIES 12
SanfordWhiteman
Level 10 - Community Moderator

Re: How do I only show customer newsletter option to customers in email subscription center?

Very simple.

{{lead.SFDC Type}} is still an embeddable token.

Embed that token in the LP to govern visibility. (An easy way to do this is to create another dummy field and set that field's value, using the Forms 2.0 JS API, to the value of {{lead.SFDC Type}}).

MktoForms2.whenReady(function(form){

  form.setValues({ SFDCTypeProxy: "{{lead.SFDC Type}}" });

});

View solution in original post

Tim_Marcacci
Level 2

Re: How do I only show customer newsletter option to customers in email subscription center?

Thanks for the advice, Sanford!

Sorry to be a bit dense, but could you please provide a bit more detail on how to implement this? Where exactly do I put that code?

Thanks!

SanfordWhiteman
Level 10 - Community Moderator

Re: How do I only show customer newsletter option to customers in email subscription center?

Put it in a <script> on the template (before the closing </body> tag).

Tim_Marcacci
Level 2

Re: How do I only show customer newsletter option to customers in email subscription center?

Thanks! If I understand correctly, you have the dummy field titled "SFDCTypeProxy" in the JS, correct?

SanfordWhiteman
Level 10 - Community Moderator

Re: How do I only show customer newsletter option to customers in email subscription center?

That's right. Fill in whatever name you choose for the field in your instance.

Tim_Marcacci
Level 2

Re: How do I only show customer newsletter option to customers in email subscription center?

Sanford, you're the man! It worked perfectly. You need a "Buy Me a Coffee" button on your blog   I'd owe you like 12 at this point for your answers on other threads that I've implemented as well.

Cheers!

SanfordWhiteman
Level 10 - Community Moderator

Re: How do I only show customer newsletter option to customers in email subscription center?

Great!

(I'm a bit of a coffee snob, so maybe "Single-originate me some beans." )

Tim_Marcacci
Level 2

Re: How do I only show customer newsletter option to customers in email subscription center?

Hey Sanford, It seems I'm actually having some issues with this. I created a new field "subscriptionCenterSFDCType", added it to my form as "hidden", and used the visibility settings for the customer newsletter field to show only if the "subscriptionCenterSFDCType" field is "Customer."

When testing this (making sure i'm cookied as a test customer user) the customer newsletter field is still not showing up even though the script seems to have loaded properly.

This is a screenshot of the run script in the loaded landing page.

Screen Capture.PNG

Am I doing something wrong in how I've set it up?

SanfordWhiteman
Level 10 - Community Moderator

Re: How do I only show customer newsletter option to customers in email subscription center?

That does look right so far, token's being interpolated correctly. What's the URL? Also, if you add me (sandy@teknkl.com) to your instance as a Contact and send the link to me in a Marketo email, I can test directly.