Section II – Functional Modules > Functional Modules > Object Model Bottom of Page
| Genesys 8.0 SCXML Technical Reference
Functions >

## Object Model

This defines the specific objects and their properties for the given interface that are created at runtime by the functional module or platform as ECMAScript objects. These objects can be used from ECMAScript expressions and within the `<script>` element or any other SCXML executable content section. These objects must be read-only. The goal is to have changes to these objects as a result of the processing associated with functions or action elements. The ownership policies associated with these objects depend on the functionality of the functional module. A recommended default for ownership is that no objects are shared with other sessions except for copies of objects that are passed as a result of an `<invoke>` or `<session:start>` action and the appropriate `<param>` definition. A functional module and its interface could have a model and mechanism which a session could take ownership of entity from another session (for example, for interactions, it is the `<ixn:associate>` element). For functional module interfaces that do not have strict ownership policies (for example, Customer View), any session can set up access or subscription to the relevant object using a functional module interface–specific function or action element.

#### Restrictions

The following is a list of restrictions with respect to functional module objects:

- Object names should be unique across all the functional module interfaces or else a functional module must own and process multiple functional module root object names and associate the same name objects to the different functional module root objects. For example, if the Interaction interface has object "Oa" and the Queue interface also has function "Oa", then the functional module must have two functional module root object names (_genesys.fmx1.Oa and _genesys.fmx2.Oa).
- Objects are read-only. They can only be updated via functions and action elements and their resulting events.

#### Naming Conventions

The following are the naming conventions that we will use for all functional modules for accessing global objects associated with a given session (for example, the interaction that started this session, the customer view which represents the customer involved in the session, and so on)

- _genesys.FMname.FMinterfaceobject — This global root object will allow the session to access any functional module ECMAScript objects, properties or functions that are associated with the session. The set of objects, properties, or functions associated with a functional module depends on the set of functional module interfaces that are implemented by the functional module.

A functional module may have other global variables to provide easier access to specific objects and properties associated with object model interfaces that it implements. These global variables must be defined as part of the _genesys root object. See the appropriate functional module interface Object Model section for details.

For example, _genesys.ixn.interactions[]

##### Genesys Functional Modules

The following is a summary of all the functional module root objects that will be supported by Genesys functional modules:

Functional module | Root Object | Objects Supported
--- | --- | ---
queue | _genesys.queue | Queue Object Model
interaction | _genesys.ixn | Interaction Object Model, Voice Interaction Object Model, Msgbased Interaction Object Model, Chat Interaction Object Model
dialog | _genesys.dialog | Dialog (Treatment) Object Model
resource | _genesys.resource | Resource Object Model
statistic | _genesys.statistic | Statistic Object Model
classification | _genesys.classification | Classification Object Model
session | _genesys.session | SCXML Extensions Object Model
webapi | _genesys.ws | Web API Object Model

#### Persistence

If a functional module object wants to control persistance behavior by the orchestration platform, it needs to contain the _persist property. If this property is not present on the object, then the object will be automatically persisted by default.

#### Object Lifecycle

The following are the lifecycle behaviors for different types of objects:

- Logic-defined objects — Objects created by the orchestration logic will follow the lifecycle rules for ECMAScript (scoping rules, object referencing rules, etc).
- Event-related objects — These objects only valid when the associated event is delivered and being processed (valid using the `<transition>` processing for that event).
- Functional Module–defined objects — Objects created by the orchestration logic will follow the lifecycle rules for ECMAScript (scoping rules, object referencing rules, and so on), but also the particular Functional Module behavior for the objects. Events will be generated to indicate the changes in the lifecycle of a Functional Module object. These events should be used to manage the logic's use of those objects in the future.

Section II – Functional Modules > Functional Modules > Object Model Top of Page
| Genesys 8.0 SCXML Technical Reference
Functions >