Section II – Functional Modules > Interaction Interface > Object Model Bottom of Page
| Genesys 8.0 SCXML Technical Reference
< Addressing Resources Functions >

## Object Model

The following are the ECMAScript objects for the common interaction model interface.

Notes:

- The object model is changed only in results of events. Every interaction event can result in a change in content of the "object model".
- After the session is started, it does not have any interactions — the _genesys.ixn.interactions[] array is empty (even if the platform started the session at the request of an interaction).
- Before accessing or manipulating interactions, the application logic must be sure that session has at least one interaction in its data (that is, the _genesys.ixn.interactions[] array is not empty). For example, the session needs to wait for an event like interaction.added before trying to use the interaction array.
- Attempts to access interactions in the object model before they are available will result in a runtime exception in the session, with the corresponding error event.

#### _genesys.FMname Object

Each SCXML session will have an association with the Interaction functional module (if an interaction is involved with the session). This object allows the session to access the set of interaction-related objects and properties that are associated with the given SCXML session.

The name of the object will be "_genesys.FMname". This object is accessible through the _genesys.FMname property.

Name | Access | Type | Default Value | Valid Values | Description
--- | --- | --- | --- | --- | ---
interactions | read only | array of interaction objects | none |  | This is the list of interactions currently associated with the logic. Each interaction will be represented by an ECMAScript object owned by the Interaction functional module. For routing strategy–based logic only the first entry in the list (interactions[0]) will be used. This list is maintained by the orchestration platform based on the interaction between the orchestration logic and the interaction-related functional modules. So when an interaction is associated with the orchestration logic through an event or action, it is added to the list and when the interaction ends it is removed from the list. This property (list only) is read only. See section _genesys.FMname Object for details on the interaction object.

#### interaction Object

Each interaction associated with a given SCXML session will have an object to represent the common properties of an interaction. This object and its properties are maintained by the functional module, but certain properties can be set or updated by the orchestration logic itself.

The name of the object will be "interaction". This object is accessible through the _genesys.FMname.interactions[] property.

This is the set of properties for the object:

Name | Access | Type | Default Value | Valid Values | Description
--- | --- | --- | --- | --- | ---
g_uid | read only | string | none |  | This is the globally unique ID for the interaction that is defined by the underlying media system. T-Server — g_uid Interaction Server — attr_itx_id
category | read only | string | none | voice, msgbased, chat, web | This is the media category associated with the interaction. It defines the type of media extension that is associated with the interaction.
tenantid | read only | string | none |  | This is the ID of the tenant that this interaction was originated from.
parentid | read only | string | none |  | This is the globally unique ID of this interaction's parent interaction.
contactedaddr | read only | string | none | Any valid string that represents the address | This is the address of the resource that was initially contacted and started this interaction. This property will also be represented in a media- or channel-specific property. For example: _genesys.FMname.interactions[x].voice.dnis for voice interactions _genesys.FMname.interactions[x].msgbased.toaddr for msgbased interactions
parties | read only | array of party objects | none |  | This is the list of parties or resources currently associated with the interaction. Each party will be represented by an ECMAScript object owned by the Interaction functional module.
udata | read only | object | none | Any valid ECMAScript object | This is application data that can be associated with and attached to the interaction so that the coordination of processing between resources is seamless. An application will manage this data through this property and the defined set of functions. For example, Get udata kvpair value — xvalue = _genesys.FMname.interactions[x].udata.x Set or add udata kvpair — _genesys.FMname.adduData(a); Remove udata kvpair — _genesys.FMname.deleteuData("y"); As a result of these actions, the appropriate action will be taken on the underlying Interaction functional module system (for example, T-Server and user data). The udata property does not support ECMAScript arrays either as a value of the udata property or as a property of any object in the tree. This will be used not only for user data, but also for URS-based business data and interaction data.
categories | read only | array of category objects | none | none | These are the current set of classification category objects assigned to this interaction.
voice | read only | voice object |  |  | This is the object that contains the voice extensions to the interaction.
msgbased | read only | msgbased object |  |  | This is the object that contains the msgbased extensions to the interaction.
chat | read only | chat object |  |  | This is the object that contains the chat extensions to the interaction.

