Cisco Cisco IPCC Web Option User Guide

Page of 259
What are Custom Functions?
Custom functions are those functions you create for use within scripts, as opposed to built-in
functions.
How to Add a Custom Function
Adding Custom Functions
Step 1
In Script Editor, from the Script menu, select 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.
Scripting and Media Routing Guide Cisco Unified ICM/Contact Center Enterprise & Hosted Release 7.5(1)
144
Chapter 7: Using Formulas
How to Add a Custom Function