Hi all,
I am working on a process automation for our agents that takes a multiline note from the agent and stores it to participant data. My automation triggers off user.end and then uses this data (among other things, including the wrap code).
The automation works great, but I am noticing in my participant data that the line breaks from the multiline are not appearing in my saved participant data.
I am using an escaped DA for this to post to participant data, using the multiline note {{interactionNote}} as the field. I noted that without using $esc.jsonString for this, the write to participant data fails. Now, the note data is present.
However, in the participant data, I do not see anything that appears to be present for a line break, such as \n. I didn't expect a new line to be created, but did expect I would see something indicating an escaped character. This is with using enter in the multiline box, as an agent would for this usage.
Example:
"Testing Notes with escaped line breaks.
Test test test."
Particpant Data: Testing Notes with escaped line breaks. Test test test.
API I'm using: /api/v2/conversations/calls/${input.conversationId}/participants/${input.participantId}/attributes
Body:
{
"attributes": {
"interactionNote": "$esc.jsonString(${input.interactionNote})"
}
}
Based on Convert line break to \n in data action in Script This does work directly to a data action. Our design would not be able to account for that (outside of the participant data action I created) because of another limitation I am running into with wrap codes, which I need for some reporting around this project (posting a wrap code via the API does not allow me to disallow the agent from changing the wrap code, unless I remove provisional, which then cancels their ACW on call completion)
I'm looking to try and figure out one of the following:
- Will an escaped string with line breaks from a multiline input properly introduce those values to participant data?
- If not, is there a way to disable the wrap code selection in after-call work without forcing mandatory, no early exit?