#### party Object

Each party or business resource involved in the associated interaction will be represented by an object and a common set of properties. These objects and their properties are maintained by the functional module, but certain properties can be set or updated by the orchestration logic itself.

The name of the object will be "party". This object is accessible through the interaction object.

This is the set of properties for the object:

Name | Access | Type | Default Value | Valid Values | Description
--- | --- | --- | --- | --- | ---
g_uid | read only | string | none |  | This is the globally unique ID for the party that is defined by the underlying media system.
interactionid | read only | string | none |  | This is the globally unique ID of the interaction this party belongs to.
resourcetype | read only | _genesys.FMname.resourceType | _genesys.FMname.resourceType.CFGNoDN |  | This is the type of resource associated with this interaction.
resource | read only | string | null |  | This is the resource associated with this interaction.
voicep | read only | voicep object |  |  | This is the object that contains the voice extensions to the party.
msgbasedp | read only | msgbasedp object |  |  | This is the object that contains the msgbased extensions to the party.
chatp | read only | chatp object |  |  | This is the object that contains the chat extensions to the party.

#### _genesys.ixn.mediaType ENUM Object

This represents the media type enumeration. This enumeration is maintained by the orchestration platform.

This is the set of properties for the object:

Name | Access | Type | Default Value | Valid Values | Description
--- | --- | --- | --- | --- | ---
TMediaVoice | read only | integer | none | 0 | The media for the interaction is voice.
TMediaVoIP | read only | integer | none | 1 | The media for the interaction is VoIP.
TMediaEMail | read only | integer | none | 2 | The media for the interaction is e-mail.
TMediaVMail | read only | integer | none | 3 | The media for the interaction is voice mail.
TMediaSMail | read only | integer | none | 4 | The media for the interaction is snail mail.
TMediaChat | read only | integer | none | 5 | The media for the interaction is chat.
TMediaVideo | read only | integer | none | 6 | The media for the interaction is video.
TMediaCobrowsing | read only | integer | none | 7 | The media for the interaction is co -browse.
TMediaWhiteboard | read only | integer | none | 8 | The media for the interaction is whiteboard.
TMediaAppSharing | read only | integer | none | 9 | The media for the interaction is application sharing.
TMediaWebform | read only | integer | none | 10 | The media for the interaction is web form.
TMediaWorkItem | read only | integer | none | 11 | The media for the interaction is work item.
TMediaCallback | read only | integer | none | 12 | The media for the interaction is callback.
TMediaFax | read only | integer | none | 13 | The media for the interaction is fax.
TMediaIMChat | read only | integer | none | 14 | The media for the interaction is IM.
TMediaBusinessEvent | read only | integer | none | 15 | The media for the interaction is business event.
TMediaAlert | read only | integer | none | 16 | The media for the interaction is alert.
TMediaSMS | read only | integer | none | 17 | The media for the interaction is SMS.
TMediaOutboundPreview | read only | integer | none | 18 | The media for the interaction is outbound preview.
TMediaOpenMedia | read only | integer | none | 19 | The media for the interaction is open media item.
TMediaNativeSMS | read only | integer | none | 20 | The media for the interaction is native SMS.

#### Variables

There are none at this time.

#### Object Ownership

The object management and ownership policies for this functional module interface are:

- It has a scope of global and is accessible from all elements in the SCXML session.
- This object and its associated properties will not be implicitly shared with other sessions or external applications, but there will be methods to explicitly share these objects and properties with other sessions and applications. A session can only share snapshots of the current properties and objects, but they will not be updated dynamically when the owning session changes them. The following are the methods of how content can be shared:
- The first method is for when the current session is starting another session. In that case, the current session can send these properties and objects to the new session via the `<invoke>` or `<session:start>` actions with the `<param>` elements.
- The second method will be through the `<send>` action element or the Web 2.0 API equivalent of the `<send>` element. This will allow any session or external application to get any property or object on any session.

Section II – Functional Modules > Interaction Interface > Object Model Top of Page
| Genesys 8.0 SCXML Technical Reference
< Addressing Resources Functions >