ICM custom functions

Unanswered Question

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.


  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Loading.
david.macias Mon, 01/26/2009 - 08:33
User Badges:
  • Blue, 1500 points or more

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

david.macias Mon, 01/26/2009 - 08:57
User Badges:
  • Blue, 1500 points or more

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

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


david.macias Mon, 01/26/2009 - 11:27
User Badges:
  • Blue, 1500 points or more

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


david

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

david.macias Mon, 01/26/2009 - 11:57
User Badges:
  • Blue, 1500 points or more

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

Edward Umansky Tue, 01/27/2009 - 09:53
User Badges:
  • Silver, 250 points or more

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


SkillGroup.%1%.LoggedOn


Edward Umansky Tue, 01/27/2009 - 11:07
User Badges:
  • Silver, 250 points or more

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.

david.macias Tue, 01/27/2009 - 11:20
User Badges:
  • Blue, 1500 points or more

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

Actions

This Discussion