Multiple choice value with comma - Salesforce multi-select picklist integration | XM Community
Skip to main content

We have a request to add a multiple answer multiple choice question to a survey such as:
Screenshot - 2021-12-01T083459.553.pngAnd using a workflow update a field in our Salesforce org that is defined as a multi-select picklist. The commas are giving us trouble, though. When a user selects the first choice the result in the Salesforce field is "A;B;or C", that is, three values. There does not seem to be an automatic method by which choices with commas are wrapped in quotes or some other technique of managing the existence of commas.
I am exploring javascript options at this time to run onPageSubmit and build an embedded field that is corrected for the existence of choices with commas but that seems like a bit overkill. Am I on the wrong track? Is there a better way to handle this situation?

Chet An easier workaround I can think of is to have quotes in html of label and hide these quotes by styling. This way label would appear without  quotes in survey but in data we will have additional quotes.
This way it would look like:
"A, B,or C "

There is an option in data export using which we can split response of such question in different columns. I am not sure if this is available in salesforce Task but may be helpful if it is there.
Split multi values.png


Thanks for the suggestion KimothiSaurabh . The styling is certainly helpful for display purposes but it has no effect on the submitted response. The XML payload looks like this
"value": "\\"Hispanic, Latino, or Spanish Origin\\"",
which does not work. That is, the Multi-select picklist is populate but with values determined by splitting the field at comma delimiters. The Qualtrics implementation is simply not very robust when it comes to determining if commas are present and taking action to properly escape or wrap these values in quotes.


Yeah, this is a big problem. I've made a suggestion for simple text manipulation on the ideas page, might considering upvoting that.
If it's just one question, then just create three EDs (org_1, org_2, org_3) and set their values to individual elements of the answers. Then use these in the SF request. Ideally org_1 should always have a value, the others maybe empty based on the answer. Use branches to configure that.


If you post the link to your suggestion, I will upvote!


Hi Chet, might be a silly question, but does the value in your multiple choice - multiple answer question (i.e. A, B, or C) match exactly with the Salesforce multi-select picklist value API name?
For example, the Salesforce multi-select picklist value might be

A, B or C
but the underlying value API name might be
a_b_or_c
.
Cheers,
Cameron


CamM Indeed the picklist values and the API Name are identical in this case.
The problem is on the the Qualtrics side, though, as their "black box" is deciding how to identify, escape and\\or replace delimiters.


Chet Are you in a position to adjust your API name so that id doesn't leverage characters that are commonly used as delimiters? I know it's less than ideal making the change purely to suit Qualtrics, but you may find similar issues with other integrations down the track.


CamM I think you have misunderstood the problem. Qualtrics is creating the bad data. It has nothing to do with my Salesforce field definitions. I use other tools to integrate with Salesforce (e.g., Formstack forms) and map the exact same values to the exact same fields without issue. Qualtrics is parsing a choice that contains commas and replacing the commas with semi-colons.


Chet Sorry, you’re right. Just re-read the thread and realise what you’re getting at now. Thanks for the clarification and sorry for the confusion from my end 🙂


Hi @Chet , I am having a similar issue with multiple choice question in survey that contains 2 values with commas mapped to 2 multi select picklist values in Salesforce. The multi select picklist in Salesforce is not restricted causing the Salesforce values to be split because of the comma in the JSON file that is sent to Salesforce. 

Were you able to resolve this issue and if so, how did you resolve this multiple choice values response with commas issue?

Thank you!

 


@SriniM I worked with Qualtrics support and they refused to accept that their SF integration was broken.  I provided them with detailed examples of the failure with crystal clear examples of what they were doing wrong and their responses bordered on belligerence.  Really disappointed in the team at Qualtrics.  They just could not accept the idea that they had  a fundamental error in the way they implemented this SF integration.  

Once it was clear that they would never, ever try to help us we addressed this problem by

The whole experience left a bad taste in my mouth and tbh I don’t really trust Qualtrics support at all any more.  


Hi @Chet , Thank you for getting back to me. Yes, the creation of the JSON in the workflow for values with comma in the multi choice values should be update in Qualtrics as this is is the source to update SF. This is a valid use case that needs to be fixed in the workflow and in the integration before sending the values to SF. 

I was planning on using a flow trigger on record create after save to update the field, similar to the approach that you took to solve this issue. But before I proceed, I wanted to make sure I was not missing out on a Qualtrics solution. 

Thank you very much for sharing your solution!


Leave a Reply