Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. If you'd prefer to explore, try our test area to get started. And see here for current known issues.

New Member

ICM custom functions

Hi,

Is anybody using any custom functions in ICM?

I want to build a function that outputs a particular skillgroup's LoggedOn value but I want to be able to pass the name of the SkillGroup via a variable.

i.e.:

Set Call.PeripheralVariable2="SomeSkillGroup"

Set Call.PeripheralVariable6="SkillGroup."&Call.PeripheralVariable2&".LoggedOn"

If Call.PeripheralVariable6<1 then

some action.

12 REPLIES

Re: ICM custom functions

I love custom functions and use them all the time. You shouldn't have any problem doing what you're trying to do.

In the set variable node do the following:

customfunction(skillgroup), then do the comparisons you wish to do.

david

New Member

Re: ICM custom functions

David,

Can you explain further please?

When you say "customfunction(skillgroup)" is that something I would create or is that built in.

I'm a little confused on how the custom functions work/interact...

thanks

Re: ICM custom functions

Create a new function userTest with 1 Parameter. Then in the Definition:

concatenate("SkillGroup.",%1%,".LoggedOn")

Now in a Set Variable node put PV2 = userTest(MySkillGroup) and upon execution PV2 = SkillGroup.MySkillGroup.LoggedOn

Now, I've not tested this, so let me know if it works.

david

New Member

Re: ICM custom functions

This is what I'm doing but I don't know if is right.

Custom Function:

Name: userTest1

Parameters: 1

Defenition:

concatenate("SkillGroup.",%1%,".LoggedOn")

On Script:

Node1: Set Variable

Call.PeripheralVariable2 = "VoiceOps"

Node2: Set Variable

Call.PeripheralVariable6 = userTest1(Call.PeripheralVariable2)

Node3: If

Call.PeripheralVariable6<1

True --> Translation Route

False --> Label

thanks for your help

Re: ICM custom functions

Yeah, that looks right. You're using too many PVs, but shouldn't matter for what you're trying to do.

david

New Member

Re: ICM custom functions

Yeah, I got rid of PV6 but I guess still doesn't work.

Custom Function:

Name: userTest1

Parameters: 1

Defenition:

concatenate("SkillGroup.",%1%,".LoggedOn")

On Script:

Node1: Set Variable

Call.PeripheralVariable2 = "VoiceOps"

Node2: If

userTest1(Call.PeripheralVariable2)<1

True --> Translation Route

False --> Label

Re: ICM custom functions

Try value() around the concatenate() function. What does the real time data tell you? You're sure that the name of your skill group is SkillGroup.VoiceOps.LoggedOn?

david

New Member

Re: ICM custom functions

no, no luck.

thanks

Re: ICM custom functions

Don't concatenate it's not a string. Type it directly like this with no quotes:

SkillGroup.%1%.LoggedOn

New Member

Re: ICM custom functions

No, that doesn't work. I've tried it before and I get a couple of errors.

One error is "Undefined symbol: SkillGroup.."

thanks

Re: ICM custom functions

You're right, this won't work the way you are attempting. That function would expect a symbol as a parameter and call variables are passed as strings. What you are attempting to do is convert a string object into a symbol. As far as I know there is no way to do this in ICM. You will need to use some IF nodes (or the if function) or a route select to test your call variable setting and branch to the appropriate skill group variable.

Re: ICM custom functions

This might do what you want:

Function:

userFunction Parameters: 1

%1%>0

In the script have an if node that has userFunction(SkillGroup.VoiceOps.LoggedOn).

david

2080
Views
0
Helpful
12
Replies