We are automatically creating a task and assigning it to a person in SF based on certain criteria. We would like to created a nice looking text with paragraphs in the SF Task Description field. However, it seems like the Qualtrics Workflow only allows text as a line without breaks etc. Anyone knows how to get around it?
Best answer by chackbusch
Hi @MsIreen. We used a code task for that in the past and defined the text as HTML. This only works if the target field in Salesforce is some HTML compatible field.
The code task is placed before the Salesforce action and should output the HTML formatted string.
Setup like this (ignore the condition):
Code task e.g.,:
functioncodeTask() {var q1 = '<h4><strong>What did you like the most about working with XYZ?</strong></h4>';
var a1 = '${q://QID105/ChoiceTextEntryValue}<br /><br />';
var q2 = '<h4><strong>What is the single essential topic that XYZ should improve in?</strong></h4>';
var a2 = '${q://QID56/ChoiceTextEntryValue}';
return {
"feedbackHtml": q1.concat(a1,q2,a2)
}
}
This embedded data can then be piped in the Salesforce action.
Hi @MsIreen. We used a code task for that in the past and defined the text as HTML. This only works if the target field in Salesforce is some HTML compatible field.
The code task is placed before the Salesforce action and should output the HTML formatted string.
Setup like this (ignore the condition):
Code task e.g.,:
functioncodeTask() {var q1 = '<h4><strong>What did you like the most about working with XYZ?</strong></h4>';
var a1 = '${q://QID105/ChoiceTextEntryValue}<br /><br />';
var q2 = '<h4><strong>What is the single essential topic that XYZ should improve in?</strong></h4>';
var a2 = '${q://QID56/ChoiceTextEntryValue}';
return {
"feedbackHtml": q1.concat(a1,q2,a2)
}
}
This embedded data can then be piped in the Salesforce action.
@MsIreen You might discuss with your technical SF responsible then on which options exist to set a formatted text for the task description field… Unfortunatelly, I do not see any other option.
@chackbusch yep, checked with the admin, and this field doesn’t support HTML formatting. So while the breaks can be added manually, the </br> is not gonna work.
thanks anyways, great solution. I will try it out on some other fields in the future 😀