Handling Multi-Select Fields in Salesforce

Anonymous
Not applicable

If you create a multi-select field in Salesforce, it will come over as a String field in Marketo. If multiple values have been selected in Salesforce, they will be separated by a semicolon, e.g. Water;Fire;Wind. Let’s say I then put this String field on a form, and change the Field Type to Select, and allow for multiple selections. If that lead subsequently fills out the form and chooses Earth and Wind, this will overwrite the existing values in the field and the field will now say Earth; Wind. These will resolve correctly in the Salesforce multi-select field.

pastedImage_0.png

Now, usually we don’t want to overwrite existing data. So for this reason, we create a separate field in Marketo that we can use on forms. Let’s say I call this “Product for Web Forms” and I use this on the form instead of the original multi-select field from CRM.

 

Then I create a campaign in Marketo along the lines of this:

pastedImage_2.png

pastedImage_3.png

Now, if I fill out the form and choose Earth and Wind on the form, the Product for Web Forms field will say Earth; Wind and the Product field will say Water;Fire;Wind;Earth;Wind. Even though it has the same value twice in the Marketo list, this will resolve to the correct four values in the multi-select list in Salesforce.


Is this article helpful ?

YesNo


5441
6
6 Comments
Anonymous
Not applicable

Kristen,

In reviewing the Form functionality for Multi-Selection Selects, it appears as though the Forms currently recognize the previous submission data with Form Pre-fill "Enabled". Changing any existing value, then seems to perform a clean data update.

Is this a specific corner case which requires an Operational Campaign to maintain clean data values?

I'm currently preparing a standardized Marketo Form functionality related to multi-selects and their integration with Salesforce. As this Support Blog is relatively recent, I would appreciate any additional insight you might be able to provide at this time.

Make it a great day!

Lynn_Ray_Pardo
Level 5

Hurray! Boy did this come in handy when I had to write SC flows to update a string field/multi-picklist field based off of boolean fields that only exist in MKTO.

It took me a minute to see and understand that all I had to do was insert semi-colons between the values I wanted to use for updating a MKTO/Salesforce string/multi-picklist field using the Change Data Value flow.

Aimee_LaBree_H1
Level 2

Hi Lynn!

I'm wondering if you might be able to explain a bit more about how you did this with boolean Marketo fields? I can't quite figure out how to update Boolean True/False fields in Marketo to custom picklist field options in a custom Salesforce field ...

Any help appreciated.

SanfordWhiteman
Level 10 - Community Moderator

You're quite right to wonder, Aimee LaBree Hohn, because it doesn't quite make sense as written.

If you try to Change Data Value a Text field to

  {{Lead.Some Other Boolean Field}}

let alone trying to change it to

  {{lead.Some Boolean Field}}; {{Lead.Some Other Boolean Field}}

you'll get a red squiggly indicating the data types mismatch.

I assume what Lynn is getting at is having choices in a flow that write the actual field name out based on the boolean value. That's the only way the final result makes sense, eh?

Aimee_LaBree_H1
Level 2

Hi Sanford- thank's for replying!

I am still getting some strange behavior and I have some complex logic - hoping you can help pick through this with me!

If I run cascading Smart campaigns (00 calls 02, 02 calls 03, etc.) I run into picklist values getting put into the string field multiple times.

I think I solved partly by NULL-ing the value of the String picklist field first (in 00 campaign) before concatenating, but it's still giving me some flack and I think it's because I'm attempting to update a 2:1 value for the the picklist field using choice steps.

pastedImage_23.png

I'm working with:

--7 Boolean fields : "Opt-in A Boolean field", "Opt-in B Boolean field", etc., etc.

--1 String picklist field : "Opt-in Picklist field" with optional values A,X,Y,Z

A boolean true= A on picklist

B and/or C boolean true = X on picklist

D and/or E boolean true = Y on picklist

F and/or G boolean true = Z on picklist.

-so-

Campaign 00)

Smart List: a Trigger that looks for all "Opt-in Boolean field" data changes.

Flow:

--NULL the "Opt-in Picklist field"

--Use choice steps:

if "Opt-in A Boolean field" = TRUE, change "Opt-in PIcklist field" to A

Default - nothing

--Request Campaign 2

Campaign 02)

Smart List: requested

Flow:

--Use choice steps:

Choice 1: if "Opt-in B Boolean field"=TRUE, change "Opt-in Picklist field" to {{lead.Opt-in Picklist Field}}; X

Choice 2: if "Opt-in C Boolean field"=TRUE, change "Opt-in Picklist field" to {{lead.Opt-in Picklist Field}}; X

Default - nothing

-Request Campaign 3

Campaign 03)

Smart List: requested

Flow

--Use choice steps:

Choice 1: if "Opt-in D Boolean field"=TRUE, change "Opt-in Picklist field" to {{lead.Opt-in Picklist Field}}; Y

Choice 2: if "Opt-in E Boolean field"=TRUE, change "Opt-in Picklist field" to {{lead.Opt-in Picklist Field}}; Y

Default - nothing

Campaign 04)

Smart List: requested

Flow

--Use choice steps:

Choice 1: if "Opt-in F Boolean field"=TRUE, change "Opt-in Picklist field" to {{lead.Opt-in Picklist Field}}; Z

Choice 2: if "Opt-in G Boolean field"=TRUE, change "Opt-in Picklist field" to {{lead.Opt-in Picklist Field}}; Z

Default - nothing

It holds all previous values in the picklist, but is doubling values even if the person doesn't qualify...

Does this flow look correct? I can't see what I might be missing

Any help appreciated!

s_skala
Level 2

@Anonymous wrote:

Now, if I fill out the form and choose Earth and Wind on the form, the Product for Web Forms field will say Earth; Wind and the Product field will say Water;Fire;Wind;Earth;Wind. Even though it has the same value twice in the Marketo list, this will resolve to the correct four values in the multi-select list in Salesforce.



It seems like the deduplication that is supposed to occur in Salesforce is not happening (at least for me) as I have fields that have duplicates of the same value. I reached out to SFDC and was told: 

 

"As per our internal team, we don't see any indication in our documentation that we will "dedupe" multi-select picklist values when those values are inserted by API. They do some troubleshooting and based on their testing they see the same behavior, if we insert Value1; Value1 into a multi-select picklist field, then the result is that Value1; Value1 is saved. Based on the behavior this is the working behavior for this scenario."