Cisco Cisco Unified Contact Center Enterprise 9.0(1) Guia Do Utilizador

Página de 268
Add Custom Functions
Procedure
Step 1
In Script Editor, from the Script menu, choose Custom Functions. The Custom Functions dialog box opens,
listing all the custom functions currently defined.
Step 2
Click Add to open the Add Custom Function dialog box.
Step 3
Specify the following:
a) Function name. All custom function names must begin with user.
b) Number of Parameters. The number of parameters to be passed to the function. A function may take 0, 1,
or more parameters.
c) Function definition. The expression to be evaluated when the function is called. When entering the function
definition, keep the following in mind:
The parameters to a function are numbered beginning with 1. To reference a parameter within the expression,
surround it with percent signs (%). For example, %3% is a reference to the third parameter.
The lower portion of the dialog box is just like the Formula Editor. You can use it to help build the
expression.
Step 4
When finished, click Test. The Test Function dialog box opens.
Step 5
Test the function by entering an example of how you might reference the function. Include a specific value
for each parameter.
Step 6
Click Evaluate to see how the Script Editor interprets the function call and click Close to return to the Add
Custom Function dialog box.
Step 7
Use one of the Validate buttons to validate the scripts that reference a selection function. (The Validate All
button lets you validate all the scripts that reference any custom function.)
Step 8
When finished, click OK to apply changes and to close the dialog box.
Import Custom Functions
Procedure
Step 1
In Script Editor, from the Script menu, choose Custom Functions. The Custom Functions dialog box opens,
listing all the custom functions currently defined.
Step 2
Click Import. The Import Custom Function dialog box opens.
Step 3
Choose a file name with an ICMF extension (.ICMF) and click Open. The Script Editor examines the file for
naming conflicts. If a conflict is found, a dialog box appears listing options for resolving the conflict.
Step 4
Choose one of the options and click OK.
If you choose to rename the function, the new name must begin with
user.
Note
Scripting and Media Routing Guide Cisco Unified ICM/Contact Center Enterprise & Hosted Release 9.0(1)    
151
Use of Formulas
Add Custom Functions