Improved

Updated Element API Documentation (Mar 2026)

🔄 Updated

Element API

The Element API documentation has been updated with corrected code examples to ensure accuracy and consistency with the TypeScript interfaces. In addition, the @avaya/infinity-elements-api npm package has been updated with new APIs, updated method signatures, and improved documentation.

Note: The npm package changes listed below are not yet reflected in the portal documentation. Install the latest package version to access these features. See Resources for the npm package link.

What's New:

  • Fixed getUsers() code examples to use correct property interpolation syntax, replacing malformed placeholder strings with accurate object property references
  • New completeConference() method — merges all parties into a conference call rather than completing a transfer
  • New onCompleteAsConference() event subscription for conference completion
  • New onChangedAgentState() event subscription for agent state changes (Available, Away, Busy)
  • New InteractionContextOptions interface for managing app-level vs. interaction-level widget context
  • New AgentStateChangedCallback and CompleteAsConferenceCallback callback types
  • New COMPLETE_AS_CONFERENCE and AGENT_STATE_CHANGED entries added to CHANNEL_NAMES

Key Improvements:

Corrected getUsers() Examples

The getUsers() examples now use accurate TypeScript property interpolation throughout all five example variants. The previous version contained unfilled placeholder strings (such as $USER.FULLNAME and $USER.PRESENCE) that did not reflect actual object property access syntax.

The corrected examples now consistently reference the correct GetUsersResponse properties:

  • user.fullName — the agent's full name
  • user.presence — the agent's VoIP/presence status
  • user.extension — the agent's extension number
  • user.cxStatus.status — the agent's CX status display name

Conference Call Support (npm package)

A new completeConference() method allows elements to merge all parties into a conference call, providing an alternative to completing an attended transfer. The accompanying onCompleteAsConference() event subscription enables elements to react when a conference is completed.

Agent State Change Events (npm package)

A new onChangedAgentState() event subscription allows elements to listen for agent state transitions between Available, Away, and Busy statuses. The AgentStateChangedCallback type is provided for strongly typed callback implementations.

App-Level Widget Context (npm package)

A new InteractionContextOptions interface has been introduced to support app-level widget scenarios. The following interaction methods now accept an optional parameter:

options?: InteractionContextOptions

Affected methods: getInteraction(), endInteraction(), startVoiceCall(), viewerRemoveInteraction(), acceptInteraction(), completeAttendedTransfer(), attendedTransferWarm(), attendedTransferCancel(), sendDialpadDigit(), and insertTextIntoFeedInput().

An optional property has also been added to ElementAPIOptions to support adaptor and bridge use cases:

requestTarget?: Window

Updated Method Signatures (npm package)

Several interfaces and callbacks have been updated:

  • SingleStepTransferParams — new optional interactionId field
  • SendRichMediaMessageOptions — new optional interactionId field
  • getTransferQueuesInteraction() params — new optional interactionId field
  • FeedMessageCallback — now receives (message, interactionId?) instead of (message) only

Improved JSDoc (npm package)

Package documentation now explicitly describes the sandboxed iframe environment and postMessage-based communication model. Inter-element communication docs have been updated to reflect host-routed messaging, replacing the previous BroadcastChannel description.