##### File

# User Defined Functions

You can add custom functions to a new file WWGUDFunctions.xxx (where xxx specifies the target language). Then you must add the function to Genesys Agent Scripting.

Select File > User Defined Functions to open the User Defined Function List dialog box.

## Add

Clicking Add opens the User Defined Function Properties dialog box.

### Name

Enter the name of the User Defined Function here.

### Description

This field contains a description of the function.

### Return Type

This field describes the format of the data returned by the function. The user may select String, Number, Boolean, or DateTime.

### Template

The template is generated based on the name and parameters assigned to the function.

### Parameters

Parameters refer to the information passed into the function. In order to create the parameters, you must click the parameters button. This opens the User Defined Function Parameter List dialog box.

#### Add

Clicking Add opens the Parameter dialog box.

##### Parameter Order

This number indicates the order in which the parameters will be passed to the function.

##### Parameter Name

This is the name of the parameter being passed to the function.

##### Description

This field contains a description of the parameter.

##### Type

This field describes the format of the data passed to the function. You may select String, Number, Boolean, or DateTime.

#### Edit

In order to edit existing parameters, you should select the parameter to be edited from the list and click Edit. This will open the Parameter Properties dialog box.

#### Delete

This option allows you to delete existing parameters.

#### Delete All

Clicking Delete All will delete all of the parameters that have been defined for the specified User Defined Function.

## Edit

In order to edit existing user defined functions, you should select the function to be edited from the list and click Edit. This opens the User Defined Function Properties dialog box.

## Copy

This option allows you to make a copy of a parameter. Click Copy and the following dialog box opens.

## Delete

This option allows you to delete a user defined function.