cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
8192
Views
10
Helpful
29
Replies

ICM Scripting Basics

hari chandran
Level 1
Level 1

Hi All,

 

I have little experience in Cisco ICM, this is the first time am working on ICM scripting. Is their any documents to learn about formulae which we use in nodes in the script? any documentation would be appreciated.

 

Note : I have already have

Scripting and Media Routing Guide Cisco Unified ICM/Contact

Center Enterprise & Hosted Release 9.0(1)

Please let me know any other documents which says clearly about the formula usages..

 

 

regards,

Hariharasudan.R

29 Replies 29

Hi, 

Can you please let me know the result of below formula: before("|",Call.user.microapp.FromExtVXML[2])

CVP log:FROM_EXTVXML2=OneMoney|NA|NA|TT_SALES_SG|SID01|NA|N|NA

I want to know wht | says also how to take a single data specifically from above VXML[2]. 

 

Hari,

The "before(x,y)" function returns everything in y that is before x. So with the data and parameters you give, it would evaluate to "OneMoney", as "OneMoney" is before the first "|". "|" (called "vertical bar", or "pipe") is often used as a convenient way to pack multiple pieces of data into the same string variable. In your case, it has been used to put 8 data items into the FromExtVXML[2] variable.

The before()  function is just one way to get data out of the "packed" string. You can potentially combine it with uses of "after()" to get to different data items in your FromExtVXML[2] example above. If I wanted to retrieve the "TT_SALES_SG" value, I might use this formula:
     before("|",after("|",after("|",after("|",Call.user.microapp.FromExtVXML[2]))))
The formulas are evaluated inside-out... so the solving order as the router processes would look like this:

  1. before("|",after("|",after("|",after("|",Call.user.microapp.FromExtVXML[2]))))
  2. before("|",after("|",after("|",after("|","OneMoney|NA|NA|TT_SALES_SG|SID01|NA|N|NA"))))
  3. before("|",after("|",after("|","NA|NA|TT_SALES_SG|SID01|NA|N|NA")))
  4. before("|",after("|","NA|TT_SALES_SG|SID01|NA|N|NA"))
  5. before("|","TT_SALES_SG|SID01|NA|N|NA")
  6. "TT_SALES_SG"

As a reminder, please remember that the "Built-In Functions" tab of the Formula Editor has definitions for all of the functions provided by ICM. Here's the definition that's provided for before():

before(s1, s2)

That portion of s2 that precedes the first occurrence of s1. If s1 does not occur in s2, s2 is returned. If s1 is the null string, the null string is returned.

-Jameson

-Jameson

Hi James, 

Thanks for your explanation, if i would understand well from your points. The below formula should be correct. Please check and let me know below:

VXML[3]=OneMoney|NA|NA|TT_SALES_SG|SID01|NA|0123

am going to retrieve the last position ie 0123 from the above VXML[3], below is the formula written from above understanding:

after("|",after("|",after("|",after("|",after("|",after("|",Call.user.microapp.ToExtVXML[3]))))))

 

please check and provide me the right one if my logic is wrong.

 

Also please note i have mentioned Call.user.microapp.ToExtVXML[3]) in the formula because we are sending this 7th position(Callid)data  to CVP, as  this call is going to CVP second time for some IVR treatment. So with the help of this formula CVP will come to know that this Callid is already there and will treat this call as existing call not a new call.... This is our requirement, please reply your ideas for both the clarification(formula is good/bad? do we achieve our req from above formula?) 

 

 

 

Hari,

You're close. However, I think you will want to run the functions on FromExtVXML[3], as that would be where data from the original CVP call would be stored, not ToExtVXML[3].

You should store the result into one of the ToExtVXML array variables. I would suggest using the concatenate() function to add a CVP session variable name to the front of the string result in the format we previously discussed, otherwise the application will not know what to do with the value.

-Jameson

-Jameson

Hi James,

I have created a script in way that the call is sending back to back to CVP 4 times. All the four time its taking only one(same),callid. But my doubt is the callid is stored in VXML[3] in CVP propective. Please let me know which formula can we using to send the call to CVP:

