I want to create a complex custom function in ICM script editor to parse a string with token and set an ECC variable with a value (only if the value/parameter is not equal to a specifi value). I use many times function after, before, if, ... When I try to validate my function, I have the following message "Too many formulas used". What is the maximum number of function I can use ? I didn' find an answer in Cisco documentation.
Thanks in advance,
I don't know the answer to the maximum allowed number of formulas, but can you please tell us what you are trying to achieve? There might be a different way of doing that. Thanks.
So , I'm working on the migration of IVR script from CCX to CVP. In CCX, it was possible to get/send data from/to ICM (peripheral variables and ECC variables). This functionnality is missing in Call Studio so I need to update variable at the end of the script (by using value from the array variable FromExtVXML). My ECC variable contains many variables separated by a token (number of variables is 11 in one ECC variable). My objective is :
1) to parse a string returned by FromExtVXML
2) to check if the variable should be updated
3) to replace the old value by the new at the right place in the ECC variable
1) to parse a string returned by FromExtVXML : %1% is a name of the parameter
code -> before("|",after(concatenate(%1%,"="),concatenate(Call.user.microapp.FromExtVXML,"|",Call.user.microapp.FromExtVXML,"|",Call.user.microapp.FromExtVXML,"|",Call.user.microapp.FromExtVXML,"|")))
The FromExtVXML is a concatenation of string like parameter1=value1|parameter2=value2|...|parameterN=valueN
2) to check if the variable should be updated : My ECC could be split in 11 tokens so I have 11 functions (to update the 11 token)
code to update the 8th token -> if(%1%="[NA]",%2%,userSetParam8(%2%,%1%))
the code of userSetParam8 is : concatenate(concatenate(userGetParam1(%1%),"|",userGetParam2(%1%),"|",userGetParam3(%1%),"|",userGetParam4(%1%),"|"),concatenate(userGetParam5(%1%),"|",userGetParam6(%1%),"|",userGetParam7(%1%),"|"),%2%,"|",userAfter8(%1%))
the code of userGetParam is based on built-in functions After and Before. For example, usergetParam8 : before("|",after("|",after("|",after("|",after("|",after("|",after("|",after("|",after("|",%1%)))))))))
this might sound as an overly complicated solution, but what about implementing an Application Gateway in your script, sending this whole string you got from the CVP and let the Application Gateway application handle all the parsing, sending back the CallVariables/ECC Variables you need?
If this sounds like a solution to you, let me know, I can give you the details.
I'm not sure but I think I can't implement your solution because it implies first to send variables to CVP by using ToExtVXML ... and the length of variables are superior to the length of ToExtVXML.
Or can I send only the token to update and the entire value of my ECC to the Application Gateway Server and let it do the job ?
Hi, yes, that's the point. You send the whole string you get back from CVP (in regular CallVariable/ECC Variable) to the Application Gateway and let it do whatever you want to do with it. With a Groovy or a Python script, you can dissect it or do any modifications and send back the result in the same or in a different set of CallVariables/ECC variables.
Yes, I admit there's an overhead (as this is happening over the network, using a TCP connection).
One thing I could say is that you use the find() function in your custom formulas, it's going to simplify them a lot. I think I understand what you're trying to do with the update piece and I think using the find() will clean it up a lot, specially if your value pairs have distinct names.
I use value pairs in CVP so I can use find() function.
But the structure of ECC is on ly base on a list of value separated by the pipe caracter, that's why I use lot of after() and before() function ...
Ah, yes. Didn't notice that the last ECC wasn't value paired. Ok, how about this? If you need to update the ECC, you go back to the original FromExtVXML, make the update there and then parse it out again?