SOLVED

Re: Can you maintain string field data to a series of check boxes using smart campaigns?

Go to solution
Barry_Dupont1
Level 3

Can you maintain string field data to a series of check boxes using smart campaigns?

Hi everyone,

Here's what we are trying to achieve:

We are integrating Marketo with a custom CRM and I'm creating a data dictionary for all the field mappings. In the CRM we have an 'Industry' field. On the UI of the CRM it is a multi-select box (as our customers often operate in multiple industries), in the database it is a string field, which each value separated by a tilde.

Once integrated with Marketo, we want customers to be able to update these values using Marketo forms, as well as the CRM being able to update it with new values set by the salespeople. However, in Marketo forms, I'd rather not present users with a text field and expect them to enter tilde separated industry names..........!

So, is there a way that if I create multiple checkbox fields in Marketo for each industry, that our customers can interact with these on the forms, and then use smart campaigns maintain the string or formula field in Marketo.

Or, is there an even better approach? (like not having to add and maintain multiple industry fields, which seems manual and will need maintenance). I assume it could be done at form level using js, but we don't have the expertise in house to do this yet, so I'm hoping for a solution that we can do using standard functionality.

I'm sure that I've read about this issue in the community before, but after searching for a while couldn't find exactly what I wanted.

Many thanks in advance.

1 ACCEPTED SOLUTION

Accepted Solutions
SanfordWhiteman
Level 10 - Community Moderator

Re: Can you maintain string field data to a series of check boxes using smart campaigns?

in the database it is a string field, which each value separated by a tilde.

Kind of a non-standard delimiter, but OK...

So, is there a way that if I create multiple checkbox fields in Marketo for each industry, that our customers can interact with these on the forms, and then use smart campaigns maintain the string or formula field in Marketo.

"Checkbox" isn't a type of database field in Marketo. It's a form field type that can be used with multiple types of back end database field, though most commonly/obviously it's paired with a Boolean field on the back end.

Boolean fields carry true/false, not including the name of the field itself. Hence you would not be able to concatenate the values of multiple fields into another field using one Change Data Value. You'd have to maintain a bunch of manual choices... it would be nightmarish.

I'd do it with 2 String fields. Let's say one is for show, one is for sync. Map a Checkboxes (not the same as singular Checkbox) form field to the first field. Then using JS, write out the second one to a hidden field before form submit (onSubmit = before sending data) using your custom ~ delimiter. There's no way to avoid using some code somewhere given this non-standard delimiter (if you used a semicolon, support would be built in).

View solution in original post

7 REPLIES 7
Bryan_Epstein
Level 6

Re: Can you maintain string field data to a series of check boxes using smart campaigns?

Do the values need to be separated out using a tilde? If not, by utilizing the Checkboxes form field, you can allow for users to check multiple boxes and submit within one field. In doing that, I do believe each item will get separated by a semi-colon out of the box.

Barry_Dupont1
Level 3

Re: Can you maintain string field data to a series of check boxes using smart campaigns?

Hi Bryan, yes, unfortunately its a tilde. But thanks because your response & Sandford's below has prompted me to investigate the difference between checkbox and checkboxes form fields which I hadn't realised before.

SanfordWhiteman
Level 10 - Community Moderator

Re: Can you maintain string field data to a series of check boxes using smart campaigns?

in the database it is a string field, which each value separated by a tilde.

Kind of a non-standard delimiter, but OK...

So, is there a way that if I create multiple checkbox fields in Marketo for each industry, that our customers can interact with these on the forms, and then use smart campaigns maintain the string or formula field in Marketo.

"Checkbox" isn't a type of database field in Marketo. It's a form field type that can be used with multiple types of back end database field, though most commonly/obviously it's paired with a Boolean field on the back end.

Boolean fields carry true/false, not including the name of the field itself. Hence you would not be able to concatenate the values of multiple fields into another field using one Change Data Value. You'd have to maintain a bunch of manual choices... it would be nightmarish.

I'd do it with 2 String fields. Let's say one is for show, one is for sync. Map a Checkboxes (not the same as singular Checkbox) form field to the first field. Then using JS, write out the second one to a hidden field before form submit (onSubmit = before sending data) using your custom ~ delimiter. There's no way to avoid using some code somewhere given this non-standard delimiter (if you used a semicolon, support would be built in).

SanfordWhiteman
Level 10 - Community Moderator

Re: Can you maintain string field data to a series of check boxes using smart campaigns?

Then using JS, write out the second one to a hidden field before form submit (onSubmit = before sending data) using your custom ~ delimiter.

Specifically, like so:

MktoForms2.whenReady(function(form){

var interestingFields = {

showField : "soapNameOfYourVisibleCheckboxesGroup",

syncField : "soapNameOfYourSyncedStringFieldWithTildes"

};


form.onSubmit(function(form){

var currentValues = form.getValues(),

fieldsObj = {};

fieldsObj[interestingFields.syncField] = [].concat(currentValues[interestingFields.showField]).join("~");

form.setValues(fieldsObj);

});

});

Then just fill in your relevant field names in the interestingFields object.

Barry_Dupont1
Level 3

Re: Can you maintain string field data to a series of check boxes using smart campaigns?

Hi Sanford, thanks I think this looks like the best answer. I have looked a the 'maintaining a bunch of manual choices' and don't want to go there. I was hoping to use standard functionality, but I understand its not always possible so thanks for providing the actual code, that will be extremely useful.

Jay_Jiang
Level 10

Re: Can you maintain string field data to a series of check boxes using smart campaigns?

if you're integrating via middleware, usually middleware platforms can do some data manipulation before inserting into either system, in this case it would be the concatenation using ~

Barry_Dupont1
Level 3

Re: Can you maintain string field data to a series of check boxes using smart campaigns?

Thanks Jay. I had hoped to do it myself in Marketo as I need the experience and it's someone else working on the actual integration (who has even less time than me!). But this is another good option as I'm sure it would be possible to do this, or even get the middleware to convert the ~ to ; so that it works with the checkboxes functionality.