Current one which gives same callid: concatenate("application=CELL_123=",Call.CallerEnteredDigits,";callid=",Call.RouterCallDay,".",Call.RouterCallKey)

 

Below is the one which we got from our above discussion: concatenate("application=CELL_123;CED=",Call.CallerEnteredDigits,";callid=",after("|",after("|",after("|",after("|",after("|",after("|",Call.user.microapp.ToExtVXML[3])))))))

Please let me know which can be used in a good way...

Hari,

The formula:
concatenate("application=CELL_123;CED=",Call.CallerEnteredDigits,";callid=",Call.RouterCallDay,".",Call.RouterCallKey)

Is simpler, I would use that if you can. Another option would be to use the "user.media.id" for your callid, this is typically what is taught in CVP courses. The resulting formula would be like this:

concatenate("application=CELL_123;CED=",Call.CallerEnteredDigits,";callid=",Call.user.media.id)

Be careful with that one, though... the media.id is 32 digits long, you would need to make sure your ToExtVXML variable is long enough to handle everything.

 

You don't have to store everything in ToExtVXML[3]... you can spread things out between ToExtVXML[0], ToExtVXML[1], ToExtVXML[2], and ToExtVXML[3]. CVP doesn't care which variable in that array that you put the data in. Your CVP app will never see ToExtVXML, it only receives the variable=value pairs. So on the above example, the CVP app would start with a CED variable with value of 12345 (assuming caller entered those digits), and a "callid" variable like 151234.182 .

-Jameson

-Jameson

hi James,

We are sending the call 2nd time to CVP for IVR treatment, now additional point got added that we need to send the call back again to queuing (ICM) if the caller wishes to go back to queue but his queue position will  get started from initial stage. Please let me know what all we need to change on both CVP and ICM script.

 

Hari,

That is a very broad question. What specifically are you having trouble with?

-Jameson
 

-Jameson

Hi, 

We are giving the caller an option to go back to the queue if he want to spk to an agent. So tht is the reason i hav asked. Now i think they figured out that. we are doing tht with the help for Skill group ID. and giving them in Call studio so tht the caller press tht option, he will be able to go the the queue(ICM).

 

 

Hari,

It sounds like the script is just running a different CVP application depending on which Dialed Number the call came in on. In this case the Set Variable nodes are used to select the application (either "AppABC" or "AppXYZ"), while the Run Ext Script node actually runs the selected application. I'm not seeing any configuration issue or duplication in what you described.

All CVP Studio applications are run with a (GS,server,v) Run Ext Script node. It is the contents of the ToExtVXML variable array that determines which application CVP runs, and which variables are passed to that application.

-Jameson

-Jameson

Gergely Szabo
VIP Alumni
VIP Alumni

Hi, do you have any particular issue with scripting? We can help you with that if you can explain what you don't understand or what you need help with.

G.

Chris Deren
Hall of Fame
Hall of Fame

There is a UCCE book out there you may check out (I have not read it):

 

http://www.ciscopress.com/store/cisco-unified-contact-center-enterprise-ucce-9781587141171

 

Chris

Hi,

I bought that book while it was on sale. Honestly, did not meet my expectations at all. It's kind of a basic overview of how UCCE works but that's it.

G.

That book has pretty bad reviews on Amazon, so I never bothered getting it.

http://www.amazon.com/Unified-Contact-Enterprise-Networking-Technology/dp/1587141175/ref=sr_1_1?ie=UTF8&qid=1404237217&sr=8-1&keywords=cisco+unified+contact+center+enterprise+UCCE

I definitely agree with everyone else here... If you have a specific issue we'd be glad to help you with it. In the meantime I would say to explore the system, and read as many of the Cisco-provided guides as you can. You should definitely read the Reporting Guide - good scripting and good reporting go hand-in-hand. If you have questions about what specific object variables mean in the Formula Editor, the Database Schema is a great reference for that. The Configuration Guide will give you a better foundation on the nodes and configurations that you use in scripting.

-Jameson

-Jameson

I'm reading the book Chris mentioned, it will not really help you with scripting, but it does provide a good foundation. Your best bet is just to start playing with it and come here when you have questions.

 

david