Virtual Agent Bot Response Text Display Issue with Line Breaks showing as /n

Ned Sanderson
Giga Contributor

Hi All

I'm building a new topic today and when I enter a list of steps in a bot response text component, it runs the text together and shows the line breaks as /n.  This is consistently happening within the topic.  Wondering if you know of a solution.  Thanks!

find_real_file.png

9 REPLIES 9

when you enter a list of steps in a bot response text component, you can use <br/> to display the text in new line. So that you will avoid seeing '\n' when there is a line break. This improves the user experience.  

just for info in Quebec, this <br/> is not required as the text component is editor enabled like below. So until you upgrade to Quebec, you have to accommodate new line using <br/> 

find_real_file.png

 

Thanks

Chris D
Kilo Sage
Kilo Sage

I wonder if this is a Paris issue...?

We're on Orlando and I use "\n" line breaks no problem in Text Responses. My main example I can think of is scripted though, so something like:

message = '**FYI**\nThere is one active service disruption:\n'...;
return message;
 
 
Maybe it's different if you put it directly in the Response Message box (as opposed to the code editor).
Fwiw, I have noticed that MS Teams does not respect these \n linebreaks, though it is at least nice enough to hide the "\n"...

Seems it is because I didn't have this issue pre-Paris.  I could just type into the text box with line returns (via Enter key).  Sometimes it wouldn't work and I would have to fix it afterwards.  

nilimadesai
ServiceNow Employee
ServiceNow Employee

I added below code with \n and had no issues with new line in Paris Patch 5 instance in VA. 

return'I can help with Cisco Webex or Microsoft Teams. ' + '\n \n' + 'Which do you need support with?';
 
find_real_file.png
 

I'm working in Paris Patch 2 - Hotfix 1.