Clicking the Code button on the Action Properties window opens the Code for Action <action> dialog box, where <action> represents the Action Name previously selected. The following options allow you to create additional code statements for a specified Action.
Insert a new code line after the currently selected line.
Insert a new code line before the currently selected line.
This command clears the current line.
The Command window contains a tree structure of the various commands the user can select. Below is a brief description of each command.
Display a message to the user in an alert box.
You can cause an alert box to display a Genesys Agent Scripting field or free form text.
Capture the content of a page.
You
Execute static text, such as a
This field allows you to insert additional code in the target language.
This command allows the user to insert comments into the code.
This allows you to manually declare a variable. Variables do not normally need to be declared explicitly. However, declaring a variable manually can specify its type when it is ambiguous.
You can define a variable as a String, Boolean, DateTime, or Number.
This command allows you to execute any predefined Genesys Agent Scripting functions.
The area to the right of the command list contains a table with the existing Genesys Agent Scripting actions.
Execute the following code if the conditions indicated are true. Conditions can be the comparison of one field, variable, or static value to another field, variable or static value.
In an IF command, you can compare an Genesys Agent Scripting field or free form text to another Genesys Agent Scripting field, free form text, or a list of static values from a drop-down list or radio buttons using the operators listed in the screen above. Based on the results, the code entered in the lines after may or may not be executed.
This command executes the following code if the proceeding IF condition is not true.
This command allows you to have multiple conditional statements. If the preceding IF or ELSEIF statements were not true, then check to see if this condition is true and execute the following code if it is true.
This command is used to terminate an IF condition.
You need to place an ENDIF at the end of the IF statement.
This command will recalculate the value for the specified Genesys Agent Scripting Function Field selected from the drop-down list.
This field allows you to write a field, variable, or static text to the browser window.
The command allows you to set a field or variable equal to a field, variable, or static value.
Selecting set allows you to set an Genesys Agent Scripting field or free form text equal to another Genesys Agent Scripting field, free form text, or static value from a drop-down list or radio buttons.
If you are working within a table, using the FOR EACH ROW command, additional options in the drop-down list are also available. You may also set the value for that row’s column or status equal to a field, variable, column, status, or static value where appropriate.
This command allows you to execute following code while the conditions indicated are true. Conditions can be the comparison of one field or variable to another field, variable, or static value.
This command is used to terminate a WHILE condition.
You need to place an ENDWHILE at the end of the WHILE statement.
The Async Commands are described below.
The async client id tells outside servers how to contact the session. This command allows you capture the async client id and save it to a field.
The async client id can either be saved to a field or as free form text entered when creating the action.
The PULL VALUE command takes the value of the Listener field and puts it in a regular Genesys Agent Scripting field. This is similar to having a field on the right side of the set command.
The value taken from the Listener field can either be saved to a Genesys Agent Scripting field or as free form text entered when creating the action.
The PUSH Value command pushes the data into the Listener field on the server. This is similar to having a field on the left side of the set command.
Asynchronous interfaces allow you
The subject can either be the contents of a particular field or free form text entered when creating the action.
The UNSUBSCRIBE FROM MESSAGE action command unsubscribes the user from the subject specified. Once a user has been unsubscribed from a subject, he won’t receive any messages sent to that subject.
The subject can either be the contents of a particular field or free form text entered when creating the action.
This command allows the user to transfer control to another script page.
Once the BRANCH command has been selected, you can then select the process flow, stream, and page to which to branch.
You can also branch to a field if the field is set to contain a process flow, stream, or page list. The value that the field gets set to will determine the page to which the system is directed.
This command saves the current context to a field.
This command saves the current page value to a field.
This command saves the current process flow value to a field.
This command saves the current stream value to a field.
This command causes Genesys Agent Scripting to branch to the next script page. The next script page will either be the next page in the script, or a page referenced in a branching condition on the current page.
This command causes Genesys Agent Scripting to branch to the previous script page that was displayed.
This command allows you to start a new session from the selected page.
This command is used to execute custom code within Genesys Agent Scripting. When this command is selected the screen will be changed to provide a list of existing API Interfaces.
This command is used to run a database interface script. When this command is selected, the screen will be changed to provide a list of existing Database Interfaces.
This command is used to run an XML Interface script. When this command is selected the screen will be changed to provide a list of existing XML Interfaces.
This command will load a saved session based on the value of the field selected or text entered below.
This command is used in conjunction with the Save command and requires the same field to be selected or text entered in order to load the corresponding session.
This command allows you to save a session. Saving a session will store all information (for example, call history, data entered, script navigation) in a temporary location. The information can be retrieved with the load command.
You should use the field list to associate a field value with the save option. This field value will be used to determine how the information is stored and retrieved with the load function. The value of this field needs to be able to uniquely identify the saved session. You can also use free form text to assign an identifier to uniquely identify the session to be saved.
This command will close the current browser window and remove the session.
This command will cause a new row to be added to the selected table. Values for the new row will come from the current values in the fields associated with the columns in the table.
The Field drop own allows the user to select a table to which to add the row.
This command will cause the currently selected row in a table to be deleted.
This command allows the user to step through each row in a table. FOR EACH ROW can be nested for nested tables.
The user selects the table from a drop down list of Genesys Agent Scripting tables.
If the user iterates through the rows of a Genesys Agent Scripting table within an action, the user can access columns in the table using column or field references.
Field references should be used when iterating through a table and then executing another action from within that action.
Column references should be used if you subsequently have a Database Interface that updates based on the Genesys Agent Scripting table's flags, as the table flags are set based on column references and not field references.
This command allows the user to exit the FOR EACH ROW command before reaching the last row in the table.
This command allows the user to advance to the next row in a table.
The user needs to place a NEXT ROW at the end of the FOR EACH ROW statement.
This command will return the current table row.
This command will return the number of rows in the table.
This command will cause a new row to be added to its table. Values for the row will be set to blanks for string fields and zero for numeric fields. Any values entered in the fields that make up the table but are not yet saved into the table will be cleared.
If the user wishes to insert a row with the current values of fields that are contained in the tables, use Add Row instead.
This command allows the user to remove all rows from the specified table including any rows from child tables.
This command will set the current row in the specified table based on the value of the selected field.
This action will clear all rows from a table. This command will also clear all rows from any table that is contained within the target table.
This command will cause the currently selected row in a table to be updated with the values in the fields associated with the columns in the table.
This button opens up the Previous Action definition for editing, prior to an Edit Action being issued.
This is used when an Execute command has been selected. It opens the definition of the Action for editing, which is the target of the Execute statement.
Whenever the right hand side drop down is set to Free Form, the Function button appears. This allows the user to insert a function into an action.
Clicking the Function button opens the User Defined Function Wizard dialog box.
Select a function from the list. The items in the lists are taken from the functions created in the User Defined Functions option.
This shows the user how the function looks and what information needs to be passed to it.
Clicking Next opens a dialog box requesting a name for the variable.
This button will return the user to the previous dialog box.
This button will insert the function into the action.
Clicking Cancel will close the dialog box without adding the user defined function to the action.
The Cross Reference button allows the user to see where an action is being used.
Clicking the Cross Reference button opens the Object Cross Reference dialog box.