How do I only show customer newsletter option to customers in email subscription center? | Community
Skip to main content
Tim_Marcacci
New Participant
October 23, 2017
Solved

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

  • October 23, 2017
  • 2 replies
  • 5662 views

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

Best answer by SanfordWhiteman

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}}" });

});

2 replies

Trevor_Parsell
New Participant
October 23, 2017

Hey Tim,

I'm thinking a workaround would be to create a new field in Salesforce that will sync to Marketo and mirror the functionality of the "SFDC Type" but will be available in segmentation smart lists.

You could have a "Newsletter Eligible" field that gets marked as true when SFDC type changes to "Customer". You would then just need to back-fill this new field using SFDC type for current customers. Once in place, you could create the segmentation you mentioned above for people with a "Newsletter Eligible" value of "true".

Thanks!

SanfordWhiteman
New Participant
October 23, 2017

You don't need to segment or backfill, though. Using the JS above, the form will display correctly (and the field will conveniently be backfilled when the form is posted, though that isn't necessary).

SanfordWhiteman
SanfordWhitemanAccepted solution
New Participant
October 23, 2017

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}}" });

});

Tim_Marcacci
New Participant
October 25, 2017

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
New Participant
October 25, 2017

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