Custom Field formatting

Okay I managed to introduce three custom fields, in the third I am processing some data as a string. But i cannot format it correctly.
What type of formatting and data is alowed to be passed to the custom fields?

For example I tried to add line breaks to some text instead of dots, by using javascript regular expressions, but with no success.
I even tried to replace dots in the text with the "bi-ar" tags, but without sucess also.

How do i format text to display correctly not inline in the custom fields?

Those three custom fields are displayed to the agent by default. It sounds like you may be better off passing your data as any other key-value pair and either just using those values in the background, or display them via chat scripts.

I was hoping that you will say "chat-scripts", becaue I am clueless in the scripts tab. As a "coding" person i would prefer a plain editor, but didn't managed to find a way to pass the data in the "predefined field" is there something I can use to learn better to use "scripts" tab.
Anyway, i collect array form the page, which has the data, slice and map it. after that Im using toString to convert them to strings because that's only way I can get them displayed in the field.
I presume that there are much more options in the scripts tab but I'm just not that comfortable in using the scripts tab, maybe there is somewhere, comprehensive manual about how to use the scripts tab?
Or you got better Idea how can I pass, conversation data, into the field to be readable.

Anyway thank you for your quick reply, i forgot to mention that.

If it's strings from a form you are displaying, you should be able to just pass each value in a separate key from a website, and then you don't need to do any additional logic like that in PureCloud.

As far as scripts, I'd start out with an Inbound script and modify it as needed. The inbound script offers a base form that should work for your purposes based on what you've described so far.

Okay I tried everything in the scripts tab, and I cannot found a way to display the following code in the scripts tab when the agent is engaged in chat. The code is:

var chat = nanorep.floatingWidget.$refs.core.conversationSession.entries
var chatHistory = function() {
	for (var i=2; i<chat.length; i++){
		console.log(chat[i].text + ' ');
	}
}
chatHistory();

The closest solution I found is to create a variable with the name and the description, and under "insert variable" there is a field where would I copy the code.

Than I would connect the Submit button, on click action with the variable, and hopefully, result would appear in the container?

Is this correct way or you have something else to suggest.

My biggest problem is the scripting section, I cannot find a way to use it properly.

We won't execute javascript within PureCloud. What are you ultimately after? It previously sounded to me like you were trying to send more than 3 key-value pairs to be displayed to the agent. Is this your goal or is it something else?

I am after these information to be displayed within purecloud.

Når stenger chatten deres? 
VM313:4 Kundeservice sin chat er åpen på hverdager fra 08:00 til 20:00, og telefon fra 09:00 til 15:00. 
VM313:4 hvordan betaler jeg fra utenlandsk konto 
VM313:4 Hvis du betaler fra en utenlandsk konto, må du bruke Iban og Swift. For å sikre at betalingen din blir registrert riktig er det viktig at du spesifiserer hvilke fakturanummer betalingen gjelder. 
VM313:4 er det gratis med elbil 
VM313:4 El-biler passerer foreløpig gratis i de fleste bomanlegg i Norge, hvis man har AUTOPASS-avtale.

these are the information from third party chat solution, which are collected from array with multiple objects, in that way I am targeting to parse that variable created in the back end of the website on which the Purecloud Chat is executed, to display information for the customer agents, so they can pick up the conversation over the chat or by phone, knowing how the previous chat went. My idea was to do that by javascript, because I presumed that's why scripting tab is there in the first place. But by the looks of your answer it seems to me that I'm mistaken.

Would you be kind then to give me information about what type of information, technologies or coding languages can be passed thru scripting tab for the live agents ?

In the end it is more than three key-value pairs, but I just look at the options how can i pass them to be formatted in new lines, not as a one lined text.

My idea was to do that by javascript, because I presumed that's why scripting tab is there in the first place. But by the looks of your answer it seems to me that I'm mistaken.

If you need to use javascript, you'll need to write your own custom web page and embed it using the web control in the script.

Would you be kind then to give me information about what type of information, technologies or coding languages can be passed thru scripting tab for the live agents ?

You can learn more About Scripting on the resource center.

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.