Section I – SCXML > SCXML Extensions > Functions Bottom of Page
| Genesys 8.0 SCXML Technical Reference
< Object Model Parameter Elements >

## Functions

#### _genesys.session.dateInZone

This function returns the current date in the specified time zone. The results will be in the xml date datatype format (that is, yyyy-mm-dd). This can be compared with other variables that use the same time format.

date _genesys.session.dateInZone(tzone)

Parameters:

- tzone: `STRING which can be a variable or a constant` — This parameter is the name of a time zone configured in the configuration layer.

Returns: date: xml date datatype — This value represents the current date, based on the time zone specified. For example, "if (_genesys.dateInZone("EST") == "2009-01-08")".

#### _genesys.session.getConfigOption

This function allows the use of customized configuration options from the configuration layer — the user can configure any option name that is different from the standard options and then use its value in the session. In particular, you can specify any options you like in addition to the required ones and then give them meaning in the logic. This function retrieves the current value of any platform configuration option for use in the session. The search for the option starts with the object properties given by lookup sequence (the DN or resource that triggered the start of the session, the media server controlling this DN, the tenant to which they belong, or the orchestration platform). If the option is not found there, the search continues in the object properties corresponding to greater values of lookup sequence, in increasing order, until the option is found.

value _genesys.session.getConfigOption(ixnid, key, lookupseq)

Parameters:

- ixnid: STRING which can be a variable or a constant — This parameter is mandatory. It defines the ID of the interaction which should have this action applied. If this parameter has a value of "0", then this function will be applied to the main interaction (_genesys.ixn.interactions[0].g_uid).
- key: STRING which can be a variable or a constant — This parameter is the key name of the configuration option in the configuration layer.
- lookupseq: _genesys.session.lookupseq OBJECT which can be a variable or a constant — This parameter defines the lookup sequence to use while searching the configuration layer..

Returns: value: STRING — This is the value of the configuration option key. The empty string is returned if the option is not found.

#### _genesys.session.isSpecialDay

This function checks to see if the current day and time is defined in the configuration layer as a special day.

value _genesys.session.isSpecialDay(stat_table, stat_day, zone, useTime)

Parameters:

- stat_table: STRING which can be a variable or a constant — This parameter is the stat table in the configuration layer which this function will check.
- stat_day: STRING which can be a variable or a constant — This parameter is optional. If it is specified, the platform inquires from the configuration layer whether the specified statistical day is configured for the specified statistical table and whether the current date meets the definition of the statistical day. If this parameter is not specified, the platform inquires from configuration layer whether the current date meets the definition of any of the statistical days configured for the specified statistical table.
- zone: STRING which can be a variable or a constant — This parameter is optional. It defines the timezone to be used to determine if the given day is a special one. If this parameter is not specified, then the current date and time are used in the current TimeZone. If this parameter is specified, then the specified time zone will be used to calculate the adjusted date and time.
- useTime: BOOLEAN which can be a variable or a constant — This parameter is optional. It specifies whether or not to use the time limits specified within the stat day definition in the configuration layer.

Returns: value: BOOLEAN — This indicates if the current day and time is special, based on configuration information.

#### _genesys.session.getListItemValue

A developer can create string-related lists in the configuration layer. For example, these lists can be used to create lists of toll-free numbers instead of references for each individual 800 number in the logic. You can logically

group numbers together and name the group. Then, when you need to add or edit numbers, the logic does not need changing; you just add to or edit the list. This function looks for an element item in the configured list and returns the value of its property key.

value _genesys.session.getListItemValue(list, item, key)

Parameters:

- list: STRING which can be a variable or a constant — This parameter is the name of the list in the configuration layer which this function will try and get the appropriate value for.
- item: STRING which can be a variable or a constant — This parameter is the name of the item in the list which this function will try and get the appropriate value for.
- key: STRING which can be a variable or a constant — This parameter is optional. It is the name of the key in the list which this function will try and get the appropriate value for. If this parameter is not specified, all properties of the found list element are returned in as a list of strings: Key1:value1|Key2:Value2 and so on.

Returns: value: STRING — This is the value of the key in the list that was found. If the list, item, or key is not found, this function returns an empty string.

#### _genesys.session.listLookupValue

This function checks whether a List object in the configuration layer contains a particular element item.

result _genesys.session.getListItemValue(list, item)

Parameters:

- list: STRING which can be a variable or a constant — This parameter is the name of the list in the configuration layer which will be searched to determine whether it contains the item.
- value: STRING which can be a variable or a constant — This parameter is the name of the item that will be searched for in the list.

Returns: value: BOOLEAN — This return value indicates whether the the item is part of the list.

#### _genesys.session.setOptions

This function is an override for platform-level configuration options. It enables the session to take control of certain options, instead of leaving them under the control of the platform or of functional modules. These changes only affect the current session and are not applied to the entire platform.

Note: Using this function may negatively impact URS performance.

void _genesys.session.setOptions(option, value)

Parameters:

- option: STRING which can be a variable or a constant — This parameter is the configuration layer option that is to be overridden. The options that can be overridden are:

- request_timeout (all functional module requests)
- null_value (not valid any more, because DB access will be through the `<fetch>` element)
- default_object (Queue functional module)
- use_ivr_info (Queue functional module)
- default_destination (Queue functional module)
- use_agentid (Queue functional module)
- use_extrouter (Queue functional module)
- use_extrouting_type (Queue functional module)

- value: STRING which can be a variable or a constant — This parameter is the value that is to be used as the override for the option.

Returns: VOID

#### _genesys.session.setTenant

This function overrides the tenant for this session.

void _genesys.session.setTenant(name)

Parameters:

- name: STRING which can be a variable or a constant — This parameter is the configuration layer name of the tenant to be set.

Returns: VOID

#### _genesys.session.timeInZone

This function returns the current time in the specified time zone; that is, the number of minutes elapsed since the last midnight (00:00 AM) in the specified time zone. The results will be in the xml time datatype format (that is, hh:mm:ss or hh:mm). This can be compared with other variables that use the same time format.

time _genesys.session.timeInZone(tzone)

Parameters:

- tzone: STRING which can be a variable or a constant — This parameter is the name of a time zone configured in the configuration layer.

Returns: time: xml time datatype — This value represents the current time, based on the time zone specified. For example, "if (_genesys.timeInZone("EST") == "17:00:00")".

#### _genesys.session.dayInZone

This function returns the current day of the week in the specified time zone. The results will be a value from the _genesys.session.day enumeration. This can be compared with other objects that use the same enumeration object.

day _genesys.session.dayInZone(tzone)

Parameters:

- tzone: STRING which can be a variable or a constant — This parameter is the name of a time zone configured in the configuration layer.

Returns: day: _genesys.session.day OBJECT which can be a variable or a constant — This value represents the current day of the week, based on the time zone specified. For example, "if (_genesys.session.dayInZone("PST") == _genesys.session.day.Sunday)".

#### __Log

This function is the ECMAScript equivalent to the `<log>` element. It allows an application to generate a logging or debug message which a developer can use to help in application development or post-execution analysis of application performance.

__Log (expr) or __Log(expr, label, level)

Parameters:

- expr: STRING which can be a variable or a constant — This parameter returns the value to be logged.
- label: STRING which can be a variable or a constant — This parameter may be used to indicate the purpose of the log.
- level: STRING which can be a variable or a constant — This parameter specifies the log level.

Returns: None

Section I – SCXML > SCXML Extensions > Functions Top of Page
| Genesys 8.0 SCXML Technical Reference
< Object Model Parameter Elements >