cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
403
Views
2
Helpful
2
Replies

Formatting Call Variable Data with Line Breaks

Michael Miu
Level 1
Level 1

Hello!

We have Finesse integrated with UCCE.  We are passing IVR data to the agent desktop through ECC variables (call variables layout).  The string in the ECC is very long and we'd like to format it with line breaks to make it more visually appealing for agents.  Is this possible?

ex current:

Call Details: aaaaaaaaaaaaaaaabbbbbbbbbbbbbbbccccccccccccc

ddddddddddddeeeeeeeeeeeefffffffffffffffffffffgggggggggggggg

desired:

Call Details: aaaaaaaaaaaaaaaa

bbbbbbbbbbbbbbb

ccccccccccccc

dddddddddddd

eeeeeeeeeeee

fffffffffffffffffffff

gggggggggggggg

Thanks!

1 Accepted Solution

Accepted Solutions

ewindgat
Level 5
Level 5

I don't think there is any build in way to do what you are asking.

You could get the call variable, then in JavaScript split it.

Here's an example using RegEx.,,,

.match(/(.)\1*/g)

var a = "aaabbbbccc".match(/(.)\1*/g)
// a would be an array of... ["aaa", "bbbb", "ccc"]

View solution in original post

2 Replies 2

ewindgat
Level 5
Level 5

I don't think there is any build in way to do what you are asking.

You could get the call variable, then in JavaScript split it.

Here's an example using RegEx.,,,

.match(/(.)\1*/g)

var a = "aaabbbbccc".match(/(.)\1*/g)
// a would be an array of... ["aaa", "bbbb", "ccc"]

Ron Nelson
Level 5
Level 5

Is it fair to say that you know the length of each part of the ecc variable?

If you did, it would be easy to use a series of substring or splice javascript statements to split apart the item into different variables. To me this sounds like a more realistic example than what you have above.