CreateBlogSupport
Log inSign up
Home
Webex Contact Center
  • Overview
  • Guides
  • API REFERENCE
  • AI
  • Configuration
  • Data
  • Desktop
  • Journey
  • Media And Routing
  • Changelog
  • SDK
  • Customer Journey Data Service
  • AI Assistant for Developers
  • Webhooks
  • Contact Center Sandbox
  • Using Webhooks
  • Beta Program
  • Webex Status API
  • XML API Deprecation
  • Contact Center Service Apps

Webex Contact Center

Desktop

The Webex Contact Center Desktop brings your business the innovation, flexibility, and agility of cloud with the security and global scalability you have come to expect from Cisco. Productive agents require efficient processes and intuitive desktop tools. The more you can automate routine tasks, the more successful agents are at serving your customers.

Desktop provides all your customer interactions—voice, chat, email, and social chat including Facebook Messenger and SMS within one unified desktop experience. Application switching can be minimized with integrated CRM and other business applications.

Technical Overview

The following diagram shows the relationships between the various micro front ends and services.

Figure 1. Desktop Architecture

diagram of desktop architecture

anchorWidgets and Activities

anchor
Custom Widgets
Build a Custom Widget

The Webex Contact Center Desktop supports extensions in the form of widgets. Widgets are essential components for desktop customization. A widget is a component with some specific encapsulated functionality, exported as a custom HTML element that is placed within the desktop. We recommend these custom HTML elements to be Web Components also, because any widget ends up being placed inside a nested tree of Shadow Roots, and will require a Shadow Document Object Model (DOM) of its own to be enabled for styling encapsulation.

Learning that any widget for Webex Contact Center Desktop must be a Web Component or an embedded iFrame, a developer might feel forced into a technology. However, the developer can build these components on any compatible framework. The only requirement is that the custom widget must be exported as a Web Component. This is to ensure that any functionality is wrapped into a single custom HTML element that is defined within the JS bundle, with Shadow DOM enabled.

The following are a few examples for custom widgets:

  • If you choose to build your widget in Angular JavaScript, make sure that your Angular version supports Angular Elements (added in version 6), and your application is exported as an Angular Element.
  • If you choose to build your application in React (similar to parts of Desktop), you can wrap your React application into a custom HTML element and enable Shadow DOM manually, or use some of the open-source solutions that automate this process for you. For example, Direflow.
  • There are various other frameworks that are fully prepared to consume Web Components and be exported as Web Components. For reference, you can use https://custom-elements-everywhere.com that regularly runs automated tests against popular frameworks to check their ongoing compatibility.

You do not have to use a framework to build a web application to be exported as a widget. In fact, all examples in this documentation reference vanilla JavaScript.

The following are the different types of custom widgets:

  • Header widgets
  • Navigation (custom page) widgets
  • Persistent widgets
  • Headless widgets

For more information on custom widgets, see the Desktop Layout section in the Provisioning chapter of the Cisco Webex Contact Center Setup and Administration Guide. For more information on sample custom widgets, see https://github.com/CiscoDevNet/webex-contact-center-widget-starter/tree/master/Examples.

iFrame Widgets

The iFrame widget is a special widget that can be used to embed a different application. The iFrame widget creates an HTML iFrame and renders your application. The Content Security Policy (CSP) headers are required in the iFrame widget URL's response headers. To enable CSP headers for your application that you are embedding, see Content Security Policy (CSP) and CSP: frame-ancestors. The application should allow *.cisco.com as a valid frame-ancestor in the CSP header.

Example

Content-Security-Policy: frame-ancestors 'self' https://*.cisco.com;

Note: If the setTimeout and setInterval methods are used in developing a widget, consider the recent Google Chrome throttling impact. For more information, see https://developer.chrome.com/blog/timer-throttling-in-chrome-88/.

The Web Workers API can be used to run timers with a chain count of more than five, and each count is less than a minute. For more information, see https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Using_web_workers.

Get Started

We suggest to have a setup in which you are able to place your widget in a larger Desktop environment. For reference, you can use one of our boilerplate projects available at the Cisco DevNet Git Hub community: https://github.com/CiscoDevNet/webex-contact-center-widget-starter.

Alternatively, we suggest you to have a sandbox environment where you are able to place your widget (Web Component) in a constrained container and have an opportunity to test the following:

  • Responsive behavior for various container sizes (from preferred to full screen).

    Note: Responsive web components make your webpage visually appealing on all devices and are easy to use. You must use responsive iFrame widgets. For more information, see the Desktop Layout section in the Provisioning chapter of the Cisco Webex Contact Center Setup and Administration Guide.

  • Overflow behavior on how your widget appears and behaves when its contents overflow on either X or Y axis (that is, scrollbars).

  • Reacting to data passed into the widget. For more information about reactive component practices, see Reactive Property or Attribute Change.

  • Light or Dark mode support (if you are using our Momentum UI Web Component library).

Define Property or Attribute Interface

Prerequisite: You must have an understanding of working with the Web Components and custom HTML elements. For more information, see MDN documentation.

Your custom element may extend the HTMLElement class or the one that inherits from HTMLElement class.

Example

class MyCustomElement extends HTMLElement {
  constructor() {
    // Always call super first in constructor
    super();
    const shadow = this.attachShadow({
      mode: "open"
    });
    // write element functionality in here
  }
}

To define properties and attributes, assign the default values to them in the constructor.

Note: Any property can be passed as an attribute as long as it accepts data of the String or Boolean data types. For more information, see Javascript.info.

Example

class MyCustomElement extends HTMLElement {
  constructor() {
    // Always call super first in constructor
    super();
    const shadow = this.attachShadow({
      mode: "open"
    });

    this.width = "100px";
    this.height = "100px";
    this.active = true;

    // Data of types Array, Object, Map, Set, etc. cannot be passed as an attribute
    this.options = [];
  }
}
Reactive Property or Attribute Change

To retrieve the latest data through attributes and properties from Desktop (widget connectedCallback()), rely on the HTMLElement lifecycle methods. For more information, see MDN documentation.

Note: If lifecycle methods are not specified, your component will not react to new data that is being passed to it after the initial render.

Example

class MyCustomElement extends HTMLElement {
  constructor() {
    // Always call super first in constructor
    super();
    const shadow = this.attachShadow({
      mode: "open"
    });

    this.width = "100px";
    this.height = "100px";
    this.active = true;

    // Data of types Array, Object, Map, Set, etc. cannot be passed as an attribute
    this.options = [];
  }

  attributeChangedCallback(name, oldValue, newValue) {
    console.log("Custom element attributes changed.", name);
  }
}
Data Provider—Widget Properties and Attributes

Note: To receive real-time data through properties or attributes inside a custom widget, it has to be assigned appropriately in the layout JSON configuration by the administrator. For more information on JSON layout, see the Desktop Layout section in the Provisioning chapter of the Cisco Webex Contact Center Setup and Administration Guide.

In addition to accessing data through JavaScript SDK subscribers, you can request data to be passed also through properties or attributes. If your component is built to react to changes in property or attribute, you will always get updated data this way from the single source of truth, the Desktop. We call it a data provider.

Currently, we have a single data provider under the key STORE. Below, you will find a breakdown of all possible data and type definitions that is available through the STORE key:

  • STORE.agent
  • STORE.agentContact
  • STORE.app
  • STORE.auth
  • STORE.generalNotifications
  • STORE.dynamic
STORE.agent (Agent Profile Attributes)
NameTypeDescription
STORE.agent.agentIdStringUnique identifier of the agent.
STORE.agent.agentNameStringName of the agent.
STORE.agent.agentPhotoStringThe URL of the agent picture in JPG format.
STORE.agent.allowConsultToQueueBooleanDetermines whether to consult an active call to a queue. The default value is false.
- True—Enables the consult call to a queue.
- False—Disables the consult call to a queue.
STORE.agent.dnNumberStringThe dial number to the entry point entered by an agent in the Station Credentials dialog box.
STORE.agent.enterpriseIdStringUnique database identifier of the tenant.
STORE.agent.agentEmailIdStringEmail ID of the agent.
STORE.agent.channelsObjectThe number of contacts that an agent can handle on each media channel at a given time. The media channels include chat, email, voice, and social.
-->voiceCountNumberThe number of voice calls that an agent can handle at a given time. The default value is 0.
-->chatCountNumberThe number of chat requests that an agent can handle at a given time. The default value is 0.
-->emailCountNumberThe number of email requests that an agent can handle at a given time. The default value is 0.
–>socialCountNumberThe number of social channel requests that an agent can handle at a given time. The social channels include Facebook Messenger and SMS. The default value is 0.
STORE.agent.idleCodesArrayThe idle reason codes indicate that the agent is not ready to accept any routed requests. Example: Idle, Coffee break, Meeting, Tea. For more information, see STORE.agent.idleCodes.
STORE.agent.idleStatusTimestampDateThe idle state timestamp which displays the current time and the total time that an agent was in the idle state.
For more information on timer details, see the State and Connected Timers section in the Introduction chapter of the Cisco Webex Contact Center Agent Desktop User Guide.
STORE.agent. isAgentAvailableAfterOutdialBooleanDetermines whether an agent is available or not after the outdial call ends. The default value is false.
- True—The agent is available after the outdial call ends, and the agent state is set as Available.
- False—The agent is not available after the outdial call ends, and the agent state is set as Idle.
STORE.agent.isAdhocDialingEnabledBooleanDetermines whether an agent can use a phone number that is not stated in the enterprise address book to make an outdial call. The default value is false.
- True—An agent is allowed to use phone numbers (using the Dialpad) that are not stated in the enterprise address book to make an outdial call.
- False—An agent is allowed to use only the phone numbers that are stated in the enterprise address book to make an outdial call.
STORE.agent.isCampaignManagementEnabledBooleanDetermines whether the outbound campaign call feature is enabled or not. The default value is false.
- True—Enables the outbound campaign call feature for an agent.
- False—Disables the outbound campaign call feature for an agent.
STORE.agent.isEndCallEnabledBooleanDetermines whether an agent can end a voice call or not. The default value is false.
- True—Enables an agent to end a voice call.
- False—Disables an agent to end a voice call, and the agent must ask the customer to end the voice call.
STORE.agent.isEndConsultEnabledBooleanDetermines whether an agent can end a consult call or not. The default value is true.
- True—Enables an agent to end a consult call.
- False—Disables an agent to end a consult call.
STORE.agent.isOutboundEnabledForAgentBooleanDetermines whether an agent is allowed to make an outdial call or not. The default value is false.
- True—Enables an agent to make an outdial call.
- False—Disables an agent to make an outdial call.
STORE.agent.isOutboundEnabledForTenantBooleanDetermines whether the outdial feature is enabled for a tenant or not. The default value is false.
- True—Enables the outdial feature for a tenant.
- False—Disables the outdial feature for a tenant.
STORE.agent.campaignManagerAdditionalInfoStringAdditional details of the campaign manager.
STORE.agent.siteIdStringUnique identifier of the site.
STORE.agent.usesOtherDNBooleanDetermines whether the Dial Number (DN) of any other format is allowed or not.
- True—Allows any other format.
- False—Allows only the US format.
STORE.agent.outDialEpStringRefers to the outdial entry point.
STORE.agent.outdialAniListObjectOptions of the outdial ANI list.
-->idStringUnique Identifier for the outdial ANI.
-->nameStringName of the outdial ANI.
STORE.agent.profileTypeStringThe routing type associated with an agent's multimedia profile. The routing type allows an agent to handle number of contacts for a media channel at a given time. The routing types include Blended, Blended Real-time, and Exclusive.
STORE.agent.subStatusStringAn agent availability state. The following are the agent availability states:
- Available
- Idle states that are configured by the administrator
- RONA (Redirection on No Answer)
STORE.agent.subStatusChangeTimestampDateAgent availability state timestamp which displays the time that an agent has been in the current state. The state includes Available, Idle, or RONA.
The state timer is updated every second and the format is mm:ss. If you are connected for more than one hour, the format changes to hh:mm:ss (for example, 01:10:25). When you change state (for example, from Available to any Idle), the timer resets to 00:00.
STORE.agent.teamIdStringUnique identifier of the team.
STORE.agent.teamNameStringName of the team.
STORE.agent.wrapUpDataObjectOptions of the wrap up data. For more information, see STORE.agent.wrapUpData.
STORE.agent.isTimeoutDesktopInactivityEnabledStringDetermines whether the Desktop Inactivity Timeout feature is enabled or not. The default value is No.
- Yes—Enables the Desktop Inactivity Timeout feature.
- No—Disables the Desktop Inactivity Timeout feature.
STORE.agent.timeoutDesktopInactivityMinsStringDesktop inactivity timeout value in minutes. The value ranges from 3 to 10000 minutes. The administrator defines the timeout value in the Management Portal. For more information, see Settings in the Cisco Webex Contact Center Setup and Administration Guide.
STORE.agent.idleCodes
NameTypeDescription
isSystemBooleanDetermines whether the entity is generated by the system or configured by the administrator.
- True—Entity is generated by the system.
- False—Entity is configured by the administrator.
nameStringName of the entity.
idStringUnique Identifier for the entity.
isDefaultBooleanDetermines whether the idle code is the default value or not.
- True—Default idle code is displayed when an agent signs in.
- False—Default idle code is not displayed when an agent signs in.
STORE.agent.wrapUpData
NameTypeDescription
wrapUpPropsObjectOptions of the wrap up property.
-->autoWrapupBoolean or UndefinedDetermines whether the auto wrap up is enabled or not.
- True—The auto wrap up is enabled.
- False—The auto wrap up is disabled.
-->autoWrapupIntervalNumber or UndefinedIndicates the count down time that is left before the interaction is auto wrapped up.
-->wrapUpReasonListArrayThe array of objects. For more information, see wrapUpReasonList.
-->interactionIdStringUnique identifier for the user interaction.
-->allowCancelAutoWrapupBoolean or UndefinedDetermines whether an agent can cancel the Desktop from wrapping up automatically.
- True—Enables an agent to cancel the auto wrap up time and extend the wrap up time.
- True—Disables an agent to cancel the auto wrap up time and extend the wrap up time.
STORE.agent.wrapUpData.wrapUpProps.wrapUpReasonList
NameTypeDescription
isSystemBooleanDetermines whether the wrap up reason is generated by the system or configured by the administrator.
- True—Wrap up reason is generated by the system.
- False—Wrap up reason is configured by the administrator.
nameStringName of the wrap up reason.
idStringUnique Identifier for the wrap up reason.
isDefaultBooleanDetermines whether the wrap up reason is the default value or not.
- True—Default wrap up reason is applied during auto wrap up.
- False—Default wrap up reason is not applied.
STORE.agentContact (Tasks/Interactions)
NameTypeDescription
STORE.agentContact.lastCompletedTaskStringUnique Identifier for the last wrapped up task.
STORE.agentContact.selectedTaskIdStringUnique Identifier for the selected task.
STORE.agentContact.interactionIdsArrayList of Unique identifiers of the user interactions.
STORE.agentContact.chatConferenceDataObjectOptions of the chat conference data. For more information, see STORE.agentContact.chatConferenceData.
STORE.agentContact.taskMapMapThe full list of tasks that are assigned to an agent at a given time. For more information, see STORE.agentContact.taskMap.
STORE.agentContact.taskSelectedObjectProvides the user interaction details of the selected task.
STORE.agentContact.chatConferenceData
NameTypeDescription
initiateConferenceChatBooleanDetermines whether an agent can start a chat conference or not.
- True—Enables an agent to start a chat conference.
- False—Disables an agent from starting a chat conference.
interactionIdStringUnique identifier for the user interaction.
destAgentIdStringUnique identifier of the chat conference request destination agent. The destination agent refers to another agent who joined the chat.
agentIdStringUnique identifier of the agent.
STORE.agentContact.taskMap
NameTypeDescription
TaskIdStringUnique identifier for the task.
TaskObjectOptions of an active request or task or interaction.
-->mediaResourceIdString Uniqueidentifier of the digital channel.
-->agentIdStringUnique identifier of the agent.
-->destAgentIdStringUnique identifier of the chat conference request destination agent. The destination agent refers to another agent who joined the chat.
-->trackingIdStringUnique identifier based on the notification error.
-->consultMediaResourceIdStringUnique identifier of the chat conference digital channel.
-->interactionObjectDetails for the user interaction. For more information, see STORE.agentContact.taskMap.Task.interaction.
-->interactionIdStringUnique identifier for the user interaction.
-->orgIdStringUnique identifier of the organization.
-->ownerStringUnique identifier for the agent who owns a task.
-->queueMgrStringUnique identifier for the queue manager.
-->typeStringName of the event that describes the unique notification response. The response is used by an event listener.
-->ronaTimeoutNumberIndicates the configured RONA timeout value.
Note: The maximum available time to accept a voice call request is 18 seconds. The maximum available time to accept a digital channel request is 32 seconds.
-->isConsultedBooleanDetermines whether an agent is consulted by another agent or not.
- True—Allows an agent to be consulted by another agent.
- False—Prevents an agent from being consulted by another agent.
-->isConferencingBooleanDetermines whether an agent can accept a conference request or not.
- True—Allows an agent to accept a conference request.
- False—Prevents an agent from accepting a conference request.
-->updatedByStringUnique identifier of the agent who updates the Call-Associated Data (CAD) variables of a task.
-->destinationTypeStringThe type of request to be placed. The destination type can be Agent, Queue, or DN.
-->autoResumedBooleanDetermines whether the paused call must be resumed manually.
- True—Voice call to be resumed automatically after the specified duration.
- False—User to take action on the paused voice call based on the button defined. For example, Start Recording.
-->reasonCodeStringReason code for an error on the Desktop. For example, ReasonCode 26 (DC_CALLS_LIMIT_EXCEEDED)
-->reasonStringReason for an error on the Desktop. For example, ReasonCode 26 is displayed when the data center has reached the maximum limit for concurrent outdial calls.
STORE.agentContact.taskMap.Task.interaction
NameTypeDescription
mediaTypeStringThe media channel type. The possible values are telephony, social, email, and chat.
stateStringCurrent agent state.
participantsArrayList of participants with details about each participant.
interactionIdStringUnique identifier for the user interaction.
orgIdStringUnique identifier of the organization.
callProcessingDetailsObjectOptions from the acceptance of an incoming call through the final disposition of the call. For more information, see callProcessingDetails.
mediaObjectOptions of the digital media. For more information, see media.
ownerStringUnique identifier for an agent who owns the interaction.
mediaChannelStringThe media channel type. The possible values are telephony, social, email, and chat.
contactDirectionObjectOptions of the call type from a dialer to recipient.
-->typeStringCall type from a dialer to recipient. The possible values are OUTBOUND and INBOUND.
outboundTypeStringType of an outdial call such as OUTDIAL, COURTESY_CALLBACK and CAMPAIGN.
callFlowParamsObjectOptions of the call flow parameters. For more information, see callFlowParams.
callAssociatedDataObjectOptions of the Call-Associated Data (CAD) variables For more information, see callAssociatedData.
STORE.agentContact.taskMap.Task.interaction.callProcessingDetails
NameTypeDescription
aniStringThe phone number (Automatic Number Identification) of the customer in case of an inbound call. In the case of email and chat, the email ID of the customer.
dnisStringThe phone number (Dialed Number Identification) of the customer care in case of an outdial call.
tenantIdStringUnique database identifier of the tenant (organization).
QueueIdStringUnique identifier of the routing queue.
vteamIdStringUnique identifier of the virtual team.
pauseResumeEnabledStringAgent can access the Privacy Shield icon to pause and resume recording a call.
pauseDurationStringSpecifies the time, in seconds, for which the Desktop pauses the call recording. After the time has elapsed, the Desktop automatically starts recording the call.
isPausedStringIndicates whether a call recording is paused or not.
recordInProgressStringIndicates whether a call recording is in progress or not.
ctqInProgressStringIndicates whether a consult call to queue is in progress or not.
outdialTransferToQueueEnabledStringIndicates whether an outdial transfer call to queue is enabled or not.
convIvrTranscriptStringIndicates whether an IVR transcript is available for current user interaction or not.
customerNameStringName of the customer.
virtualTeamNameStringName of the virtual customer.
ronaTimeoutStringIndicates the configured RONA timeout value.
categoryStringThe value selected by a customer while initiating a chat. The administrator defines the values for an organization.
reasonStringReason for a customer to contact the contact center.
sourceNumberStringUnique identifier of a digital channel source. For example, Facebook Messenger source number.
sourcePageStringSource page of a digital channel. For example, Facebook Messenger source page.
appUserStringUnique identifier of a digital channel user. For example, Facebook Messenger user.
customerNumberStringUnique identifier of the customer.
reasonCodeStringReason code associated with a reason for a customer to contact the contact center.
IvrPathStringThe Interactive Voice Response (IVR) call flow allows a customer to be routed to an appropriate queue.
fromAddressStringCustomer email ID for an incoming email.
STORE.agentContact.taskMap.Task.interaction.media
NameTypeDescription
mediaResourceIdStringUnique identifier of the digital channel.
mediaTypeStringThe media channel type. The possible values are telephony, social, email, and chat.
mediaMgrStringRefers to the media manager.
participantsArrayList of participants with details about each participant.
mTypeStringSpecifies whether the digital channel incoming request is from an original call (call between a customer and an agent who accepted a customer call) or consult call.
isHoldBooleanDetermines whether the customer call is put on hold or not.
- True—Customer is put on hold.
- False—Customer call is not put on hold.
holdTimestampNumber or NullThe timestamp displays the time when a call is put on hold.
STORE.agentContact.taskMap.Task.interaction.callFlowParams
NameTypeDescription
nameStringName of the call flow parameter.
descriptionStringDescription of the call flow parameter.
valueDataTypeStringData type of the call flow parameter value. The data types are Boolean, String, Integer, Decimal, or Date Time.
valueStringValue of the call flow parameter.
STORE.agentContact.taskMap.Task.interaction.callAssociatedData
NameTypeDescription
displayNameStringLabel for the Call-Associated Data (CAD) variable. For example, Customer Address.
nameStringKey (unique identifier) for the CAD variable.
agentEditableBooleanDetermines whether an agent can edit a CAD variable during an active call.
- True—Agent can edit a CAD variable during an active call.
- False—Agent cannot edit a CAD variable during an active call.
valueStringValue of the CAD variable.
typeStringData type of the call variable value. The CAD variable types are Boolean, String, Integer, Decimal, or Date Time.
STORE.app (Application Level)
NameTypeDescription
STORE.app.logoStringCompany logo displayed on the Desktop. Specify a URL for the company logo in the JSON layout. If you do not provide a URL, the the Webex Contact Center logo appears by default.
STORE.app.titleStringTitle displayed on the horizontal header of Desktop. The default title is Webex Contact Center.
STORE.app.darkModeBooleanDetermines whether an agent can enable or disable the dark background theme of the Desktop.
- True—Enables the dark background theme of the Desktop.
- False—Disables the dark background theme of the Desktop.

For more information on JSON layout, see the Desktop Layout section in the Provisioning chapter of the Cisco Webex Contact Center Setup and Administration Guide.

STORE.auth (Single Sign-On)
NameTypeDescription
STORE.auth.accessTokenStringAuthentication token used for SSO authentication.
STORE.generalNotifications (Application Notifications)
NameTypeDescription
STORE.generalNotifications.isNotificationsEnabledBooleanDetermines whether the display of notifications is enabled or disabled on the Desktop.
- True—Enables the display of notifications on the Desktop.
- False—Disables the display of notifications on the Desktop.
STORE.generalNotifications.isSilentNotificationsEnabledBooleanDetermines whether the display of visual notifications is enabled or disabled on the Desktop.
- True—Enables the display of visual notifications on the Desktop.
- False—Disables the display of visual notifications on the Desktop.
Note: Silent notifications do not display on the Desktop, but are listed in the Notification Center.
STORE.generalNotifications.countActivatedNumberThe number of active notifications displayed on the Desktop.
STORE.generalNotifications.countDeactivatedNumberThe number of notifications that are not active. The Notification Center icon displays a badge indicating the number of unread notifications displayed on the Desktop.
STORE.generalNotifications.countPendingNumberThe number of active notifications that are displayed on the Desktop before the notification pop-up is closed.
STORE.generalNotifications.countAddedNumberThe total number of all notifications displayed on the Desktop.
STORE.dynamic (Connector View or Desktop View)
NameTypeDescription
STORE.dynamic.isConnectorBooleanDetermines whether the Desktop is loaded in the connector view (smaller viewing area) or desktop view (larger viewing area).
- True—Desktop is loaded in the connector view (smaller viewing area).
- False—Desktop is loaded in the desktop view (larger viewing area).
JSON Layout
"widgets": {
    "my-component": {
        "comp": "my-custom-component",
        "properties": {
            "agentDnNumber": "$STORE.agent.dnNumber",
            "subStatus": "$STORE.agent.subStatus",
            "teamId": "$STORE.agent.teamId",
        }
    }
}
NameTypeDescription
widgetsStringRefers to custom widgets.
my-componentStringRefers to custom components.
compStringRepresents the name of the custom HTML element (known as Web Component or any other element).
propertiesObjectSpecifies the properties that you need to pass for a Web Component.
-->agentDnNumberStringDial Number (DN) used for inbound and outbound calls.
-->subStatusStringAn agent availability state. The following are the agent availability states:
- Available
- Idle states that are configured by the administrator
- RONA (Redirection on No Answer)
-->teamIdStringUnique identifier of the team.

For more information on JSON layout, see the Desktop Layout section in the Provisioning chapter of the Cisco Webex Contact Center Setup and Administration Guide.

Momentum UI Web Component Library

We encourage you to explore our UI component library to enable you to build a custom widget interface faster with the Webex Contact Center Desktop visual language. For more information on the momentum UI Web Component library, see GitHub and MIT license. If you encounter any issues, report them on our GitHub page.

The current collection includes:

  • Activity Button
  • Alert
  • Alert Banner
  • Avatar
  • Badge
  • Breadcrumbs
  • Button
  • Checkbox
  • Editable Field
  • Floating Modal
  • Help Text
  • Icon
  • Input
  • Label
  • Link
  • List
  • List Item
  • Loading indicator
  • Meeting Alert
  • Menu Overlay
  • Modal
  • Phone Number Input
  • Progress Bar
  • Radio
  • Spinner
  • Table
  • Tabs
  • Task Item
  • Theme
  • Toggle Switch
  • Tooltip

Momentum UI Web Component library will continue to grow and improve over time. We welcome any contributions. For more information on the Web Components library, see Components.

Figure 2. Sample Components on Desktop

sample components on agent desktop

Light or Dark Mode Support

In Webex Contact Center Desktop, we support Light and Dark mode by default. This is achieved through Momentum UI Web Component . When wrapped around components, assigns values to a collection of predefined core CSS color variables and custom CSS properties. These properties switch from light to dark on a theme switch. The advantage of relying on CSS custom properties is that they pierce Shadow DOM and can be used inside many nested layers of Shadow DOM.

Note: You can use the core CSS color variables if your widget CSS is in the following format:

container {
  background-color: var(--md-primary-bg-color, #fff);
}

Example: Light Mode

--md-default-focus-outline-color: #{$md-blue-60};

--md-primary-bg-color: #{$md-white};
--md-secondary-bg-color: #{$md-gray-05};
--md-secondary-white-bg-color: #{$md-white};
--md-tertiary-bg-color: #{$md-gray-10};
--md-tertiary-white-bg-color: #{$md-white};
--md-quaternary-bg-color: #{$md-gray-20};

--md-primary-success-bg-color: #{$md-green-10};
--md-primary-success-text-color: #{$md-green-70};

--md-primary-text-color: #{$md-gray-100};
--md-secondary-text-color: #{$md-gray-70};
--md-disabled-text-color: #{$md-gray-40};
--md-highlight-text-color: #{$md-theme-20};
--md-hyperlink-text-color: #{$md-theme-70};
--md-hyperlink-hover-text-color: #{$md-theme-90};
--md-hyperlink-focus-text-color: #{$md-theme-70};

--md-primary-seperator-color: #{$md-gray-30};
--md-secondary-seperator-color: #{$md-gray-40};

--md-presence-active-bg-color: #{$md-green-50};
--md-presence-do-not-disturb-bg-color: #{$md-red-60};
--md-presence-away-bg-color: #{$md-gray-30};
--md-presence-busy-bg-color: #{$md-yellow-40};

Example: Dark Mode

--md-default-focus-outline-color: #{$md-blue-40};

--md-primary-bg-color: #{$md-gray-100};
--md-secondary-bg-color: #{$md-gray-95};
--md-secondary-white-bg-color: #{$md-gray-95};
--md-tertiary-bg-color: #{$md-gray-90};
--md-tertiary-white-bg-color: #{$md-gray-90};
--md-quaternary-bg-color: #{$md-gray-80};

--md-primary-success-bg-color: #{$md-mint-70};
--md-primary-success-text-color: #{$md-mint-20};

--md-primary-text-color: #{$md-gray-05};
--md-secondary-text-color: #{$md-gray-40};
--md-disabled-text-color: #{$md-gray-70};
--md-highlight-text-color: #{$md-theme-80};
--md-hyperlink-text-color: #{$md-theme-40};
--md-hyperlink-hover-text-color: #{$md-theme-20};
--md-hyperlink-focus-text-color: #{$md-theme-40};

--md-primary-seperator-color: #{$md-gray-70};
--md-secondary-seperator-color: #{$md-gray-60};

--md-presence-active-bg-color: #{$md-green-50};
--md-presence-do-not-disturb-bg-color: #{$md-red-60};
--md-presence-away-bg-color: #{$md-gray-30};
--md-presence-busy-bg-color: #{$md-yellow-40};

--md-auto-wrapup-bg-color: #{$md-blue-90};
Activities
IdleInActivityTracker

The idleInActivityTracker method tracks every interaction of a user with the Desktop. The administrator configures the Desktop inactivity timeout value. If the agent is inactive on the Desktop for a specified duration, the agent is notified with the Prolonged Inactivity dialog box. The dialog box is displayed one minute before the configured timeout occurs, and the agent must take action before the timer runs out. The iFrame windows are isolated from the parent window. To track any user events inside a widget that is rendered within an iFrame, use the postMessage() method. To handle inactivity timer inside an iFrame:

  1. Ensure that your widget or application is running inside an iFrame.
  2. Register an event listener for the eventTypes click, wheel, and keydown.
  3. Use the postMessage() method to communicate the eventTypes to the Desktop (parent window) on wxcc-desktop-iframe-widget-event.

The following is the sample code that is added to the main JavaScript file of every widget to track user events:

// List of user events which are getting tracked
var eventTypes = ["click", "wheel", "keydown"];
// For widgets rendered inside Iframe.
// If widget is not enclosed within iframe then all events bubble up and then postMessage
will not be required.
function idleInActivityTracker() {
    if (this.checkIframe()) {
        this.registerEventListener();
    }
}
// Please don't change the value of key within postMessage method.
function postMessage(userEvent) {
    window.parent.postMessage({
        key: "wxcc-desktop-iframe-widget-event",
        type: userEvent.type
    }, "*");
}
// To register event listener
function registerEventListener() {
    for (var i = 0; i < this.eventTypes.length; ++i) {
        window.addEventListener(this.eventTypes[i], function(e) {
            this.postMessage(e);
        });
    }
}
// To check if widget is enclosed within an Iframe.
function checkIframe() {
    return window.location !== window.parent.location;
}

anchorJavaScript SDK and Modules

anchor

Caution: Restrain from using old libraries such as @agentxJsApi, @agentx/agentx, @agentx/agentx-services-types and @agentx/agentx-js-api.

The references for the term agentx have been amended:

  • @agentx/agentx and @agentx/agentx-services-types are exported under a common name @wxcc-desktop/sdk-types
  • @agentx/agentx-js-api is renamed to @wxcc-desktop/sdk
  • agentxJsApi is renamed to Desktop

For more information on using the JavaScript SDK, see Get Started.

Javascript SDK

Caution: The JavaScript SDK library can be used to build widgets that are embedded within the Desktop. You cannot use this library outside of the Desktop or to create a new Desktop.

Note: The @wxcc-desktop/sdk-types library does not support iFrame based widgets.

The Desktop JavaScript SDK is an npm package that allows you to request up-to-date information from the Desktop. Using the SDK, you can request information such as agent details, assigned tasks, details of specific tasks, current browser locale, and the authentication token for Single Sign-On (SSO) integration.

The SDK package allows you to:

  • request data to be passed to your widgets through properties and attributes.
  • perform more complex operations by consuming and manipulating the system data inside your widget.
  • subscribe to data arriving asynchronously.

Some events in the Desktop occur asynchronously. To subscribe to asynchronous events and access data within the payload, you can add a listener. A few examples for asynchronous events are:

  • New task offered
  • New task assigned
  • Consult request created
  • Consult ended
  • Screen pop arrived

For the complete list of asynchronous events, see Asynchronous Events.

Get Started

To start using the JavaScript SDK, you can use any of the following options:

  • Run the following command in your project folder: npm install @wxcc-desktop/sdk --save or yarn add @wxcc-desktop/sdk
  • Run the following command to add a package to your package.json file:
"dependencies": {
    "@wxcc-desktop/sdk": "^1.2.2"
},
  • If you also choose to use our Momentum-ui Web Component library, you must add:
"peerDependencies": {
    "@momentum-ui/core": "19.9.2",
    "@momentum-ui/icons": "7.45.0",
    "@momentum-ui/utils": "6.2.7",
    "@momentum-ui/web-components": "^2.0.13",
    "lit-element": "^2.3.1",
    "lit-html": "^1.2.1"
},

In addition, to access the type definition of return Promise for the JavaScript SDK requests, install the following package:

"devDependencies": {
    "@wxcc-desktop/sdk-types": "^1.0.2",
    ...
},

Note: Momentum and lit-element dependencies are added to peerDependencies. These dependencies are present in Desktop, and should not be imported twice. There is no way to maintain the same versions in your widget and in Desktop.

Once you have installed the package in your project, include it in the appropriate component file following the ES6 import pattern: import {Desktop} from "@wxcc-desktop/sdk";

Root JavaScript SDK Module

Desktop is the root module of the JavaScript SDK. The root module provides a reference to the following sub-modules:

  • Configuration Module
  • Localization Module
  • Actions Module
  • Logger Module
  • Agent State Information Module
  • Agent Contact Module
  • Dialer Module
  • Screen Pop Module
  • Shortcut Key Module
  • Call Monitoring Module
  • Webex Metrics Module

Example

import { Desktop } from "@wxcc-desktop/sdk";

const {
  config,
  i18n,
  actions,
  agentContact,
  agentStateInfo,
  dialer,
  logger,
  screenpop,
  shortcutKey, 
  webexMetricsInternal
} = Desktop;
Configuration Module

The Desktop.config module provides configuration details of Desktop.

Example

import { Desktop } from "@wxcc-desktop/sdk";
import { SERVICE } from "@wxcc-desktop/sdk-types";

await Desktop.config.init();

// After Desktop config initiated, all sub-modules will inject SERVICE instance via their init() methods automatically

// CLEANUP Desktop config is possible to re-use modules with SERVICE configured to another environment
Desktop.config.cleanup();

// After Desktop config cleaned, all sub-modules will cleanup themselves via their cleanup() methods automatically
Methods
init(widgetName, widgetProvider)

Initiates the configuration module to start utilizing any of the Desktop modules.

Example

connectedCallback() {
    super.connectedCallback();
     /**
     Initialize the configuration without any parameters if you using lower then version 2.0. But if you are using version 2.0 or above you have to provide two mandatory parameters
     * 1. widgetName (String): The name of the widget to be initialized.
     * 2. widgetProvider (String): The provider of the widget.
    */
    this.init('my-widget', 'cisco');
}

async init(widgetName, widgetProvider) {
  await Desktop.config.init(widgetName, widgetProvider)
}

For more information on the widget starter example, see Cisco Webex Contact Center Widget Starter.

Parameters

NameTypeDescriptionRequired
widgetNameStringThe name of the widget to be initialized.Yes
widgetProviderStringThe provider of the widget.Yes
registerCrmConnector()

The registerCrmConnector method is introduced as a new function to register a CRM connector. It is recommended for use when developing a connector for CRM purposes. This function allows the SDK to integrate and interact effectively with the specified CRM platform (in this example, "SFDC" with provider "Cisco").

/** 
   crmConnectorProvider (String): The provider of the CRM connector. e.g. Cisco, B&S etc
  crmPlatform (String): The CRM platform for which the connector is registered. e.g. SFDC, ServiceNow, ZenDesk etc. */
Desktop.config.registerCrmConnector({
  crmConnectorProvider: "Cisco",
  crmPlatform: "SFDC"
});

Parameters

NameTypeDescriptionRequired
crmConnectorProviderStringThe CRM platform for which the connector is registered.Yes
crmPlatformStringThe CRM platform for which the connector is registered. e.g. SFDC, ServiceNow, ZenDesk etc.Yes
clientLocale()

Requests system data such as locale of the client.

const locale = Desktop.config.clientLocale;

Returns{String} The locale of the client.

Example Response

const clientLocaleResponse = "en-US";
Localization Module

The Desktop.i18n module creates and maintains the localization bundles for lit-element based widgets (in case you considered Starter Widget as a base).

The localization module is built based on the i18next package and enables the widget developer to utilize the Desktop internationalization mechanism and load additional localization bundles to it. For more information on i18next, refer the following resources:

  • For Desktop.i18n instantiating object, see https://www.i18next.com/overview/api#instance-creation.
  • For i18n instance back-end configuration, see https://github.com/i18next/i18next-http-backend.
  • For i18n instance languageDetector configuration, see https://github.com/i18next/i18next-browser-languageDetector.
  • For i18n instance init options, see https://www.i18next.com/overview/configuration-options.

Using this module implies that your widget has lit-element and lit-html libraries.

import {
    Desktop
} from "@wxcc-desktop/sdk";

...
// All CreateOptions for i18n are optional
type CreateOptions = {
    backend ? : Backend // import Backend from "i18next-http-backend";
    languageDetector ? : LanguageDetector // import LanguageDetector from "i18next-browser-languagedetector";
};

const i18n = Desktop.i18n.createInstance(createOptions ? : CreateOptions) // returns instance described in https://www.i18next.com/overview/api#instance-creation
const i18nMixin = Desktop.i18n.createMixin({
    i18n /*Injecting i18n service instance into lit-element mixin */
})

// FYI you can see default options like so
console.log(Desktop.i18n.DEFAULT_INIT_OPTIONS); // => i18n.init options that are using by Desktop by default

// To get started, Init i18n with options to be able call "t" function translations
if (!i18n.isInitialized) {
    // Here, you are adding (merging) your localization package with the Desktop existing set of packages
    const initOptions = Desktop.i18n.getMergedInitOptions(Desktop.i18n.DEFAULT_INIT_OPTIONS || {}, {
        defaultNS: "my-ns", // "ns" here stands for the default JSON file name containing the localization
        ns: ["my-ns"],
        fallbackLng: "en",
        backend: {
            loadPath: "/.../path-to-locales/.../{{lng}}/{{ns}}.json"
        }
    });

    i18n.init(initOptions).catch(err => console.log(err));
}

When the service is initialized, create components with the mixing you created earlier:

import {
    customElement,
    LitElement
} from "lit-element";
import {
    html
} from "lit-html";

@customElement("my-awesome-component")
export class MyAwesomeComponent extends i18nMixin(LitElement) {
    render() {
        return html `
       <!-- i18nMixin will subscribe component tree updates on languages load & language change -->
       <!-- Component wrapped by i18nMixin can access t funcation via this.t(...) -->
       <p>${this.t("my-ns:key1")}</p>` <
            p > $ {
                this.t("my-ns:key2")
            } < /p>`
    }
}
Methods
init(initOptions)

Initiates the localization module.

Example

i18n.init(initOptions);

Parameters

NameTypeDescriptionRequired
initOptionsStringThe init options that are used by Desktop by default. console.log(Desktop.i18n.DEFAULT_INIT_OPTIONS)Yes
createInstance(createOptions)

Creates the localization bundles for lit-element based widgets.

Example

const i18n = Desktop.i18n.createInstance(createOptions ? : CreateOptions)
// returns instance described in https://www.i18next.com/overview/api#instance-creation

Parameters

NameTypeDescriptionRequired
createOptionsStringCreates options for localization (i18n) module.Yes
createMixin()

Creates the localization (i18n) service instance into lit-element mixing.

Example

const i18nMixin = Desktop.i18n.createMixin({
  i18n /*Injecting i18n service instance into lit-element mixin */
});
getMergedInitOptions()

Adds or merges your localization package with the existing set of packages in Desktop.

Example

const initOptions = Desktop.i18n.getMergedInitOptions(
  Desktop.i18n.DEFAULT_INIT_OPTIONS || {},
  {
    defaultNS: "my-ns", // "ns" here stands for the default JSON file name containing the localization
    ns: ["my-ns"],
    fallbackLng: "en",
    backend: {
      loadPath: "/.../path-to-locales/.../{{lng}}/{{ns}}.json"
    }
  }
);

The following table lists the payload details:

NameTypeDescriptionRequired
DEFAULT_INIT_OPTIONSStringThe init options that are used by Desktop by default.Yes
defaultNSStringDefault localization JSON file name.Yes
nsStringJSON file name of your locale.Yes
fallbackLngStringLanguage to use if the file is not found in the configured path or if you cannot provide the preferred language for a user.Yes
backendStringContains the load path.Yes
-->loadPathStringLocation of the file path.Yes
cleanup()

Triggers the clean up when init service returns an undefined response.

Example

cleanup() {
    this.SERVICE = undefined;

    this.logger.info("Cleaned");
}
Actions Module

The Desktop.actions module retrieves real-time data from the client-side data store on Desktop side.

Note: You can also pass the same information to your widget through properties, using our Data Provider. For more information, see Data Provider—Widget Properties and Attributes.

Methods
getToken()

Retrieves the authentication token used for SSO authentication.

Example

const accessToken = await Desktop.actions.getToken();
// => Get current accessToken from Desktop store

Returns{String} A user access token.

fetchPaginatedAuxCodes
  • Retrieves the current idle codes or the the current wrap up codes.
  • Example for idle codes: Idle, Coffee break, Meeting, Tea.
  • Example for wrapup codes: Credit Card Issue, Medical Query, Sales Explained.

Example Fetch Idle codes :

const idleCodes = await Desktop.agentConfigJsApi.fetchPaginatedAuxCodes(
  {
    workType:"IDLE_CODE", // or "WRAP_UP_CODE"
    page: 0,
    pageSize: 100,
    search: "",
    customFilter: ""
  }
);// => Get page 0 of 100 idleCodes from Desktop

Parameters

NameTypeDescriptionRequired
workTypeStringSpecifies the required auxillary code is a wrapup code or an idle code.Yes
pagenumberFetch details for the particular page number.No
pageSizenumberFetch the total number of items presant in one page.No
searchStringPass the search parameter.No
customFilterStringString that contains conditions for further filtering the results. This is based on the rsql syntax.No

Returns

{
    "meta": {
        "orgid": "58f1a59e-245c-4536-9ee4-06560658e493",
        "page": 0,
        "pageSize": 100,
        "totalPages": 10,
        "totalRecords": 910,
        "links": {
            "next": "/organization/58f1a59e-245c-4536-9ee4-06560658e493/v2/auxiliary-code?filter=active==true;workTypeCode==IDLE_CODE&attributes=id,isSystemCode,name,defaultCode&desktopProfileFilter=true&page=1&pageSize=100&sort=name,asc",
            "last": "/organization/58f1a59e-245c-4536-9ee4-06560658e493/v2/auxiliary-code?filter=active==true;workTypeCode==IDLE_CODE&attributes=id,isSystemCode,name,defaultCode&desktopProfileFilter=true&page=9&pageSize=100&sort=name,asc",
            "self": "/organization/58f1a59e-245c-4536-9ee4-06560658e493/v2/auxiliary-code?filter=active==true;workTypeCode==IDLE_CODE&attributes=id,isSystemCode,name,defaultCode&page=0&pageSize=100&desktopProfileFilter=true&sort=name,ASC",
            "first": "/organization/58f1a59e-245c-4536-9ee4-06560658e493/v2/auxiliary-code?filter=active==true;workTypeCode==IDLE_CODE&attributes=id,isSystemCode,name,defaultCode&desktopProfileFilter=true&page=0&pageSize=100&sort=name,asc"
        }
    },
    "data": [
        {
            "isSystem": false,
            "name": "A_idleTest",
            "id": "6d686095-80df-4286-8b41-0a937990c905",
            "isDefault": true
        },
        {
            "isSystem": false,
            "name": "Break",
            "id": "3c5fa5f2-21fe-41cb-a5a3-5d71eccd5e1a",
            "isDefault": false
        }
    ]
}

Fetch wrap up codes :

const wrapUpCodes = await Desktop.agentConfigJsApi.fetchPaginatedAuxCodes(
  {
    workType:"WRAP_UP_CODE",
    page: 0,
    pageSize: 100,
    search: "",
    customFilter: ""
  }
); 
// => Get page 0 of 100 of wrapUpCodes from Desktop

Returns

{
    "meta": {
        "orgid": "58f1a59e-245c-4536-9ee4-06560658e493",
        "page": 0,
        "pageSize": 100,
        "totalPages": 3,
        "totalRecords": 211,
        "links": {
            "next": "/organization/58f1a59e-245c-4536-9ee4-06560658e493/v2/auxiliary-code?filter=active==true;workTypeCode==WRAP_UP_CODE&attributes=id,isSystemCode,name,defaultCode&desktopProfileFilter=true&page=1&pageSize=100&sort=name,asc",
            "last": "/organization/58f1a59e-245c-4536-9ee4-06560658e493/v2/auxiliary-code?filter=active==true;workTypeCode==WRAP_UP_CODE&attributes=id,isSystemCode,name,defaultCode&desktopProfileFilter=true&page=2&pageSize=100&sort=name,asc",
            "self": "/organization/58f1a59e-245c-4536-9ee4-06560658e493/v2/auxiliary-code?filter=active==true;workTypeCode==WRAP_UP_CODE&attributes=id,isSystemCode,name,defaultCode&page=0&pageSize=100&desktopProfileFilter=true&sort=name,ASC",
            "first": "/organization/58f1a59e-245c-4536-9ee4-06560658e493/v2/auxiliary-code?filter=active==true;workTypeCode==WRAP_UP_CODE&attributes=id,isSystemCode,name,defaultCode&desktopProfileFilter=true&page=0&pageSize=100&sort=name,asc"
        }
    },
    "data": [
        {
            "isSystem": false,
            "name": "Break",
            "id": "fc4cae32-0b5f-4409-ad19-7ff570f68f20",
            "isDefault": false
        },
        {
            "isSystem": false,
            "name": "Customer Disconnected",
            "id": "cd0110c9-3fb5-4cf8-937f-e8fa55d46d01",
            "isDefault": true
        }
    ]
}
getIdleCodes()

Caution: This method will be deprecated in the future.

Retrieves the current idle codes. Example: Idle, Coffee break, Meeting, Tea.

Example

const idleCodes = await Desktop.actions.getIdleCodes();
// => Get current idleCodes from Desktop store

Returns{Array} The array of objects.

Example Response

{
    id: "1643",
    isDefault: false,
    isSystem: true,
    name: "RONA"
} {
    id: "1644",
    isDefault: true,
    isSystem: false,
    name: "Meeting"
}
getWrapUpCodes()

Caution: This method will be deprecated in the future.

Retrieves the wrap up codes. Example: Credit Card Issue, Medical Query, Sales Explained.

Example

const wrapUpCodes = await Desktop.actions.getWrapUpCodes()
// => Get current wrapUpCodes from Desktop store
Retrieves wrap up codes such as Ex. "Credit Card Issue", "Medical Query", "Sales Explained" as per its configured

Returns

{Array} The array of objects.

Example Response

{
    id: "2063",
    isDefault: false,
    isSystem: false,
    name: "Account Information Explained"
} {
    id: "2061",
    isDefault: false,
    isSystem: false,
    name: "Credit Card Issue"
}
getMediaTypeQueue(telephony, social, email, chat)

Retrieves the list of currently available media types.

Note: The administrator configures the media type for an agent.

Example

const queue = await Desktop.actions.getMediaTypeQueue(
  "telephony" | "social" | "email" | "chat"
); // => Get current media queue from Desktop store

Parameters

NameTypeDescriptionRequired
telephonyStringThe media channel type for voice calls.Yes
socialStringThe media channel type for social messaging conversations. The supported social messaging conversations are:
- Messenger (Facebook Messenger)
- SMS (Short Message Service)
Yes
emailStringThe media channel type for emails.Yes
chatStringThe media channel type for chats.Yes

Returns{Object} The object with the retrieved data.

Example Response

{
    "key": "c9897fa7-6188-11eb-a6e4-f93bdeada4e5",
    "value": {
        "agentId": "7c867aa9-ec768-341a-b767-e5hd6ae7g701",
        "consultMediaResourceId": null,
        "eventType": "RoutingMessage",
        "interaction": {
            "callAssociatedData": {
                "accountId": {
                    "agentEditable": false,
                    "displayName": "accountId",
                    "name": "accountId",
                    "type": "STRING",
                    "value": "e9e2c7a0-5c64-11ea-9e59-6fbf992ffc23"
                },
                "ani": {
                    "agentEditable": false,
                    "displayName": "ani",
                    "name": "ani",
                    "type": "STRING",
                    "value": "janedoe@gmail.com"
                },
                "bccAddress": {
                    "agentEditable": false,
                    "displayName": "bccAddress",
                    "name": "bccAddress",
                    "type": "STRING",
                    "value": ""
                },
                "ccAddress": {
                    "agentEditable": false,
                    "displayName": "ccAddress",
                    "name": "ccAddress",
                    "type": "STRING",
                    "value": ""
                },
                "contentType": {
                    "agentEditable": false,
                    "displayName": "contentType",
                    "name": "contentType",
                    "type": "STRING",
                    "value": "multipart/alternative"
                },
                "customerName": {
                    "agentEditable": false,
                    "displayName": "customerName",
                    "name": "customerName",
                    "type": "STRING",
                    "value": "Jane Doe"
                },
                "date": {
                    "agentEditable": false,
                    "displayName": "date",
                    "name": "date",
                    "type": "STRING",
                    "value": "Wed, 20 Jan 2021 06:09:06 +0000"
                },
                "dn": {
                    "agentEditable": false,
                    "displayName": "dn",
                    "name": "dn",
                    "type": "STRING",
                    "value": "agent2021@gmail.com"
                },
                "entryPointId": {
                    "agentEditable": false,
                    "displayName": "entryPointId",
                    "name": "entryPointId",
                    "type": "STRING",
                    "value": "AXCZuH9MXrf9I0XFBIfL"
                },
                "from": {
                    "agentEditable": false,
                    "displayName": "from",
                    "name": "from",
                    "type": "STRING",
                    "value": "Jane Doe"
                },
                "fromAddress": {
                    "agentEditable": false,
                    "displayName": "fromAddress",
                    "name": "fromAddress",
                    "type": "STRING",
                    "value": "janedoe@gmail.com"
                },
                "inReplyTo": {
                    "agentEditable": false,
                    "displayName": "inReplyTo",
                    "name": "inReplyTo",
                    "type": "STRING",
                    "value": ""
                },
                "messageId": {
                    "agentEditable": false,
                    "displayName": "messageId",
                    "name": "messageId",
                    "type": "STRING",
                    "value": "289DBEAD-0715-4878-A0B9-365555C18E72@cisco.com"
                },
                "queueType": {
                    "agentEditable": false,
                    "displayName": "queueType",
                    "name": "queueType",
                    "type": "STRING",
                    "value": "tam"
                },
                "reasonCode": {
                    "agentEditable": false,
                    "displayName": "reasonCode",
                    "name": "reasonCode",
                    "type": "STRING",
                    "value": "Email_Queue"
                },
                "references": {
                    "agentEditable": false,
                    "displayName": "references",
                    "name": "references",
                    "type": "STRING",
                    "value": ""
                },
                "replyToAddress": {
                    "agentEditable": false,
                    "displayName": "replyToAddress",
                    "name": "replyToAddress",
                    "type": "STRING",
                    "value": "janedoe@gmail.com"
                },
                "ronaTimeout": {
                    "agentEditable": false,
                    "displayName": "ronaTimeout",
                    "name": "ronaTimeout",
                    "type": "STRING",
                    "value": "30"
                },
                "subject": {
                    "agentEditable": false,
                    "displayName": "subject",
                    "name": "subject",
                    "type": "STRING",
                    "value": "sales"
                },
                "threadId": {
                    "agentEditable": false,
                    "displayName": "threadId",
                    "name": "threadId",
                    "type": "STRING",
                    "value": "289DBEAD-0715-4878-A0B9-365555C18E72@cisco.com"
                },
                "toAddress": {
                    "agentEditable": false,
                    "displayName": "toAddress",
                    "name": "toAddress",
                    "type": "STRING",
                    "value": "agent2021@gmail.com"
                },
                "virtualTeamName": {
                    "agentEditable": false,
                    "displayName": "virtualTeamName",
                    "name": "virtualTeamName",
                    "type": "STRING",
                    "value": "Email_Queue"
                }
            },
            "callAssociatedDetails": {
                "accountId": "e9e2c7a0-5c64-11ea-9e59-6fbf992ffc23",
                "ani": "janedoe@gmail.com",
                "bccAddress": "",
                "ccAddress": "",
                "contentType": "multipart/alternative",
                "customerName": "Jane Doe",
                "date": "Wed, 20 Jan 2021 06:09:06 +0000",
                "dn": "agent2021@gmail.com",
                "entryPointId": "AXCZuH9MXrf9I0XFBIfL",
                "from": "Jane Doe",
                "fromAddress": "janedoe@gmail.com",
                "inReplyTo": "",
                "messageId": "289DBEAD-0715-4878-A0B9-365555C18E72@cisco.com",
                "queueType": "tam",
                "reasonCode": "Email_Queue",
                "references": "",
                "replyToAddress": "janedoe@gmail.com",
                "ronaTimeout": "30",
                "subject": "sales",
                "threadId": "289DBEAD-0715-4878-A0B9-365555C18E72@cisco.com",
                "toAddress": "agent2021@gmail.com",
                "virtualTeamName": "Email_Queue"
            },
            "callFlowParams": {
                "Automation_Email_Queue": {
                    "description": "",
                    "name": "Automation_Email_Queue",
                    "qualifier": "vteam",
                    "value": "3281",
                    "valueDataType": "string"
                },
                "Dont_Use_Email": {
                    "description": "",
                    "name": "Dont_Use_Email",
                    "qualifier": "vteam",
                    "value": "3276",
                    "valueDataType": "string"
                },
                "Email_Queue": {
                    "description": "",
                    "name": "Email_Queue",
                    "qualifier": "vteam",
                    "value": "3266",
                    "valueDataType": "string"
                },
                "Mail_Automation_Queue": {
                    "description": "",
                    "name": "Mail_Automation_Queue",
                    "qualifier": "vteam",
                    "value": "3432",
                    "valueDataType": "string"
                }
            },
            "callProcessingDetails": {
                "QMgrName": "aqm",
                "QueueId": "3266",
                "accountId": "e9e2c7a0-5c64-11ea-9e59-6fbf992ffc23",
                "ani": "janedoe@gmail.com",
                "bccAddress": "",
                "ccAddress": "",
                "contentType": "multipart/alternative",
                "customerName": "Jane Doe",
                "date": "Wed, 20 Jan 2021 06:09:06 +0000",
                "dnis": "agent2021@gmail.com",
                "entryPointId": "AXCZuH9MXrf9I0XFBIfL",
                "from": "Jane Doe",
                "fromAddress": "janedoe@gmail.com",
                "inReplyTo": "",
                "messageId": "289DBEAD-0715-4878-A0B9-365555C18E72@cisco.com",
                "pauseDuration": "10",
                "pauseResumeEnabled": "true",
                "queueType": "tam",
                "reasonCode": "Email_Queue",
                "references": "",
                "replyToAddress": "janedoe@gmail.com",
                "ronaTimeout": "30",
                "subject": "sales",
                "taskToBeSelfServiced": "false",
                "tenantId": "133",
                "threadId": "289DBEAD-0715-4878-A0B9-365555C18E72@cisco.com",
                "toAddress": "agent2021@gmail.com",
                "virtualTeamName": "Email_Queue",
                "vteamId": "AXCZuH9MXrf9I0XFBIfL"
            },
            "contactDirection": {
                "type": "INBOUND"
            },
            "currentVTeam": "3266",
            "interactionId": "c9897fa7-6188-11eb-a6e4-f93bdeada4e5",
            "isFcManaged": false,
            "isTerminated": false,
            "media": {
                "289DBEAD-0715-4878-A0B9-365555C18E72@cisco.com": {
                    "holdTimestamp": null,
                    "isHold": false,
                    "mType": "mainCall",
                    "mediaMgr": "emm",
                    "mediaResourceId": "289DBEAD-0715-4878-A0B9-365555C18E72@cisco.com",
                    "mediaType": "email",
                    "participants": [
                        "janedoe@gmail.com",
                        "7c867aa9-ec768-341a-b767-e5hd6ae7g701"
                    ]
                }
            },
            "mediaChannel": "email",
            "mediaType": "email",
            "orgId": "f111e3af-1a45-42ef-9erf-4562354b8a25",
            "outboundType": null,
            "owner": "7c867aa9-ec768-341a-b767-e5hd6ae7g701",
            "participants": {
                "7c867aa9-ec768-341a-b767-e5hd6ae7g701": {
                    "channelId": "a72a75f8-fd30-44f9-85f1-39d633055475",
                    "consultState": null,
                    "consultTimestamp": null,
                    "dn": "8895579172",
                    "hasJoined": true,
                    "id": "7c867aa9-ec768-341a-b767-e5hd6ae7g701",
                    "isConsulted": false,
                    "isWrapUp": false,
                    "joinTimestamp": 1612248681335,
                    "lastUpdated": 1612248681336,
                    "name": "John Doe",
                    "pType": "Agent",
                    "queueId": "3266",
                    "queueMgrId": "aqm",
                    "sessionId": "3d017488-527a-4e89-9313-5d4eb353c789",
                    "siteId": "472",
                    "teamId": "960",
                    "teamName": "Email_Team",
                    "type": "Agent",
                    "wrapUpTimestamp": null
                },
                "janedoe@gmail.com": {
                    "id": "janedoe@gmail.com",
                    "pType": "Customer",
                    "type": "Customer"
                }
            },
            "previousVTeams": [],
            "state": "connected",
            "workflowManager": null
        },
        "interactionId": "c9897fa7-6188-11eb-a6e4-f93bdeada4e5",
        "isConsulted": false,
        "mediaResourceId": "289DBEAD-0715-4878-A0B9-365555C18E72@cisco.com",
        "orgId": "f111e3af-1a45-42ef-9erf-4562354b8a25",
        "queueMgr": "aqm",
        "trackingId": "2e30a830-6611-11eb-bbe4-81e078594d7a",
        "type": "AgentContact"
    }
}
fireGeneralSilentNotification(raw)

Triggers silent notifications. Silent notifications do not appear on the desktop, but are listed in the Notification Center. The Notification Center icon indicates the increase in the number of unread messages.

Note: You can customize the notification icon displayed in the Notification Center dialog box using the iconDetail object.

Example

import {
    Desktop
} from "@wxcc-desktop/sdk";
import {
    Notifications
} from "@uuip/unified-ui-platform-sdk";

...

const raw: Notifications.ItemMeta.Raw = {
    data: {
        type: Notifications.ItemMeta.Type.Info,
        mode: Notifications.ItemMeta.Mode.Silent, // Change type here based on the method.
        title: "Info - Silent",
        data: new NotificationItemsContent.DataController({
            text: "Explore New Horizons",
            link: "https://www.abc.com/file/Tjpn4Z9p8jZy0Da0Ggq6ra/Priority-To-do-list?node-id=1280:83124",
            linkName: 'Toaster Notification',
            linkTooltip: `<div style="text-align: left !important;">Phone - +1 (412)555-3782 <br /> Queue - IVR_Queue <br /> Activity Label <br /> URL - www.google.com <br /> Phone - +1-408-000-0001 <br /> Account - 81684989000 </div>`,
            iconDetail: {
                iconName: 'icon-alert-active_16',
                color: 'blue',
                iconColor: '#08599C'
            },
            actions: [
              {
                label: "Yes",
                handler: n => {
                  console.log("Yes button clicked", n);
                },
                variant: "primary"
              },
              {
                label: "No",
                handler: n => {
                  console.log("No button clicked", n);
                },
                variant: "secondary"
              }
            ],
        })
    },
};

// Desktop General Notifications:
Desktop.actions.fireGeneralSilentNotification(raw)
// => Fires silent notification in Desktop.
// Silent notification will not have any apperance on desktop but a notification icon will have one count increased.

Parameters

NameTypeDescriptionRequired
rawObjectContains information regarding the type of notification sent to the user.Yes
-->dataObjectOptions of the specific notification.Yes
--> typeEnumThe type of notifications displayed on the Desktop. (Info, Warn, Error, Success, Chat, Default)Yes
-->modeEnumThe available mode of notification based on the method. (Silent, AutoDismiss, Acknowledge)Yes
-->titleStringThe title of the notification.Yes
-->dataObjectOptions for the notification content.Yes
--> typeStringThe media channel type such as chat and social.Optional
-->textStringThe subheading of the notification.Yes
-->linkStringThe link address to the notification.Optional
-->linkNameStringThe text to display for the link.Optional
-->linkTooltipStringThe tooltip for the link.Optional
-->iconDetailObjectCustom details for the notification icon.Optional
-->iconNameStringName of the notification icon.Yes
-->colorStringThe color of the circle in the background, in which the notification icon is placed. This color changes based on the light mode or dark mode selection.Optional
-->bgColorStringThe color of the circle in the background, in which the notification icon is placed. This color does not change based on the light mode or dark mode selection.
Note: If both the color and bgColor are defined, then bgColor takes precedence.
Optional
-->iconColorStringThe color of the notification icon.Optional
-->linkHandlerFunctionThe function that is invoked when the conditions are met.Optional
-->errorDetailObjectOptions for the notification error.Optional
-->headerStringThe title of the notification error.Optional
-- >messageStringThe message displayed in the notification error modal dialog.Yes
-->trackingIdStringUnique identifier based on the notification error.Optional
-->localizationObjectOptions for the localization (i18n) module.Yes
-- >timestampStringThe time at which the notification error was generated. Timestamp uses the format DateTime.fromMillis (now + 4).to ISO().Optional
-->taskIdStringUnique identifier for the task.Optional
-->dismissHandlerFunctionThe function invoked when the notification is dismissed.Optional
-->actionsArrayThe actions supported by the notification. These are rendered as buttons that can be used to process different types of responses from the user e.g. Accept/Decline, Yes/No/Later etc. For more information, see Action.Optional

| -->lineClamp | Number | Maximum number of lines from the message displayed on the notification before truncation. | Optional |

Action

NameTypeDescription
labelStringThe text displayed on the action button.
variantStringThe variant of the action button. Determines the look of the button. See the Button component under the Momentum UI Web Component Library for the available variants.
handlerFunctionThe function invoked when the button is clicked.
fireGeneralAutoDismissNotification(raw)

Triggers the auto-dismiss notification. Returns the notification resolved status, reason, and mode.

Note: If Desktop notifications are disabled by the user, they are converted into silent notifications and reflected in mode.

Example

import {
    Desktop
} from "@wxcc-desktop/sdk";
import {
    Notifications
} from "@uuip/unified-ui-platform-sdk";

...

const raw: Notifications.ItemMeta.Raw = {
    data: {
        type: Notifications.ItemMeta.Type.Info,
        mode: Notifications.ItemMeta.Mode.AutoDismiss, // Change type here based on the method.
        title: "Info - AutoDismiss",
        data: new NotificationItemsContent.DataController({
            text: "Explore New Horizons",
            link: "https://www.abc.com/file/Tjpn4Z9p8jZy0Da0Ggq6ra/Priority-To-do-list?node-id=1280:83124",
            linkName: 'Toaster Notification',
            linkTooltip: `<div style="text-align: left !important;">Phone - +1 (412)555-3782 <br /> Queue - IVR_Queue <br /> Activity Label <br /> URL - www.google.com <br /> Phone - +1-408-000-0001 <br /> Account - 81684989000 </div>`,
            iconDetail: {
                iconName: 'icon-alert-active_16',
                color: 'blue',
                iconColor: '#08599C'
            }
        })
    },
};

// Unlike silent notification, auto-dismiss and acknowledge can have controlled responses, that may reflect in the notification status, e.g.:

// => Fires auto-dismiss notification in Desktop. Returns notification resolved status, reason, mode.
NOTE: if Desktop notifications are disabled by the user - it will be converted into silent notification and reflected in "mode"
const [ status, reason, mode ]: [ Notifications.ItemMeta.Status,Notifications.ItemMeta.StatusChangeEventReason, Notifications.ItemMeta.Mode ] = await Desktop.actions.fireGeneralAutoDismissNotification(raw)

Parameters

NameTypeDescriptionRequired
rawObjectContains information regarding the type of notification sent to the user.Yes

For information on more parameters used in this method, see the Parameters table of the fireGeneralAutoDismissNotification(raw) method.

fireGeneralAcknowledgeNotification(raw)

Triggers the acknowledge notification. Returns the notification resolved status, reason, and mode.

Note: If Desktop notifications are disabled by the user, they are converted into silent notifications and reflected in mode.

Example

import {
    Desktop
} from "@wxcc-desktop/sdk";
import {
    Notifications
} from "@uuip/unified-ui-platform-sdk";

...

const raw: Notifications.ItemMeta.Raw = {
    data: {
        type: Notifications.ItemMeta.Type.Info,
        mode: Notifications.ItemMeta.Mode.Acknowledge, // Change type here based on the method.
        title: "Info - Acknowledge",
        data: new NotificationItemsContent.DataController({
            text: "Explore New Horizons",
            link: "https://www.abc.com/file/Tjpn4Z9p8jZy0Da0Ggq6ra/Priority-To-do-list?node-id=1280:83124",
            linkName: 'Toaster Notification',
            linkTooltip: `<div style="text-align: left !important;">Phone - +1 (412)555-3782 <br /> Queue - IVR_Queue <br /> Activity Label <br /> URL - www.google.com <br /> Phone - +1-408-000-0001 <br /> Account - 81684989000 </div>`,
            iconDetail: {
                iconName: 'icon-alert-active_16',
                color: 'blue',
                iconColor: '#08599C'
            }
        })
    },
};


// => Fires acknowledge notification in Desktop. Returns notification resolved status, reason, mode.
NOTE: if Desktop notifications are disabled by the user - it will be converted into silent notification and reflected in "mode"
const [ status, reason, mode ]: [ Notifications.ItemMeta.Status, Notifications.ItemMeta.StatusChangeEventReason, Notifications.ItemMeta.Mode ] = await Desktop.actions.fireGeneralAcknowledgeNotification(raw)

Parameters

NameTypeDescriptionRequired
rawObjectContains information regarding the type of notification sent to the user.Yes

For information on more parameters used in this method, see the Parameters table of the fireGeneralAutoDismissNotification(raw) method.

addCustomTask()

Adds a new custom task within your widget. The task appears in the Desktop task list.

Note: To keep the list of tasks up to date within your widget, you must add event listeners and subscribe to asynchronous events. The events signify new tasks being assigned to an agent. For more information, see Asynchronous Events.

Example

Desktop.actions.addCustomTask({
    export const contactPayload = {
        mediaResourceId: "49bcf26b-ec75-4351-89fa-55d54682c20c",
        eventType: "RoutingMessage",
        agentId: "16839506-7c48-4a71-ba1b-d585e5d37607",
        trackingId: "354deeae-c98a-4a8c-9e04-e56e129fdb9f",
        interaction: {
            isFcManaged: false,
            isTerminated: false,
            mediaType: "telephony",
            previousVTeams: ["AXCZ0YCAXrf9I0XFBI7b"],
            state: "connected",
            currentVTeam: "3268",
            participants: {
                "+19997770096": {
                    id: "+19997770096",
                    pType: "Customer",
                    type: "Customer"
                },
                "aad323de-32d8-48c9-af6b-b68dfbabfe20": {
                    name: "uuip-agent2",
                    pType: "Agent",
                    teamName: "Team X",
                    lastUpdated: 1597681728863,
                    teamId: "962",
                    joinTimestamp: 1597681728863,
                    isConsulted: false,
                    hasJoined: true,
                    consultTimestamp: null,
                    dn: "9997770194",
                    queueId: "3268",
                    id: "16839506-7c48-4a71-ba1b-d585e5d37607",
                    sessionId: "319d8e83-2a75-4ef3-9cb8-1c845edb15a0",
                    consultState: null,
                    queueMgrId: "aqm",
                    siteId: "473",
                    type: "Agent",
                    channelId: "ab8b3603-84a7-4f61-b987-9044b4d69cf2",
                    wrapUpTimestamp: null,
                    isWrapUp: false
                }
            },
            interactionId: "49bcf26b-ec75-4351-89fa-55d54682c20c",
            orgId: "f111e3af-1a45-42ef-9erf-4562354b8a25",
            callAssociatedData: {
                customerName: {
                    value: "test",
                    name: "r",
                    agentEditable: false,
                    type: "s",
                    displayName: "d"
                }
            },
            callAssociatedDetails: {
                virtualTeamName: "Queue - Telephony",
                ani: "+19997770096",
                ronaTimeout: "30",
                dn: "+12147659000",
                pathId: " StartCall PlayDone out out out",
                IvrPath: " EOI",
                subject: "",
                toAddress: "",
                inReplyTo: "",
                customerName: "",
                ccAddress: "",
                entryPointId: "",
                accountId: "",
                reasonCode: "",
                reason: "",
                references: "",
                contentType: "",
                date: "",
                replyToAddress: "",
                fromAddress: "",
                messageId: "",
                from: "",
                threadId: "",
                bccAddress: "",
                queueType: "",
                dnis: "",
                category: "",
                sourceNumber: "",
                sourcePage: "",
                appUser: "",
                customerNumber: ""
            },
            callProcessingDetails: {
                QMgrName: "aqm",
                pauseResumeEnabled: "true",
                taskToBeSelfServiced: "false",
                ani: "+19997770096",
                recordInProgress: "true",
                pauseDuration: "10",
                dnis: "+12147659000",
                tenantId: "133",
                QueueId: "3268",
                vteamId: "3268",
                jscriptId: "AXCZ4c3mjkwgAuS7vSIU",
                customerName: "",
                virtualTeamName: "Queue - Telephony",
                ronaTimeout: "30",
                category: "",
                reason: "",
                sourceNumber: "",
                sourcePage: "",
                appUser: "",
                customerNumber: "",
                reasonCode: "",
                IvrPath: " EOI",
                pathId: " StartCall PlayDone out out out",
                fromAddress: ""
            },
            media: {
                "49bcf26b-ec75-4351-89fa-55d54682c20c": {
                    mediaResourceId: "49bcf26b-ec75-4351-89fa-55d54682c20c",
                    mediaType: "telephony",
                    mediaMgr: "vmm",
                    participants: ["+19997770096", "16839506-7c48-4a71-ba1b-d585e5d37607"],
                    mType: "mainCall",
                    isHold: false,
                    holdTimestamp: null
                }
            },
            owner: "16839506-7c48-4a71-ba1b-d585e5d37607",
            mediaChannel: "broadcloud",
            contactDirection: {
                type: "INBOUND"
            },
            callFlowParams: {
                Play2: {
                    name: "Play2",
                    qualifier: "",
                    description: "(A valid text.)",
                    valueDataType: "string",
                    value: "Welcome to Agent Team Space"
                },
                Queue3: {
                    name: "Queue3",
                    qualifier: "vteam",
                    description: "(vteam, A valid VTeam.)",
                    valueDataType: "string",
                    value: "3268"
                }
            }
        },
        interactionId: "49bcf26b-ec75-4351-89fa-55d54682c20c",
        orgId: "f111e3af-1a45-42ef-9erf-4562354b8a25",
        queueMgr: "aqm",
        type: "AgentContactAssigned",
        destAgentId: "16839506-7c48-4a71-ba1b-d585e5d37607",
        consultMediaResourceId: "",
        owner: "",
        isConferencing: false
    };
})
// => Add custom task object in Desktop store
getTaskMap()

Retrieves the full list of tasks that are assigned to an agent at a given time.

Example

const currentTaskMap = await Desktop.actions.getTaskMap();
// => Get current task map from Desktop store

Returns {Map} A list of results.

Example Response

Desktop Store TaskMap:
    Map(1) {
        "851a8e81-6150-11eb-9a47-f1ca3756d4bd" => {
            …}, "eed4b53a-614f-11eb-9a47-8be6439707ee" => {
            …}
    }
    [
        [Entries]
    ] {
        "851a8e81-6150-11eb-9a47-f1ca3756d4bd" => Object
    }
key: "851a8e81-6150-11eb-9a47-f1ca3756d4bd"
value:
    agentId: "7c867aa9-ec768-341a-b767-e5hd6ae7g701"
eventType: "RoutingMessage"
interaction: {
    callAssociatedData: {
        …},
    callAssociatedDetails: {
        …},
    callFlowParams: {
        …},
    callProcessingDetails: {
        …},
    contactDirection: {
        …},
    …
}
interactionId: "851a8e81-6150-11eb-9a47-f1ca3756d4bd"
mediaResourceId: "4D44FF32-A585-4DD8-8422-4920FC97066A@cisco.com"
orgId: "f111e3af-1a45-42ef-9erf-4562354b8a25"
queueMgr: "aqm"
trackingId: "69773a10-6163-11eb-9fb9-8dadf7aee433"
type: "AgentContactAssigned"
Logger Module

The Desktop.logger module creates and maintains the client-side log messages for third-party widgets.

With individually set up logger, you can integrate with the Desktop logging system (that is being used for telemetry and problem report) and at the same time maintain a clear origin definition. We recommend that you create a logger instance for your widgets only once per project. Create a logger instance in a utils.ts file and reuse throughout the components.

Example

// utils.ts file
import { Desktop } from "@wxcc-desktop/sdk";

export const logger = Desktop.logger.createLogger("my-custom-component");

// Component.ts file
import { logger } from "./utils.ts";

logger.info("Info test"); // logger.info => 2020-12-16 13:11:04:971["my-custom-component", "Info test"]
logger.warn("Warn test"); // logger.info => 2020-12-16 13:11:04:971["my-custom-component", "Warn test"]
logger.error("Error test"); // logger.info => 2020-12-16 13:11:04:971["my-custom-component", "Error test"]

For more information on the widget starter example, see Cisco Webex Contact Center Widget Starter.

You can obtain logs in a JSON format or as a downloadable *.log file specifically for your widget. The following are the available options to download the logs:

// Download logs as a JSON file for "my-custom-component" prefix:
Desktop.logger.browserDownloadLogsJson("my-custom-component");

// Download logs as a Text file for "my-custom-component" prefix:
Desktop.logger.browserDownloadLogsText("my-custom-component");

// Get logs as Objects collection for "my-custom-component" prefix:
Desktop.logger.getLogsCollection("my-custom-component");

// Get logs as base64 encoded url ready to put into link href to initiate browser download as a JSON file for "my-custom-component" prefix:
Desktop.logger.getLogsJsonUrl("my-custom-component);

// Get logs as base64 encoded url ready to put into link href to initiate browser download as a Text file for "my-custom-component" prefix:
Desktop.logger.getLogsTextUrl("my-custom-component");

// Cleanup logs from Local Storage for "my-custom-component" prefix:
Desktop.logger.cleanupPrefixedLogs("my-custom-component");

You can also download logs from the Desktop. For more information, see the Download Error Report section in the Working with Agent Desktop chapter of the Cisco Webex Contact Center Agent Desktop User Guide.

Methods
createLogger(my-custom-component)

Initializes the logger for third-party widgets that help in logging related information to a particular component. Different methods are used based on the log type. The messages such as info, warn, and error are logged in the browser console.

Example

const logerOne = Desktop.logger.createLogger("my-custom-component-one");
const logerTwo = Desktop.logger.createLogger("my-custom-component-two");

logerOne.info("Info test"); // console.log => "my-custom-component: Info:test"
logerTwo.warn("Warn test"); // console.log => "my-custom-component: Warn:test"
logerOne.error("Error test"); // console.log => "my-custom-component: Error:test"

Parameters

NameTypeDescriptionRequired
my-custom-componentStringName of the component. Example: email component, chat component.Yes
browserDownloadLogsJson(my-custom-component)

Downloads logs as a JSON file for the my-custom-component prefix.

Example

Desktop.logger.browserDownloadLogsJson("my-custom-component");

Parameters

NameTypeDescriptionRequired
my-custom-componentStringName of the component. Example: email component, chat component.Yes
browserDownloadLogsText(my-custom-component)

Downloads logs as a text file for the my-custom-component prefix.

Example

Desktop.logger.browserDownloadLogsText("my-custom-component");

Parameters

NameTypeDescriptionRequired
my-custom-componentStringName of the component. Example: email component, chat component.Yes
getLogsCollection(my-custom-component)

Retrieves logs as a collection of objects for the my-custom-component prefix.

Example

Desktop.logger.getLogsCollection("my-custom-component");

Parameters

NameTypeDescriptionRequired
my-custom-componentStringName of the component. Example: email component, chat component.Yes
getLogsJsonUrl(my-custom-component)

Retrieves logs as a Base64 encoded URL to initiate browser download as a JSON file for the my-custom-component prefix.

Example

Desktop.logger.getLogsJsonUrl("my-custom-component);

Parameters

NameTypeDescriptionRequired
my-custom-componentStringName of the component. Example: email component, chat component.Yes
getLogsTextUrl(my-custom-component)

Retrieves logs as a Base64 encoded URL to initiate browser download as a text file for the my-custom-component prefix.

Example

Desktop.logger.getLogsTextUrl("my-custom-component);

Parameters

NameTypeDescriptionRequired
my-custom-componentStringName of the component. Example: email component, chat component.Yes
cleanupPrefixedLogs(my-custom-component)

Cleans up logs from the local storage for the my-custom-component prefix.

Example

Desktop.logger.cleanupPrefixedLogs("my-custom-component);

Parameters

NameTypeDescriptionRequired
my-custom-componentStringName of the component. Example: email component, chat component.Yes
Agent State Information Module

The Desktop.agentStateInfo module listens for the latest data updates of agent related information.

Example

import { Service } from "@wxcc-desktop/sdk-types";

type LatestInfoData = {
  teamId?: string,
  teamName?: string,
  dn?: string,
  status?: string,
  subStatus?: string,
  idleCodes?: Service.Aqm.Configs.Entity[],
  idleCode?: IdleCodeData,
  wrapupCodes?: Service.Aqm.Configs.Entity[],
  outDialRegex?: string,
  isOutboundEnabledForTenant?: boolean,
  isOutboundEnabledForAgent?: boolean,
  isAdhocDialingEnabled?: boolean,
  isAgentAvailableAfterOutdial?: boolean,
  isEndCallEnabled?: boolean,
  isEndConsultEnabled?: boolean,
  allowConsultToQueue?: boolean,
  isCampaignManagementEnabled?: boolean,
  agentPersonalStatsEnabled?: boolean
};

The following table lists the payload details:

NameTypeDescriptionRequired
teamIdStringUnique identifier of the team.Yes
teamNameStringName of the team.Yes
dnStringDial number (DN) to the entry point.Yes
statusStringAgent log in status such as LoggedIn.Yes
subStatusStringAgent availability status such as Available.Yes
idleCodesArrayIndicates the reason that the agent is idle and not available for any routed requests. The agent changes the state from Available to any configured idle codes. Example: Idle, Coffee break, Meeting, Tea.Yes
idleCodeObjectIndicates the current reason that the agent is idle. For example, the agent changed the idle state from Coffee break to Meeting.When the agent is in the Available state, the idleCode is undefined.Yes
--> idNumberIdle code unique identifier.Yes
-->nameStringName of the reason code for the idle state, currently used by the agent. Example: Idle, Coffee break, Meeting, Tea.Yes
wrapupCodesArrayThe wrap up reason codes indicating that the agent has ended the interactions with the customerYes
outDialRegexStringOutdial regular expression validity.Yes
isOutboundEnabledForTenantBooleanDetermines whether the outbound feature is enabled for the tenant.
- True—Enables the outbound feature for the tenant.
- False—Disables the outbound feature for the tenant.
Yes
isOutboundEnabledForAgentBooleanDetermines whether the outbound feature is enabled for the agent.
- True—Enables the outbound feature for the agent.
- False—Disables the outbound feature for the agent.
Yes
isAdhocDialingEnabledBooleanDetermines whether an agent can use a phone number that is not stated in the enterprise address book to make an outdial call.
- True—An agent is allowed to use phone numbers (using the Dialpad) that are not stated in the enterprise address book to make an outdial call.
- False—An agent is allowed to use only the phone numbers that are stated in the enterprise address book to make an outdial call.
Yes
isAgentAvailableAfterOutdialBooleanDetermines whether an agent is available or not after the outdial call ends.
- True—The agent is available after the outdial call ends, and the agent state is set as Available.
- False—The agent is not available after the outdial call ends, and the agent state is set as Idle.
Yes
isEndCallEnabledBooleanDetermines whether an agent can end a voice call or not.
- True—Enables an agent to end a voice call.
- False—Disables an agent to end a voice call, and the agent must ask the customer to end the voice call.
Yes
isEndConsultEnabledBooleanDetermines whether an agent can end a consult call or not. The default value is true.
- True—Enables an agent to end a consult call.
- False—Disables an agent to end a consult call.
Yes
allowConsultToQueueBooleanDetermines whether to consult an active call to a queue.
- True—Enables the consult call to a queue.
- False—Disables the consult call to a queue.
Yes
isCampaignManagementEnabledBooleanDetermines whether the outbound campaign call feature is enabled or not.
- True—Enables the outbound campaign call feature for an agent.
- False—Disables the outbound campaign call feature for an agent.
Yes
agentPersonalStatsEnabledBooleanDetermines whether the Agent Performance Statistics (APS) reports page is enabled or not.
- True—Enables the Agent Performance Statistics (APS) reports page for an agent.
- False—Disables the Agent Performance Statistics (APS) reports page for an agent.
Yes
Methods
latestData

Fetches the latest user related information. Access latestData inside the updated event hander (See Events section). This will make sure that agentstateinfo module is loaded before accessing the property.

Example

const latestData: LatestInfoData = Desktop.agentStateInfo.latestData;

Returns{Object} Lists the latest user related information.

Example Response

{
    "agentName": "John Doe",
    "teamName": "Sales",
    "teamId": "964",
    "dn": "8895579172",
    "status": "LoggedIn",
    "subStatus": "Idle",
    "idleCodes": [{
        "id": "1646",
        "isDefault": false,
        "isSystem": true,
        "name": "Aux on Login"
    }],
    "wrapupCodes": [{
        "id": "2065",
        "isDefault": false,
        "isSystem": false,
        "name": "Wrapping up as customer disconnected"
    }],
    "outDialRegex": "([0-9a-zA-Z]+[-._])*[0-9a-zA-Z]+",
    "isOutboundEnabledForTenant": true,
    "isOutboundEnabledForAgent": true,
    "isAdhocDialingEnabled": true,
    "isAgentAvailableAfterOutdial": true,
    "isEndCallEnabled": true,
    "isEndConsultEnabled": true,
    "allowConsultToQueue": true,
    "isCampaignManagementEnabled": true,
    "agentPersonalStatsEnabled": true
}
stateChange(state, auxCodeIdArray)

Changes the state of an agent. For example from Available to Idle.

Example

await Desktop.agentStateInfo.stateChange({
  state: "Available",
  auxCodeIdArray: "0"
});

// An example for Idle with an Idle Code

await Desktop.agentStateInfo.stateChange({
  state: "Meeting",
  auxCodeIdArray: "3bdbf3f3-0232-4ae3-b26c-16437c18a13d"
});

Parameters

NameTypeDescriptionRequired
stateStringCurrent agent state.Yes
auxCodeIdArrayStringUnique identifier of the agent state.Yes

Returns

{Object} Lists the agent state change information.

Example Response

{
    "data": {
        "agentId": "7c867aa9-ec768-341a-b767-e5hd6ae7g701",
        "agentSessionId": "3d017488-527a-4e89-9313-5d4eb353c789",
        "auxCodeId": "0",
        "connectedChannels": [
            "38136791-cf79-4663-a5d0-39b0d094abf8"
        ],
        "eventType": "AgentDesktopMessage",
        "lastIdleCodeChangeTimestamp": null,
        "lastStateChangeReason": "",
        "lastStateChangeTimestamp": 1612245463183,
        "orgId": "f111e3af-1a45-42ef-9erf-4562354b8a25",
        "status": "LoggedIn",
        "subStatus": "Available",
        "trackingId": "9008a4a0-651b-11eb-a97d-0d76c582d799",
        "type": "AgentStateChangeSuccess"
    },
    "orgId": "f111e3af-1a45-42ef-9erf-4562354b8a25",
    "trackingId": "notifs_aa848b62-4fcf-4d4c-95ad-1233bb7f899c",
    "type": "AgentStateChange"
}
fetchAddressBooks()

Retrieves the address book details.

Example

const books = await Desktop.agentStateInfo.fetchAddressBooks();

Returns{Array} The array of objects.

Example Response

AddressBooks = {
    speedDials: [{
            desc: 'Jane Doe',
            dn: '9997770094'
        },
        {
            desc: 'John Doe',
            dn: '9997770095'
        },
    ]
};
Address = {
    desc: string;
    dn: string;
    phoneBookName ? : string;
};
mockOutdialAniList()

Fetches the ANI list that is used for an outdial call. The administrator adds the outdial ANI list to an agent profile. The outdial number is used as the caller number, and is displayed to the customer as the caller ID. Updates the store variable value as per the response received from mockOutdialAniList. (Initially the store variable value will be empty).

Store Variable

STORE.agent.outdialAniList

Example

await Desktop.agentStateInfo.mockOutdialAniList();

Returns{Object} Lists the outdial ANI.

Example Response

const mockOutdialAniListResponse = {
  data: {
    agentSessionId: "",
    callData: "",
    data: {
      mockOutdialAniList: [
        {
          id: "+1-3364112001",
          name: "outdial ani"
        },
        {
          id: "+1-3364112002",
          name: "outdial ani two"
        },
        {
          id: "+1-3364112003",
          name: "outdial ani three"
        },
        {
          id: "+1-3364112004",
          name: "outdial ani four"
        }
      ]
    },
    jsMethod: "mockOutdialAni"
  },
  orgId: "b33fb142-4d65-4781-9899-19b0363cd45f",
  trackingId: "notifs_b3cf873d-56e4-4f6b-801d-c0dc49f3dd87",
  type: "mockOutdialAniList"
};
Events
addEventListener

Listens to an event named updated that is logged if the dn, status, or subStatus field is changed.

For more information, see addEventListener(event, handler).

Example

Desktop.agentStateInfo.addEventListener("updated", updatedList =>
    console.log(updatedList)[{
        "name": "dn",
        "value": "+12580258011",
        "oldValue": ""
    }, {
        "name": "status",
        "value": "LoggedIn",
        "oldValue": "DefaultState"
    }, {
        "name": "subStatus",
        "value": "Available",
        "oldValue": ""
    }] *
    /
)
Agent Contact Module

The Desktop.agentContact module makes requests and listens to notification events related to the agent-contact entity, such as the arrival of a new task.

Example

import {
    Desktop
} from "@wxcc-desktop/sdk";

//...

/*
  Supposing Desktop.config.init({...}) was called
*/

// List of available agent-contact aqm reqs:
await Desktop.agentContact.accept({
    ...
});
await Desktop.agentContact.consultAccept({
    ...
});
await Desktop.agentContact.buddyAgents({
    ...
});
await Desktop.agentContact.end({
    ...
});
await Desktop.agentContact.consultEnd({
    ...
});
await Desktop.agentContact.cancelCtq({
    ...
});
await Desktop.agentContact.wrapup({
    ...
});
await Desktop.agentContact.vteamTransfer({
    ...
});
await Desktop.agentContact.blindTransfer({
    ...
});
await Desktop.agentContact.hold({
    ...
});
await Desktop.agentContact.unHold({
    ...
});
await Desktop.agentContact.consult({
    ...
});
await Desktop.agentContact.decline({
    ...
});
await Desktop.agentContact.consultTransfer({
    ...
});
await Desktop.agentContact.vteamList({
    ...
});
await Desktop.agentContact.pauseRecording({
    ...
});
await Desktop.agentContact.resumeRecording({
    ...
});
await Desktop.agentContact.acceptV2({
    ...
});
await Desktop.agentContact.endV2({
    ...
});
await Desktop.agentContact.cancelTaskV2({
    ...
});
await Desktop.agentContact.pauseRecordingV2({
    ...
});
await Desktop.agentContact.resumeRecordingV2({
    ...
});
await Desktop.agentContact.wrapupV2({
    ...
});
await Desktop.agentContact.consultV2({
    ...
});
await Desktop.agentContact.consultEndV2({
    ...
});
await Desktop.agentContact.consultConferenceV2({
    ...
});
await Desktop.agentContact.exitConference({
    ...
});
await Desktop.agentContact.consultTransferV2({
    ...
});
await Desktop.agentContact.blindTransferV2({
    ...
});
await Desktop.agentContact.vteamTransferV2({
    ...
});
await Desktop.agentContact.buddyAgentsV2({
    ...
});

// List of available agent-contact aqm notifs events:
Desktop.agentContact.addEventListener("eAgentContact", msg => console.log(msg));
Desktop.agentContact.addEventListener("eAgentContactAssigned", msg => console.log(msg));
Desktop.agentContact.addEventListener("eAgentContactAssignFailed", msg => console.log(msg));
Desktop.agentContact.addEventListener("eAgentContactEnded", msg => console.log(msg));
Desktop.agentContact.addEventListener("eAgentContactWrappedUp", msg => console.log(msg));
Desktop.agentContact.addEventListener("eAgentContactAniUpdated", msg => console.log(msg));
Desktop.agentContact.addEventListener("eAgentOfferContact", msg => console.log(msg));
Desktop.agentContact.addEventListener("eAgentOfferContactRona", msg => console.log(msg));
Desktop.agentContact.addEventListener("eAgentOfferConsult", msg => console.log(msg));
Desktop.agentContact.addEventListener("eAgentWrapup", msg => console.log(msg));
Desktop.agentContact.addEventListener("eAgentContactHeld", msg => console.log(msg));
Desktop.agentContact.addEventListener("eAgentContactUnHeld", msg => console.log(msg));
Desktop.agentContact.addEventListener("eCallRecordingStarted", msg => console.log(msg));
Desktop.agentContact.addEventListener("eResumeRecording", msg => console.log(msg));
Desktop.agentContact.addEventListener("ePauseRecording", msg => console.log(msg));
Desktop.agentContact.addEventListener("eConsultTransfer", msg => console.log(msg));
Desktop.agentContact.addEventListener("eAgentblindTransferred", msg => console.log(msg));
Desktop.agentContact.addEventListener("eAgentvteamTransfer", msg => console.log(msg));
Desktop.agentContact.addEventListener("eAgentConsultCreated", msg => console.log(msg));
Desktop.agentContact.addEventListener("eAgentConsultConferenced", msg => console.log(msg));
Desktop.agentContact.addEventListener("eAgentConsultEnded", msg => console.log(msg));
Desktop.agentContact.addEventListener("eAgentCtqCancelled", msg => console.log(msg));
Desktop.agentContact.addEventListener("eAgentConsultConferenceEnded", msg => console.log(msg));
Desktop.agentContact.addEventListener("eAgentConsulting", msg => console.log(msg));
Desktop.agentContact.addEventListener("eAgentConsultFailed", msg => console.log(msg));
Desktop.agentContact.addEventListener("eAgentConsultEndFailed", msg => console.log(msg));
Desktop.agentContact.addEventListener("eAgentCtqFailed", msg => console.log(msg));
Desktop.agentContact.addEventListener("eAgentCtqCancelFailed", msg => console.log(msg));
Desktop.agentContact.addEventListener("eAgentConsultConferenceEndFailed", msg => console.log(msg));
Desktop.agentContact.addEventListener("eAgentMonitorStateChanged", msg => console.log(msg));
Desktop.agentContact.addEventListener("eAgentMonitoringEnded", msg => console.log(msg));

// Module supports removing added listeners like:
const listener = msg => console.log(msg);
Desktop.agentContact.addEventListener("eAgentContact", listener);
Desktop.agentContact.removeEventListener("eAgentContact", listener);

// Module supports one-time added listeners like:
Desktop.agentContact.addOnceEventListener("eAgentContact", listener);
Desktop.agentContact.removeOnceEventListener("eAgentContact", listener);

// Module supports removing all listeners like:
Desktop.agentContact.removeAllEventListeners();

Example Response

// Generic Response Example form of data is :
data: {
    mediaResourceId: string;
    eventType: string;
    agentId: string;
    destAgentId: string;
    trackingId: string;
    consultMediaResourceId: string;
    interaction: {
        isFcManaged: boolean;
        isTerminated: boolean;
        mediaType: "email" | "chat" | "telephony" | "social" | "sms" | "facebook" | string;
        previousVTeams: string[];
        state: string;
        currentVTeam: string;
        participants: any; // todo
        interactionId: string;
        orgId: string;
    },
    interactionId: string;
    orgId: string;
    owner: string;
    queueMgr: string;
    type: string;
    ronaTimeout ? : number;
    isConsulted ? : boolean;
    isConferencing: boolean;
    updatedBy ? : string;
    destinationType ? : string;
}
Methods
accept()

Caution: This method will be deprecated in the future.

Accepts an incoming task.

Note: This method works only for non-voice tasks and isn't applicable for voice contacts.

Example

await Desktop.agentContact.accept({
    interactionId: “c837e6f7 - 699 a - 4736 - bb82 - 03 a6d58bb7f3”
});

The following table lists the payload details:

NameTypeDescriptionRequired
interactionIdStringUnique identifier for the user interaction.Yes

Returns

{Object} The value that corresponds to the task.

Note: The type parameter value in the response payload depends on the success or failure of the method. If the method is successful, the value is AgentContactAssigned; else, AgentContactAssignFailed.

Example Response

const acceptResponse = {
  data: {
    agentId: "7d12d9ea-e8e0-41ee-81bf-c11a685b64ed",
    eventType: "RoutingMessage",
    interaction: {
      callAssociatedData: {
        ani: {
          value: "janedoe@gmail.com"
        },
        category: {
          value: "Sales"
        },
        customerName: {
          value: "Jane Doe"
        },
        dn: {
          value: "Desktop"
        },
        entryPointId: {
          value: "AXCqFyz1G2pKap9PI-mW"
        },
        guestId: {
          value:
            "Y2lzY29zcGFyazovL3VzL1BFT1BMRS83ZjA3YjJmMC1jNTMyLTQ5MDktYTkzNi0yYTA3MTVmZGIwMTA"
        },
        mediaChannel: {
          value: "web"
        },
        reason: {
          value: "Test"
        },
        reasonCode: {
          value: "Sales"
        },
        ronaTimeout: {
          value: "30"
        },
        roomTitle: {
          value: "Help Jane Doe with Sales"
        },
        taskToBeSelfServiced: {
          value: "false"
        },
        templateId: {
          value: "b57990c0-5ec6-11ea-96ee-5df5aef56329"
        },
        templateName: {
          value: "Desktop"
        },
        virtualTeamName: {
          value: "Chat_Queue"
        }
      },
      callAssociatedDetails: {
        ani: "janedoe@gmail.com",
        category: "Sales",
        customerName: "Jane Doe",
        dn: "Desktop",
        entryPointId: "AXCqFyz1G2pKap9PI-mW",
        guestId:
          "Y2lzY29zcGFyazovL3VzL1BFT1BMRS83ZjA3YjJmMC1jNTMyLTQ5MDktYTkzNi0yYTA3MTVmZGIwMTA",
        mediaChannel: "web",
        reason: "Test",
        reasonCode: "Sales",
        ronaTimeout: "30",
        roomTitle: "Help Jane Doe with Sales",
        taskToBeSelfServiced: "false",
        templateId: "b57990c0-5ec6-11ea-96ee-5df5aef56329",
        templateName: "Desktop",
        virtualTeamName: "Chat_Queue"
      },
      callFlowParams: {
        Automation: {
          description: "(vteam, A valid VTeam.)",
          name: "Automation",
          qualifier: "vteam",
          value: "3270",
          valueDataType: "string"
        },
        Debit: {
          description: "(vteam, A valid VTeam.)",
          name: "Debit",
          qualifier: "vteam",
          value: "3270",
          valueDataType: "string"
        },
        Sales: {
          description: "(vteam, A valid VTeam.)",
          name: "Sales",
          qualifier: "vteam",
          value: "3270",
          valueDataType: "string"
        }
      },
      callProcessingDetails: {
        QMgrName: "aqm",
        QueueId: "3270",
        ani: "janedoe@gmail.com",
        category: "Sales",
        customerName: "Jane Doe",
        dnis: "Desktop",
        entryPointId: "AXCqFyz1G2pKap9PI-mW",
        guestId:
          "Y2lzY29zcGFyazovL3VzL1BFT1BMRS83ZjA3YjJmMC1jNTMyLTQ5MDktYTkzNi0yYTA3MTVmZGIwMTA",
        mediaChannel: "web",
        reason: "Test",
        reasonCode: "Sales",
        ronaTimeout: "30",
        roomTitle: "Help Jane Doe with Sales",
        taskToBeSelfServiced: "false",
        templateId: "b57990c0-5ec6-11ea-96ee-5df5aef56329",
        templateName: "Desktop",
        tenantId: "133",
        virtualTeamName: "Chat_Queue",
        vteamId: "AXCqFyz1G2pKap9PI-mW"
      },
      contactDirection: {
        type: "INBOUND"
      },
      currentVTeam: "3270",
      interactionId: "59dbbca6-4194-11eb-881c-253923a967e0",
      isFcManaged: false,
      isTerminated: false,
      media: {
        Y2lzY29zcGFyazovL3VzL1JPT00vNjVjOWVlYjAtNDE5NC0xMWViLWE1N2QtZWY2N2MwZTMyYmFh:
          {
            holdTimestamp: null,
            isHold: false,
            mType: "mainCall",
            mediaMgr: "cmm",
            mediaResourceId:
              "Y2lzY29zcGFyazovL3VzL1JPT00vNjVjOWVlYjAtNDE5NC0xMWViLWE1N2QtZWY2N2MwZTMyYmFh",
            mediaType: "chat",
            participants: [
              "janedoe@gmail.com",
              "7d12d9ea-e8e0-41ee-81bf-c11a685b64ed"
            ]
          }
      },
      mediaChannel: "web",
      mediaType: "chat",
      orgId: "f111e3af-1a45-42ef-9erf-4562354b8a25",
      outboundType: null,
      owner: "7d12d9ea-e8e0-41ee-81bf-c11a685b64ed",
      participants: {
        "7d12d9ea-e8e0-41ee-81bf-c11a685b64ed": {
          channelId: "bff9350a-9d2a-489a-a8d5-d9dacea4b692",
          consultState: null,
          consultTimestamp: null,
          dn: "9997770110",
          hasJoined: true,
          id: "7d12d9ea-e8e0-41ee-81bf-c11a685b64ed",
          isConsulted: false,
          isWrapUp: false,
          joinTimestamp: 1608339210824,
          lastUpdated: 1608339210824,
          name: "uuip-agent4 uuip-agent4",
          pType: "Agent",
          queueId: "3270",
          queueMgrId: "aqm",
          sessionId: "102d2096-bcc0-45bb-a583-a02f6c188071",
          siteId: "473",
          teamId: "1940",
          teamName: "Medical Help",
          type: "Agent",
          wrapUpTimestamp: null
        },
        "janedoe@gmail.com": {
          id: "janedoe@gmail.com",
          pType: "Customer",
          type: "Customer"
        }
      },
      previousVTeams: [],
      state: "connected"
    },
    interactionId: "59dbbca6-4194-11eb-881c-253923a967e0",
    mediaResourceId:
      "Y2lzY29zcGFyazovL3VzL1JPT00vNjVjOWVlYjAtNDE5NC0xMWViLWE1N2QtZWY2N2MwZTMyYmFh",
    orgId: "f111e3af-1a45-42ef-9erf-4562354b8a25",
    queueMgr: "aqm",
    trackingId: "9c9b97e0-4194-11eb-b819-7b8dd50ee0cd",
    type: "AgentContactAssigned"
  },
  orgId: "f111e3af-1a45-42ef-9erf-4562354b8a25",
  trackingId: "notifs_02db68c8-a5db-4028-95bb-1aebd6f87609",
  type: "RoutingMessage"
};
consultAccept()

Accepts a consult task.

Example

await Desktop.agentContact.consultAccept({
    interactionId: “c837e6f7 - 699 a - 4736 - bb82 - 03 a6d58bb7f3”
});

The following table lists the payload details:

NameTypeDescriptionRequired
interactionIdStringUnique identifier for the user interaction.Yes

Returns

{Object} The value that corresponds to the task.

Note: The type parameter value in the response payload depends on the success or failure of the method. If the method is successful, the value is AgentConsulting; else, AgentContactAssignFailed.

Example Response

const consultAcceptResponse = {
  data: {
    agentId: "9b036d89-930c-4187-a5bd-5dbb1439fe41",
    consultMediaResourceId: "c1b507d0-9aac-4500-a9f8-50f30eba4310",
    destAgentId: "ff7dbe19-fa3f-4c63-8a1c-04dcffef8e4f",
    destinationType: "Agent",
    eventType: "RoutingMessage",
    interaction: {
      callAssociatedData: {
        "": {
          agentEditable: false,
          displayName: "",
          name: "",
          type: "STRING",
          value: ""
        },
        IvrPath: {
          agentEditable: false,
          displayName: "IvrPath",
          name: "IvrPath",
          type: "STRING",
          value: " EOI"
        },
        ani: {
          agentEditable: false,
          displayName: "ani",
          name: "ani",
          type: "STRING",
          value: "**********"
        },
        dn: {
          agentEditable: false,
          displayName: "dn",
          name: "dn",
          type: "STRING",
          value: "**********"
        },
        nextVteamId: {
          agentEditable: false,
          displayName: "nextVteamId",
          name: "nextVteamId",
          type: "STRING",
          value: "Queue"
        },
        pathId: {
          agentEditable: false,
          displayName: "pathId",
          name: "pathId",
          type: "STRING",
          value: " StartCall PlayDone"
        },
        ronaTimeout: {
          agentEditable: false,
          displayName: "ronaTimeout",
          name: "ronaTimeout",
          type: "STRING",
          value: "30"
        },
        virtualTeamName: {
          agentEditable: false,
          displayName: "virtualTeamName",
          name: "virtualTeamName",
          type: "STRING",
          value: "Queue-1"
        }
      },
      callAssociatedDetails: {
        "": "",
        IvrPath: " EOI",
        ani: "************",
        dn: "************",
        nextVteamId: "Queue",
        pathId: " StartCall PlayDone",
        ronaTimeout: "30",
        virtualTeamName: "Queue-1"
      },
      callFlowParams: {
        Queue: {
          description: "(vteam, A valid VTeam.)",
          name: "Queue",
          qualifier: "vteam",
          value: "1336",
          valueDataType: "string"
        },
        WelcomePrompt: {
          description: "(mediaFile, A valid media file.)",
          name: "WelcomePrompt",
          qualifier: "mediaFile",
          value: "GAwelcome.wav",
          valueDataType: "string"
        }
      },
      callProcessingDetails: {
        QMgrName: "aqm",
        QueueId: "1336",
        ani: "************",
        dnis: "************",
        isPaused: "false",
        jscriptId: "AW7HP3QNB44q0sL-cTVz",
        pauseDuration: "30",
        pauseResumeEnabled: "true",
        recordInProgress: "true",
        ronaTimeout: "30",
        taskToBeSelfServiced: "false",
        tenantId: "82",
        virtualTeamName: "Queue-1",
        vteamId: "1336"
      },
      contactDirection: {
        type: "INBOUND"
      },
      currentVTeam: "1336",
      interactionId: "1277da79-dc49-439c-ab72-f00453a1ff71",
      isFcManaged: false,
      isTerminated: false,
      media: {
        "1277da79-dc49-439c-ab72-f00453a1ff71": {
          holdTimestamp: 1612429578817,
          isHold: true,
          mType: "mainCall",
          mediaMgr: "vmm",
          mediaResourceId: "1277da79-dc49-439c-ab72-f00453a1ff71",
          mediaType: "telephony",
          participants: ["**********", "9b036d89-930c-4187-a5bd-5dbb1439fe41"]
        },
        "c1b507d0-9aac-4500-a9f8-50f30eba4310": {
          holdTimestamp: null,
          isHold: false,
          mType: "consult",
          mediaMgr: "vmm",
          mediaResourceId: "c1b507d0-9aac-4500-a9f8-50f30eba4310",
          mediaType: "telephony",
          participants: [
            "ff7dbe19-fa3f-4c63-8a1c-04dcffef8e4f",
            "9b036d89-930c-4187-a5bd-5dbb1439fe41",
            "ff7dbe19-fa3f-4c63-8a1c-04dcffef8e4f"
          ]
        }
      },
      mediaChannel: "broadcloud",
      mediaType: "telephony",
      orgId: "f111e3af-1a45-42ef-9erf-4562354b8a25",
      outboundType: null,
      owner: "9b036d89-930c-4187-a5bd-5dbb1439fe41",
      participants: {
        "**********": {
          id: "**********",
          pType: "Customer",
          type: "Customer"
        },
        "9b036d89-930c-4187-a5bd-5dbb1439fe41": {
          channelId: "3de6706f-95b7-485a-9304-30928f7ee52e",
          consultState: "consulting",
          consultTimestamp: 1612429579220,
          dn: "**********",
          hasJoined: true,
          id: "9b036d89-930c-4187-a5bd-5dbb1439fe41",
          isConsulted: true,
          isWrapUp: false,
          joinTimestamp: 1612429549032,
          lastUpdated: 1612429549032,
          name: "user1",
          pType: "Agent",
          queueId: "1336",
          queueMgrId: "aqm",
          sessionId: "90896c91-0f77-4bc6-aec3-488a34ca88d3",
          siteId: "205",
          teamId: "598",
          teamName: "integ-test-team",
          type: "Agent",
          wrapUpTimestamp: null
        },
        "ff7dbe19-fa3f-4c63-8a1c-04dcffef8e4f": {
          channelId: "fb704337-71c3-4802-a03b-84a2d18eeaa0",
          consultState: "consulting",
          consultTimestamp: 1612429579220,
          dn: "**********",
          hasJoined: true,
          id: "ff7dbe19-fa3f-4c63-8a1c-04dcffef8e4f",
          isConsulted: true,
          isWrapUp: false,
          joinTimestamp: 1612429579200,
          lastUpdated: 1612429579200,
          name: "user2",
          pType: "Agent",
          queueId: "1336",
          queueMgrId: "aqm",
          sessionId: "57323f8b-9460-45fa-aaf6-4ca51c327af8",
          siteId: "205",
          teamId: "598",
          teamName: "integ-test-team",
          type: "Agent",
          wrapUpTimestamp: null
        }
      },
      previousVTeams: ["AW6h1AVRrZSGni185x28"],
      state: "consulting",
      workflowManager: null
    },
    interactionId: "1277da79-dc49-439c-ab72-f00453a1ff71",
    orgId: "f111e3af-1a45-42ef-9erf-4562354b8a25",
    queueMgr: "aqm",
    trackingId: "e7c032be-b18e-4b63-8ab2-6baf50b137b1",
    type: "AgentConsulting"
  },
  orgId: "f111e3af-1a45-42ef-9erf-4562354b8a25",
  trackingId: "notifs_3464be63-83e7-4b2d-94d5-a63fddc108d5",
  type: "RoutingMessage"
};
end()

Caution: This method will be deprecated in the future.

Ends an interaction for a specific task. Note: The end call feature is enabled using the isEndCallEnabled payload. For more information, see Agent State Information Module.

Example

await Desktop.agentContact.end({
    interactionId: “c837e6f7 - 699 a - 4736 - bb82 - 03 a6d58bb7f3”
});

The following table lists the payload details:

NameTypeDescriptionRequired
interactionIdStringUnique identifier for the user interaction.Yes

Returns

{Object} The value that corresponds to the task.

Note: The type parameter value in the response payload depends on the success or failure of the method. If the method is successful, the value is AgentWrapup or ContactEnded; else, ContactEndFailed.

Example Response

const endResponse = {
  data: {
    agentsPendingWrapUp: ["7d12d9ea-e8e0-41ee-81bf-c11a685b64ed"],
    eventType: "RoutingMessage",
    interaction: {
      callAssociatedData: {
        ani: {
          value: "janedoe@gmail.com"
        },
        category: {
          value: "Sales"
        },
        customerName: {
          value: "Jane Doe"
        },
        dn: {
          value: "Desktop"
        },
        entryPointId: {
          value: "AXCqFyz1G2pKap9PI-mW"
        },
        guestId: {
          value:
            "Y2lzY29zcGFyazovL3VzL1BFT1BMRS81NzNiODg1Mi1kZjM3LTRlODEtOGMxMi1mZjkyMTE3MmQ1NzY"
        },
        mediaChannel: {
          value: "web"
        },
        reason: {
          value: "Test"
        },
        reasonCode: {
          value: "Sales"
        },
        ronaTimeout: {
          value: "30"
        },
        roomTitle: {
          value: "Help Jane Doe with Sales"
        },
        taskToBeSelfServiced: {
          value: "false"
        },
        templateId: {
          value: "b57990c0-5ec6-11ea-96ee-5df5aef56329"
        },
        templateName: {
          value: "Desktop"
        },
        virtualTeamName: {
          value: "Chat_Queue"
        }
      },
      callAssociatedDetails: {
        ani: "janedoe@gmail.com",
        category: "Sales",
        customerName: "Jane Doe",
        dn: "Desktop",
        entryPointId: "AXCqFyz1G2pKap9PI-mW",
        guestId:
          "Y2lzY29zcGFyazovL3VzL1BFT1BMRS81NzNiODg1Mi1kZjM3LTRlODEtOGMxMi1mZjkyMTE3MmQ1NzY",
        mediaChannel: "web",
        reason: "Please help",
        reasonCode: "Sales",
        ronaTimeout: "30",
        roomTitle: "Help Jane Doe with Sales",
        taskToBeSelfServiced: "false",
        templateId: "b57990c0-5ec6-11ea-96ee-5df5aef56329",
        templateName: "Desktop",
        virtualTeamName: "Chat_Queue"
      },
      callFlowParams: {
        Automation: {
          description: "(vteam, A valid VTeam.)",
          name: "Automation",
          qualifier: "vteam",
          value: "3270",
          valueDataType: "string"
        },
        Debit: {
          description: "(vteam, A valid VTeam.)",
          name: "Debit",
          qualifier: "vteam",
          value: "3270",
          valueDataType: "string"
        },
        Sales: {
          description: "(vteam, A valid VTeam.)",
          name: "Sales",
          qualifier: "vteam",
          value: "3270",
          valueDataType: "string"
        }
      },
      callProcessingDetails: {
        QMgrName: "aqm",
        QueueId: "3270",
        ani: "janedoe@gmail.com",
        category: "Sales",
        customerName: "Jane Doe",
        dnis: "Desktop",
        entryPointId: "AXCqFyz1G2pKap9PI-mW",
        guestId:
          "Y2lzY29zcGFyazovL3VzL1BFT1BMRS81NzNiODg1Mi1kZjM3LTRlODEtOGMxMi1mZjkyMTE3MmQ1NzY",
        mediaChannel: "web",
        pauseDuration: "10",
        pauseResumeEnabled: "true",
        reason: "Please help",
        reasonCode: "Sales",
        ronaTimeout: "30",
        roomTitle: "Help Jane Doe with Sales",
        taskToBeSelfServiced: "false",
        templateId: "b57990c0-5ec6-11ea-96ee-5df5aef56329",
        templateName: "Desktop",
        tenantId: "133",
        virtualTeamName: "Chat_Queue",
        vteamId: "AXCqFyz1G2pKap9PI-mW"
      },
      contactDirection: {
        type: "INBOUND"
      },
      currentVTeam: "3270",
      interactionId: "a66d05ab-40ab-11eb-b59a-7d3326b3ffc1",
      isFcManaged: false,
      isTerminated: true,
      media: {},
      mediaChannel: "web",
      mediaType: "chat",
      orgId: "f111e3af-1a45-42ef-9erf-4562354b8a25",
      outboundType: null,
      owner: "7d12d9ea-e8e0-41ee-81bf-c11a685b64ed",
      participants: {
        "7d12d9ea-e8e0-41ee-81bf-c11a685b64ed": {
          channelId: "ff0a5296-8aa2-483b-8c50-577fedb1bfde",
          consultState: null,
          consultTimestamp: null,
          dn: "9997770110",
          hasJoined: true,
          id: "7d12d9ea-e8e0-41ee-81bf-c11a685b64ed",
          isConsulted: false,
          isWrapUp: false,
          joinTimestamp: 1608239195992,
          lastUpdated: 1608239195992,
          name: "uuip-agent4 uuip-agent4",
          pType: "Agent",
          queueId: "3270",
          queueMgrId: "aqm",
          sessionId: "b8c096ab-f9a0-49be-9efd-f8c78e1a7061",
          siteId: "473",
          teamId: "962",
          teamName: "Team X",
          type: "Agent",
          wrapUpTimestamp: null
        },
        "janedoe@gmail.com": {
          id: "janedoe@gmail.com",
          pType: "Customer",
          type: "Customer"
        }
      },
      previousVTeams: [],
      state: "connected"
    },
    interactionId: "a66d05ab-40ab-11eb-b59a-7d3326b3ffc1",
    mediaResourceId:
      "Y2lzY29zcGFyazovL3VzL1JPT00vYWEzNTA5YzAtNDBhYi0xMWViLWE1N2QtZWY2N2MwZTMyYmFh",
    orgId: "f111e3af-1a45-42ef-9erf-4562354b8a25",
    queueMgr: "aqm",
    trackingId: "4eb68870-40ac-11eb-8866-d7ef6ff89aa6",
    type: "ContactEnded"
  },
  orgId: "f111e3af-1a45-42ef-9erf-4562354b8a25",
  trackingId: "notifs_3cda2c34-1410-4476-9c5c-5d779a615b8a",
  type: "RoutingMessage"
};
buddyAgents()

Caution: This method will be deprecated in the future.

Fetches the list of agents available for consult call and conference call.

Example

await Desktop.agentContact.buddyAgents({
    data: {
        agentProfileId: "AXCLfZhH9S1oTdqE1OFw",
        channelName: "chat",
        state: "Available"
    }
});

The following table lists the payload details:

NameTypeDescriptionRequired
dataObjectOptions of the buddy agents.Yes
-->agentProfileIdStringUnique identifier of the agent profile.Yes
-->channelNameStringThe media channel type such as chat.Yes
-->stateStringThe agent availability status.Yes

Returns{Object} The object with the retrieved data.

Note: The type parameter value in the response payload depends on the success or failure of the method. If the method is successful, the value is BuddyAgents; else, BuddyAgentsRetrieveFailed.

Example Response

BuddyAgentResponse = {
  data: {
    agentId: "7c867aa9-ec768-341a-b767-e5hd6ae7g701",
    agentList: [],
    agentSessionId: "25f31485-f41c-4cca-abe5-e12b80735715",
    eventType: "AgentDesktopMessage",
    orgId: "f111e3af-1a45-42ef-9erf-4562354b8a25",
    trackingId: "1a2737c0-6704-11eb-9a89-971a3ca976b4",
    type: "BuddyAgents"
  },
  orgId: "f111e3af-1a45-42ef-9erf-4562354b8a25",
  trackingId: "notifs_49119bed-6dbc-48e6-89fa-9dde8da3fc3e",
  type: "BuddyAgents"
};
consult()

Caution: This method will be deprecated in the future.

Initiates a consult request with an agent, a dial number (DN), or a queue.

Note: The consult call to queue feature is enabled using the allowConsultToQueue payload. For more information, see Agent State Information Module.

Example

await Desktop.agentContact.consult({
    interactionId: “a26d035d - b547 - 11 ea - 984 b - d3128111ce6b”,
    data: {
        agentId: “43 bfcdef - 5551 - 45 b1 - a8f9 - a0b33e66e3fe”,
        destAgentId: “f795f41f - 3782 - 44 fa - 97 a4 - c8b4dc029477”,
        mediaType: “chat”
    },
    url: “consult”
});
// consult Payload Type
type ConsultPayload = {
    interactionId: string;
    data: ConsultPayload | ConsultDN | ConsultAgent | ConsultQueue;
    url: string;
}

type ConsultPayload = {
    agentId: string;
    destAgentId: string | undefined;
    mediaType ? : string | undefined;
}

type ConsultDN = {
    destAgentId: string;
    destinationType: string;
    mediaType: string;
    trackingId ? : string;
};

type ConsultAgent = {
    agentId: string;
    destAgentId: string;
    destAgentDN ? : string;
    destAgentTeamId ? : string;
    destSiteId ? : string;
    mediaType: string;
    trackingId: string;
};

type ConsultQueue = {
    agentId: string;
    queueId: string;
    trackingId: string;
};

The following table lists the payload details:

NameTypeDescriptionRequired
interactionIdStringUnique identifier for the user interaction.Yes
dataObjectOptions of the consult request.Yes
-->agentIdStringUnique identifier of the agent.Yes
-->destAgentIdStringUnique identifier of the consult request destination agent.Yes
-->mediaTypeStringThe media channel type such as chat.Yes
-->destinationTypeStringThe type of consult request to be placed. The destination type can be Agent, Queue, or DN.Yes
-->trackingIdStringUnique identifier based on the consult request type.Yes
-->destAgentDNStringThe dial number of the destination agent.Yes
-->destAgentTeamIdStringUnique identifier of the team to which the destination agent belongs.Yes
-->destSiteIdStringUnique identifier of the destination site.Yes
-->queueIdStringUnique identifier of the queue.Yes
urlStringThe URL of the consult. Example, consult, ctq.Yes

Returns{Object} The object with the retrieved data.

Note: The type parameter value in the response payload depends on the success or failure of the method. If the method is successful, the value is AgentConsultCreated; else, AgentCtqFailed or AgentConsultFailed.

Example Response

const consultResponse = {
  data: {
    agentId: "7d12d9ea-e8e0-41ee-81bf-c11a685b64ed",
    consultMediaResourceId:
      "consult_Y2lzY29zcGFyazovL3VzL1JPT00vNjJkYjBmMzAtNDBhZi0xMWViLWE3ZGItYjkyYTZkMmI5NTI1",
    destAgentId: "aad323de-32d8-48c9-af6b-b68dfbabfe20",
    destinationType: "Agent",
    eventType: "RoutingMessage",
    interaction: {
      callAssociatedData: {
        ani: {
          value: "janedoe@gmail.com"
        },
        category: {
          value: "Sales"
        },
        customerName: {
          value: "Jane Doe"
        },
        dn: {
          value: "Desktop"
        },
        entryPointId: {
          value: "AXCqFyz1G2pKap9PI-mW"
        },
        guestId: {
          value:
            "Y2lzY29zcGFyazovL3VzL1BFT1BMRS81NzNiODg1Mi1kZjM3LTRlODEtOGMxMi1mZjkyMTE3MmQ1NzY"
        },
        mediaChannel: {
          value: "web"
        },
        reason: {
          value: "test"
        },
        reasonCode: {
          value: "Sales"
        },
        ronaTimeout: {
          value: "30"
        },
        roomTitle: {
          value: "Help Jane Doe with Sales"
        },
        taskToBeSelfServiced: {
          value: "false"
        },
        templateId: {
          value: "b57990c0-5ec6-11ea-96ee-5df5aef56329"
        },
        templateName: {
          value: "Desktop"
        },
        virtualTeamName: {
          agentEditable: false,
          displayName: "virtualTeamName",
          name: "virtualTeamName",
          type: "STRING",
          value: "Chat_Queue"
        }
      },
      callAssociatedDetails: {
        ani: "janedoe@gmail.com",
        category: "Sales",
        customerName: "Jane Doe",
        dn: "Desktop",
        entryPointId: "AXCqFyz1G2pKap9PI-mW",
        guestId:
          "Y2lzY29zcGFyazovL3VzL1BFT1BMRS81NzNiODg1Mi1kZjM3LTRlODEtOGMxMi1mZjkyMTE3MmQ1NzY",
        mediaChannel: "web",
        reason: "test",
        reasonCode: "Sales",
        ronaTimeout: "30",
        roomTitle: "Help Jane Doe with Sales",
        taskToBeSelfServiced: "false",
        templateId: "b57990c0-5ec6-11ea-96ee-5df5aef56329",
        templateName: "Desktop",
        virtualTeamName: "Chat_Queue"
      },
      callFlowParams: {
        Automation: {
          description: "(vteam, A valid VTeam.)",
          name: "Automation",
          qualifier: "vteam",
          value: "3270",
          valueDataType: "string"
        },
        Debit: {
          description: "(vteam, A valid VTeam.)",
          name: "Debit",
          qualifier: "vteam",
          value: "3270",
          valueDataType: "string"
        },
        Sales: {
          description: "(vteam, A valid VTeam.)",
          name: "Sales",
          qualifier: "vteam",
          value: "3270",
          valueDataType: "string"
        }
      },
      callProcessingDetails: {
        QMgrName: "aqm",
        QueueId: "3270",
        ani: "janedoe@gmail.com",
        category: "Sales",
        customerName: "Jane Doe",
        dnis: "Desktop",
        entryPointId: "AXCqFyz1G2pKap9PI-mW",
        guestId:
          "Y2lzY29zcGFyazovL3VzL1BFT1BMRS81NzNiODg1Mi1kZjM3LTRlODEtOGMxMi1mZjkyMTE3MmQ1NzY",
        mediaChannel: "web",
        pauseDuration: "10",
        pauseResumeEnabled: "true",
        reason: "test",
        reasonCode: "Sales",
        ronaTimeout: "30",
        roomTitle: "Help Jane Doe with Sales",
        taskToBeSelfServiced: "false",
        templateId: "b57990c0-5ec6-11ea-96ee-5df5aef56329",
        templateName: "Desktop",
        tenantId: "133",
        virtualTeamName: "Chat_Queue",
        vteamId: "AXCqFyz1G2pKap9PI-mW"
      },
      contactDirection: {
        type: "INBOUND"
      },
      currentVTeam: "3270",
      interactionId: "5622d599-40af-11eb-8606-657fd6cc0548",
      isFcManaged: false,
      isTerminated: false,
      media: {
        Y2lzY29zcGFyazovL3VzL1JPT00vNjJkYjBmMzAtNDBhZi0xMWViLWE3ZGItYjkyYTZkMmI5NTI1:
          {
            holdTimestamp: null,
            isHold: false,
            mType: "mainCall",
            mediaMgr: "cmm",
            mediaResourceId:
              "Y2lzY29zcGFyazovL3VzL1JPT00vNjJkYjBmMzAtNDBhZi0xMWViLWE3ZGItYjkyYTZkMmI5NTI1",
            mediaType: "chat",
            participants: [
              "janedoe@gmail.com",
              "7d12d9ea-e8e0-41ee-81bf-c11a685b64ed"
            ]
          },
        consult_Y2lzY29zcGFyazovL3VzL1JPT00vNjJkYjBmMzAtNDBhZi0xMWViLWE3ZGItYjkyYTZkMmI5NTI1:
          {
            holdTimestamp: null,
            isHold: false,
            mType: "consult",
            mediaMgr: "cmm",
            mediaResourceId:
              "consult_Y2lzY29zcGFyazovL3VzL1JPT00vNjJkYjBmMzAtNDBhZi0xMWViLWE3ZGItYjkyYTZkMmI5NTI1",
            mediaType: "chat",
            participants: [
              "aad323de-32d8-48c9-af6b-b68dfbabfe20",
              "7d12d9ea-e8e0-41ee-81bf-c11a685b64ed"
            ]
          }
      },
      mediaChannel: "web",
      mediaType: "chat",
      orgId: "f111e3af-1a45-42ef-9erf-4562354b8a25",
      outboundType: null,
      owner: "7d12d9ea-e8e0-41ee-81bf-c11a685b64ed",
      participants: {
        "7d12d9ea-e8e0-41ee-81bf-c11a685b64ed": {
          channelId: "7272c119-821f-485a-b352-29be1f3f0fff",
          consultState: "consultInitiated",
          consultTimestamp: 1608240860457,
          dn: "9997770110",
          hasJoined: true,
          id: "7d12d9ea-e8e0-41ee-81bf-c11a685b64ed",
          isConsulted: false,
          isWrapUp: false,
          joinTimestamp: 1608240840633,
          lastUpdated: 1608240840633,
          name: "uuip-agent4 uuip-agent4",
          pType: "Agent",
          queueId: "3270",
          queueMgrId: "aqm",
          sessionId: "b8c096ab-f9a0-49be-9efd-f8c78e1a7061",
          siteId: "473",
          teamId: "962",
          teamName: "Team X",
          type: "Agent",
          wrapUpTimestamp: null
        },
        "aad323de-32d8-48c9-af6b-b68dfbabfe20": {
          channelId: "b1da7e42-2aeb-492b-ad06-115ba8dfa506",
          consultState: null,
          consultTimestamp: null,
          dn: "9997770109",
          hasJoined: false,
          id: "aad323de-32d8-48c9-af6b-b68dfbabfe20",
          isConsulted: true,
          isWrapUp: false,
          joinTimestamp: null,
          lastUpdated: 1608240860436,
          name: "uuip-agent2 uuip-agent2",
          pType: "Agent",
          queueId: "3270",
          queueMgrId: "aqm",
          sessionId: "3443f9d7-68de-42a0-a590-176a37a3565a",
          siteId: "473",
          teamId: "962",
          teamName: "Team X",
          type: "Agent",
          wrapUpTimestamp: null
        },
        "janedoe@gmail.com": {
          id: "janedoe@gmail.com",
          pType: "Customer",
          type: "Customer"
        }
      },
      previousVTeams: [],
      state: "consult"
    },
    interactionId: "5622d599-40af-11eb-8606-657fd6cc0548",
    mediaResourceId:
      "Y2lzY29zcGFyazovL3VzL1JPT00vNjJkYjBmMzAtNDBhZi0xMWViLWE3ZGItYjkyYTZkMmI5NTI1",
    orgId: "f111e3af-1a45-42ef-9erf-4562354b8a25",
    queueMgr: "aqm",
    trackingId: "9f682870-40af-11eb-bc9c-df3ff755538c",
    type: "AgentConsultCreated"
  },
  orgId: "f111e3af-1a45-42ef-9erf-4562354b8a25",
  trackingId: "notifs_6dc77353-e810-4751-82ac-dab03e3951c2",
  type: "RoutingMessage"
};
consultConference()

Caution: This method will be deprecated in the future.

Initiates a conference request with one of the agents from the list of buddyAgents.

Example

await Desktop.agentContact.consultConference({
    interactionId: “a26d035d - b547 - 11 ea - 984 b - d3128111ce6b”,
    data: {
        agentId: “43 bfcdef - 5551 - 45 b1 - a8f9 - a0b33e66e3fe”,
        destAgentId: “f795f41f - 3782 - 44 fa - 97 a4 - c8b4dc029477”,
        mediaType: “chat”
    }
});
// consult conference Payload Type

type ConsultConferencePayload = {
    interactionId: string;data: ConsultPayload | ConsultDN
}

type ConsultDN = {
    destAgentId: string;
    destinationType: string;
    mediaType: string;
    trackingId ? : string | undefined;
}

type ConsultPayload = {
    agentId: string;
    destAgentId: string | undefined;
    mediaType ? : string | undefined;
}

The following table lists the payload details:

NameTypeDescriptionRequired
interactionIdStringUnique identifier for the user interaction.Yes
dataObjectOptions of the conference request.Yes
-->agentIdStringUnique identifier of the agent.Yes
-->destAgentIdStringUnique identifier of the conference request destination agent.Yes
-->mediaTypeStringThe media channel type such as chat.Yes
-->destinationTypeStringThe type of consult conference request to be placed. The destination type can be Agent, Queue, or DN.Yes
-->trackingIdStringUnique identifier based on the conference request type.Yes

Returns{Object} The object with the retrieved data.

Note: The type parameter value in the response payload depends on the success or failure of the method. If the method is successful, the value isAgentConsultConferenced; else, AgentConsultConferenceFailed.

Example Response

const consultConferenceResponse = {
  data: {
    agentId: "337c1cca-d79b-44fc-8d8e-20d1b5e4dadf",
    consultMediaResourceId:
      "consult_Y2lzY29zcGFyazovL3VzL1JPT00vNGQ5NGJmMjAtYjYwZi0xMWVhLTk0YjAtNzdjZDBkYWVjNDA1",
    destAgentId: "cdf786ef-3285-4b2f-8ef9-3cf8a4c755c2",
    destinationType: "Agent",
    eventType: "RoutingMessage",
    interaction: {
      callAssociatedData: {
        ani: {
          agentEditable: false,
          displayName: "ani",
          name: "ani",
          type: "STRING",
          value: "displayName"
        },
        appUser: {
          agentEditable: false,
          displayName: "appUser",
          name: "appUser",
          type: "STRING",
          value: "appuser-1212"
        },
        customerName: {
          agentEditable: false,
          displayName: "customerName",
          name: "customerName",
          type: "STRING",
          value: "displayName"
        },
        dn: {
          agentEditable: false,
          displayName: "dn",
          name: "dn",
          type: "STRING",
          value: "AXVP2lxF0G6K4V3pFKRG"
        },
        ronaTimeout: {
          agentEditable: false,
          displayName: "ronaTimeout",
          name: "ronaTimeout",
          type: "STRING",
          value: "30"
        },
        virtualTeamName: {
          agentEditable: false,
          displayName: "virtualTeamName",
          name: "virtualTeamName",
          type: "STRING",
          value: "QA-e2e-SocialQueue"
        }
      },
      callAssociatedDetails: {
        ani: "***********",
        appUser: "appuser-1212",
        customerName: "displayName",
        dn: "********************",
        ronaTimeout: "30",
        virtualTeamName: "QA-e2e-SocialQueue"
      },
      callFlowParams: {},
      callProcessingDetails: {
        QMgrName: "aqm",
        QueueId: "5134",
        ani: "***********",
        appUser: "appuser-1212",
        customerName: "displayName",
        dnis: "********************",
        pauseDuration: "30",
        pauseResumeEnabled: "true",
        ronaTimeout: "30",
        taskToBeSelfServiced: "false",
        tenantId: "82",
        virtualTeamName: "QA-e2e-SocialQueue",
        vteamId: "5134"
      },
      contactDirection: {
        type: "INBOUND"
      },
      currentVTeam: "5134",
      interactionId: "1da228dc-66cc-11eb-b852-ed71847d1aec",
      isFcManaged: false,
      isTerminated: false,
      media: {
        Y2lzY29zcGFyazovL3VzL1JPT00vNGQ5NGJmMjAtYjYwZi0xMWVhLTk0YjAtNzdjZDBkYWVjNDA1:
          {
            holdTimestamp: null,
            isHold: false,
            mType: "mainCall",
            mediaMgr: "socialmm",
            mediaResourceId:
              "Y2lzY29zcGFyazovL3VzL1JPT00vNGQ5NGJmMjAtYjYwZi0xMWVhLTk0YjAtNzdjZDBkYWVjNDA1",
            mediaType: "social",
            participants: [
              "displayName",
              "337c1cca-d79b-44fc-8d8e-20d1b5e4dadf",
              "cdf786ef-3285-4b2f-8ef9-3cf8a4c755c2"
            ]
          },
        consult_Y2lzY29zcGFyazovL3VzL1JPT00vNGQ5NGJmMjAtYjYwZi0xMWVhLTk0YjAtNzdjZDBkYWVjNDA1:
          {
            holdTimestamp: null,
            isHold: false,
            mType: "consult",
            mediaMgr: "socialmm",
            mediaResourceId:
              "consult_Y2lzY29zcGFyazovL3VzL1JPT00vNGQ5NGJmMjAtYjYwZi0xMWVhLTk0YjAtNzdjZDBkYWVjNDA1",
            mediaType: "social",
            participants: [
              "cdf786ef-3285-4b2f-8ef9-3cf8a4c755c2",
              "337c1cca-d79b-44fc-8d8e-20d1b5e4dadf",
              "cdf786ef-3285-4b2f-8ef9-3cf8a4c755c2"
            ]
          }
      },
      mediaChannel: "type",
      mediaType: "social",
      orgId: "f111e3af-1a45-42ef-9erf-4562354b8a25",
      outboundType: null,
      owner: "337c1cca-d79b-44fc-8d8e-20d1b5e4dadf",
      participants: {
        "337c1cca-d79b-44fc-8d8e-20d1b5e4dadf": {
          channelId: "e08a6068-688d-472b-887b-1c5d39c7155f",
          consultState: "conferencing",
          consultTimestamp: 1612431260416,
          dn: "*****",
          hasJoined: true,
          id: "337c1cca-d79b-44fc-8d8e-20d1b5e4dadf",
          isConsulted: false,
          isWrapUp: false,
          joinTimestamp: 1612431253790,
          lastUpdated: 1612431253790,
          name: "social-agent2",
          pType: "Agent",
          queueId: "5134",
          queueMgrId: "aqm",
          sessionId: "a9aa9867-e62f-4415-9ea4-6babace39d4f",
          siteId: "205",
          teamId: "384",
          teamName: "TeamSales",
          type: "Agent",
          wrapUpTimestamp: null
        },
        "cdf786ef-3285-4b2f-8ef9-3cf8a4c755c2": {
          channelId: "841235e4-7052-455b-be64-30f2f3c4a59b",
          consultState: "conferencing",
          consultTimestamp: 1612431260416,
          dn: "*****",
          hasJoined: true,
          id: "cdf786ef-3285-4b2f-8ef9-3cf8a4c755c2",
          isConsulted: true,
          isWrapUp: false,
          joinTimestamp: 1612431258137,
          lastUpdated: 1612431258137,
          name: "social-agent1",
          pType: "Agent",
          queueId: "5134",
          queueMgrId: "aqm",
          sessionId: "600e7ebb-20aa-4c91-a4f0-ebc596249603",
          siteId: "205",
          teamId: "384",
          teamName: "TeamSales",
          type: "Agent",
          wrapUpTimestamp: null
        },
        displayName: {
          id: "displayName",
          pType: "Customer",
          type: "Customer"
        }
      },
      previousVTeams: ["AXVP2lxF0G6K4V3pFKRG"],
      state: "conference",
      workflowManager: null
    },
    interactionId: "1da228dc-66cc-11eb-b852-ed71847d1aec",
    mediaResourceId:
      "Y2lzY29zcGFyazovL3VzL1JPT00vNGQ5NGJmMjAtYjYwZi0xMWVhLTk0YjAtNzdjZDBkYWVjNDA1",
    orgId: "f111e3af-1a45-42ef-9erf-4562354b8a25",
    queueMgr: "aqm",
    trackingId: "4a958ace-49a2-49aa-b2e5-8798ede03f13",
    type: "AgentConsultConferenced"
  },
  orgId: "f111e3af-1a45-42ef-9erf-4562354b8a25",
  trackingId: "notifs_68c519c8-04f5-48b4-a5cf-609a09ccd765",
  type: "RoutingMessage"
};
consultEnd()

Caution: This method will be deprecated in the future.

Ends a consult request. Note: The end consult call feature is enabled using the isEndConsultEnabled payload. For more information, see Agent State Information Module.

Example

await Desktop.agentContact.consultEnd({
    interactionId: “a26d035d - b547 - 11 ea - 984 b - d3128111ce6b”,
    isConsult: false
});

// Consult end payload type
{
    interactionId: string;isConsult: boolean
}

The following table lists the payload details:

NameTypeDescriptionRequired
interactionIdStringUnique identifier for the user interaction.Yes
isConsultBooleanDetermines whether the task request is consult or not.

- True—The task request is consult.
- False—The task request is not consult.
Yes

Returns{Object} The object with the retrieved data.

Note: The type parameter value in the response payload depends on the success or failure of the method. If the method is successful, and isConsult is true, the value is AgentConsultEnded; else, AgentConsultConferenceEnded. If the method is unsuccessful, the value is AgentConsultEndFailed.

Example Response

const consultEndResponse = {
  data: {
    agentId: "7c867aa9-ec768-341a-b767-e5hd6ae7g701",
    consultMediaResourceId: "f23b5b8a-4b02-451e-b9f5-8517b5bef97c",
    destAgentId: "9fca6158-a8bd-43e6-aeba-e5055aea08c5",
    destinationType: "Agent",
    eventType: "RoutingMessage",
    interaction: {
      callAssociatedData: {
        dn: {
          agentEditable: false,
          displayName: "dn",
          name: "dn",
          type: "STRING",
          value: "8895579172"
        },
        ronaTimeout: {
          agentEditable: false,
          displayName: "ronaTimeout",
          name: "ronaTimeout",
          type: "STRING",
          value: "30"
        },
        virtualTeamName: {
          agentEditable: false,
          displayName: "virtualTeamName",
          name: "virtualTeamName",
          type: "STRING",
          value: "Outdial Queue-1"
        }
      },
      callAssociatedDetails: {
        dn: "8895579172",
        ronaTimeout: "30",
        virtualTeamName: "Outdial Queue-1"
      },
      callFlowParams: {
        OutdialQueue: {
          description: "(vteam, The Outdial Queue.)",
          name: "OutdialQueue",
          qualifier: "vteam",
          value: "3264",
          valueDataType: "string"
        }
      },
      callProcessingDetails: {
        QMgrName: "aqm",
        QueueId: "3264",
        dnis: "8895579172",
        isPaused: "false",
        outdialTransferToQueueEnabled: "false",
        pauseDuration: "10",
        pauseResumeEnabled: "true",
        recordInProgress: "true",
        ronaTimeout: "30",
        taskToBeSelfServiced: "false",
        tenantId: "133",
        virtualTeamName: "Outdial Queue-1",
        vteamId: "AXCLfZZU9S1oTdqE1OFZ"
      },
      contactDirection: {
        type: "OUTBOUND"
      },
      currentVTeam: "3264",
      interactionId: "1dd08726-bca5-4ce8-9b51-b20dca8ab154",
      isFcManaged: false,
      isTerminated: false,
      media: {
        "1dd08726-bca5-4ce8-9b51-b20dca8ab154": {
          holdTimestamp: 1612356600241,
          isHold: true,
          mType: "mainCall",
          mediaMgr: "vmm",
          mediaResourceId: "1dd08726-bca5-4ce8-9b51-b20dca8ab154",
          mediaType: "telephony",
          participants: [""]
        }
      },
      mediaChannel: "dialer",
      mediaType: "telephony",
      orgId: "f111e3af-1a45-42ef-9erf-4562354b8a25",
      outboundType: "OUTDIAL",
      owner: "7c867aa9-ec768-341a-b767-e5hd6ae7g701",
      participants: {
        "": {
          id: "",
          pType: "Customer",
          type: "Customer"
        },
        "7c867aa9-ec768-341a-b767-e5hd6ae7g701": {
          channelId: "0717a2ce-76cd-4ba4-9053-71f2c78168b8",
          consultState: null,
          consultTimestamp: null,
          dn: "8895579172",
          hasJoined: true,
          id: "7c867aa9-ec768-341a-b767-e5hd6ae7g701",
          isConsulted: false,
          isWrapUp: false,
          joinTimestamp: 1612354635705,
          lastUpdated: 1612354635705,
          name: "John Doe",
          pType: "Agent",
          queueId: "3264",
          queueMgrId: "aqm",
          sessionId: "3d017488-527a-4e89-9313-5d4eb353c789",
          siteId: "472",
          teamId: "960",
          teamName: "Email_Team",
          type: "Agent",
          wrapUpTimestamp: null
        }
      },
      previousVTeams: [],
      state: "connected",
      workflowManager: null
    },
    interactionId: "1dd08726-bca5-4ce8-9b51-b20dca8ab154",
    orgId: "f111e3af-1a45-42ef-9erf-4562354b8a25",
    queueMgr: "aqm",
    trackingId: "f7c7ecd2-ef27-4273-bc11-1543bddc8810",
    type: "AgentConsultEnded"
  },
  orgId: "f111e3af-1a45-42ef-9erf-4562354b8a25",
  trackingId: "notifs_860d1e16-88b8-4d6c-8bac-18075d72a7e8",
  type: "RoutingMessage"
};
decline()

Declines a consult request.

Example

await Desktop.agentContact.decline({
    interactionId: “c837e6f7 - 699 a - 4736 - bb82 - 03 a6d58bb7f3”;
    data: {
        mediaResourceId: “c837e6f7 - 699 a - 4736 - bb82 - 03 a6d58bb7f3”
    }
    isConsult: true;
});

// Decline payload type
{
    interactionId: string;
    data: Contact.declinePayload;
    isConsult: boolean
}

type declinePayload = {
    mediaResourceId: string;
}

The following table lists the payload details:

NameTypeDescriptionRequired
interactionIdStringUnique identifier for the user interaction.Yes
isConsultBooleanDetermines whether the task request is consult or not.

- True—The task request is consult.
- False—The task request is not consult.
Yes

Returns{Object} The object with the retrieved data.

Note: The type parameter value in the response payload depends on the success or failure of the method. If the method is successful, and isConsult is true, the value is AgentConsultFailed; else, AgentOfferContactRona.

Example Response

const declineResponse = {
  data: {
    agentId: "7c867aa9-ec768-341a-b767-e5hd6ae7g701",
    destAgentId: "f795f41f-3782-44fa-97a4-c8b4dc029477",
    destinationType: "Agent",
    eventType: "RoutingMessage",
    interaction: {
      callAssociatedData: {},
      callAssociatedDetails: {},
      callFlowParams: {},
      callProcessingDetails: {},
      contactDirection: {
        type: "INBOUND"
      },
      currentVTeam: "",
      interactionId: "9ad96648-415b-11eb-881c-ed6dd0d45a04",
      isFcManaged: false,
      isTerminated: false,
      media: {},
      mediaChannel: "none",
      mediaType: "none",
      orgId: "f111e3af-1a45-42ef-9erf-4562354b8a25",
      outboundType: null,
      owner: null,
      participants: {},
      previousVTeams: [],
      state: "none",
      workflowManager: null
    },
    interactionId: "a26d035d-b547-11ea-984b-d3128111ce6b",
    orgId: "f111e3af-1a45-42ef-9erf-4562354b8a25",
    queueMgr: "aqm",
    reason: "Test",
    reasonCode: 500,
    trackingId: "2037cb70-653d-11eb-8a11-a3c35f103d4b",
    type: "AgentConsultFailed"
  },
  orgId: "f111e3af-1a45-42ef-9erf-4562354b8a25",
  trackingId: "notifs_a241b1c4-3d42-4ad0-8738-71b1e7611550",
  type: "RoutingMessage"
};
cancelCtq()

Cancels a consult to queue request.

Example

await Desktop.agentContact.cancelCtq({
    interactionId: “a26d035d - b547 - 11 ea - 984 b - d3128111ce6b”,
    data: {
        agentId: “f795f41f - 3782 - 44 fa - 97 a4 - c8b4dc029477”,
        queueId: "3268"
    }
});

// cancelCtq Payload
{
    interactionId: string;data: Contact.cancelCtq
}

The following table lists the payload details:

NameTypeDescriptionRequired
interactionIdStringUnique identifier for the user interaction.Yes
dataObjectOptions of the consult to queue request.Yes
-->agentIdStringUnique identifier of the agent.Yes
-->queueIdStringUnique identifier of the queue.Yes

Returns{Object} The object with the retrieved data.

Note: The type parameter value in the response payload depends on the success or failure of the method. If the method is successful, the value is AgentCtqCancelled; else, AgentCtqCancelFailed.

Example Response

const cancelCtqResponse = {
  data: {
    agentId: "a96ffe92-f5c8-4715-9427-fa32a7e57ccc",
    eventType: "RoutingMessage",
    interaction: {
      callAssociatedData: {},
      callAssociatedDetails: {},
      callFlowParams: {},
      callProcessingDetails: {},
      contactDirection: {
        type: "INBOUND"
      },
      currentVTeam: "",
      interactionId: "9ad96648-415b-11eb-881c-ed6dd0d45a04",
      isFcManaged: false,
      isTerminated: false,
      media: {},
      mediaChannel: "none",
      mediaType: "none",
      orgId: "f111e3af-1a45-42ef-9erf-4562354b8a25",
      outboundType: null,
      owner: null,
      participants: {},
      previousVTeams: [],
      state: "none"
    },
    interactionId: "c8e35eec-a977-409b-922d-7d2825c63cf2",
    orgId: "f111e3af-1a45-42ef-9erf-4562354b8a25",
    queueId: "7352",
    queueMgr: "aqm",
    trackingId: "ee2bc7e0-50c8-11eb-a1f8-5d0ad357b8a5",
    type: "AgentCtqCancelled"
  },
  orgId: "f111e3af-1a45-42ef-9erf-4562354b8a25",
  trackingId: "notifs_908141bb-3f1f-43fe-b7e2-5a132c97745f",
  type: "RoutingMessage"
};
wrapup()

Caution: This method will be deprecated in the future.

Wraps up work for a task. Wrap up reason is applied after the task has been ended either by the agent or by the customer. A wrap up is essential and is the last step in an agent's flow of handling tasks.

Example

await Desktop.agentContact.wrapup({
    interactionId: “dab1a2f0 - bad0 - 11 ea - 8e7 c - 0 d99ede2535a”,
    data: {
        wrapUpReason: "Sales";
        auxCodeId: "AXUH3oN12eV-WekpnDpl";
        isAutoWrapup: "false";
    }
});

// Wrap Payload Type

{
    interactionId: string;data: Contact.WrapupPayLoad
}

The following table lists the payload details:

NameTypeDescriptionRequired
interactionIdStringUnique identifier for the user interaction.Yes
dataObjectOptions of the wrap up.Yes
-->wrapUpReasonStringEvery wrap up reason will have an unique auxillary code. Use this field to specify the reason for wrapping up the call, maximum length 128 characters.Yes
-->auxCodeIdStringAuxiliary codes are status codes which an agent can select in Webex Contact Center Agent Desktop. They are of two types: Idle and Wrap-Up codes, and every agent profile must have one of each for the agent to use. Wrap-up codes indicate the result of customer contacts, such as successful resolution or escalation of the contact. Creating and managing auxiliary codes requires an administrator role and the appropriate cjp:config_write or cjp:config_read scopes, maximum length 36 characters.Yes
-->isAutoWrapupBooleanDetermines whether the auto wrap up is enabled or not.

- True—The auto warp up is enabled.
- False—The auto warp up is disabled.
Yes

Returns{Object} The object with the retrieved data.

Note: The type parameter value in the response payload depends on the success or failure of the method. If the method is successful, the value is AgentWrappedUp; else, AgentWrapupFailed.

Example Response

const wrapUpResponse = {
    "data": {
        "agentId": "7d12d9ea-e8e0-41ee-81bf-c11a685b64ed",
        "eventType": "RoutingMessage",
        "interaction": {
            "callAssociatedData": {
                "ani": {
                    "value": "janedoe@gmail.com"
                },
                "category": {
                    "value": "Sales"
                },
                "customerName": {
                    "value": "Jane Doe"
                },
                "dn": {
                    "value": "Desktop"
                },
                "entryPointId": {
                    "value": "AXCqFyz1G2pKap9PI-mW"
                },
                "guestId": {
                    "value": "Y2lzY29zcGFyazovL3VzL1BFT1BMRS81NzNiODg1Mi1kZjM3LTRlODEtOGMxMi1mZjkyMTE3MmQ1NzY"
                },
                "mediaChannel": {
                    "value": "web"
                },
                "reason": {
                    ,
                    "value": "Test"
                },
                "reasonCode": {
                    "value": "Sales"
                },
                "ronaTimeout": {
                    "value": "30"
                },
                "roomTitle": {
                    "value": "Help Jane Doe with Sales"
                },
                "taskToBeSelfServiced": {
                    "value": "false"
                },
                "templateId": {
                    "value": "b57990c0-5ec6-11ea-96ee-5df5aef56329"
                },
                "templateName": {
                    "value": "Desktop"
                },
                "virtualTeamName": {
                    "value": "Chat_Queue"
                }
            },
            "callAssociatedDetails": {
                "ani": "janedoe@gmail.com",
                "category": "Sales",
                "customerName": "Jane Doe",
                "dn": "Desktop",
                "entryPointId": "AXCqFyz1G2pKap9PI-mW",
                "guestId": "Y2lzY29zcGFyazovL3VzL1BFT1BMRS81NzNiODg1Mi1kZjM3LTRlODEtOGMxMi1mZjkyMTE3MmQ1NzY",
                "mediaChannel": "web",
                "reason": "Test",
                "reasonCode": "Sales",
                "ronaTimeout": "30",
                "roomTitle": "Help Jane Doe with Sales",
                "taskToBeSelfServiced": "false",
                "templateId": "b57990c0-5ec6-11ea-96ee-5df5aef56329",
                "templateName": "Desktop",
                "virtualTeamName": "Chat_Queue"
            },
            "callFlowParams": {
                "Automation": {
                    "description": "(vteam, A valid VTeam.)",
                    "name": "Automation",
                    "qualifier": "vteam",
                    "value": "3270",
                    "valueDataType": "string"
                },
                "Debit": {
                    "description": "(vteam, A valid VTeam.)",
                    "name": "Debit",
                    "qualifier": "vteam",
                    "value": "3270",
                    "valueDataType": "string"
                },
                "Sales": {
                    "description": "(vteam, A valid VTeam.)",
                    "name": "Sales",
                    "qualifier": "vteam",
                    "value": "3270",
                    "valueDataType": "string"
                }
            },
            "callProcessingDetails": {
                "QMgrName": "aqm",
                "QueueId": "3270",
                "ani": "janedoe@gmail.com",
                "category": "Sales",
                "customerName": "Jane Doe",
                "dnis": "Desktop",
                "entryPointId": "AXCqFyz1G2pKap9PI-mW",
                "guestId": "Y2lzY29zcGFyazovL3VzL1BFT1BMRS81NzNiODg1Mi1kZjM3LTRlODEtOGMxMi1mZjkyMTE3MmQ1NzY",
                "mediaChannel": "web",
                "pauseDuration": "10",
                "pauseResumeEnabled": "true",
                "reason": "Test",
                "reasonCode": "Sales",
                "ronaTimeout": "30",
                "roomTitle": "Help Jane Doe with Sales",
                "taskToBeSelfServiced": "false",
                "templateId": "b57990c0-5ec6-11ea-96ee-5df5aef56329",
                "templateName": "Desktop",
                "tenantId": "133",
                "virtualTeamName": "Chat_Queue",
                "vteamId": "AXCqFyz1G2pKap9PI-mW"
            },
            "contactDirection": {
                "type": "INBOUND"
            },
            "currentVTeam": "3270",
            "interactionId": "a66d05ab-40ab-11eb-b59a-7d3326b3ffc1",
            "isFcManaged": false,
            "isTerminated": true,
            "media": {},
            "mediaChannel": "web",
            "mediaType": "chat",
            "orgId": "f111e3af-1a45-42ef-9erf-4562354b8a25",
            "outboundType": null,
            "owner": "7d12d9ea-e8e0-41ee-81bf-c11a685b64ed",
            "participants": {
                "janedoe@gmail.com": {
                    "id": "janedoe@gmail.com",
                    "pType": "Customer",
                    "type": "Customer"
                }
            },
            "previousVTeams": [],
            "state": "connected"
        },
        "interactionId": "a66d05ab-40ab-11eb-b59a-7d3326b3ffc1",
        "orgId": "f111e3af-1a45-42ef-9erf-4562354b8a25",
        "queueMgr": "aqm",
        "trackingId": "5272a610-40ac-11eb-8866-d7ef6ff89aa6",
        "type": "AgentWrappedUp",
        "wrapUpAuxCodeId": "0"
    },
    "orgId": "f111e3af-1a45-42ef-9erf-4562354b8a25",
    "trackingId": "notifs_b5e0ebb7-fd1d-479f-8663-81a64030cee6",
    "type": "RoutingMessage"
}
vTeamList()

Retrieves a list of vTeams (queues) available for transfer. Instead of transferring your interaction to a particular agent, you can transfer it to an appropriate queue (vTeam).

Example

await Desktop.agentContact.vteamList({
    data: {
        agentProfileId: “AXCLfZhH9S1oTdqE1OFw”,
        agentSessionId: “5 a84d32c - 691 b - 4500 - b163 - d6cdba2a3163”,
        channelType: “chat”,
        type: “inboundqueue”
        trackingId: "9c9b97e0-4194-11eb-b819-7b8dd50ee0cd",
    };
});

// Vteam List Payload Type
{
    data: Contact.VTeam
}

The following table lists the payload details:

NameTypeDescriptionRequired
dataObjectOptions of the list of queues available for transfer.Yes
-->agentProfileIdStringUnique identifier of the agent profile.Yes
-->agentSessionIdStringUnique identifier of the agent session.Yes
-->channelTypeStringThe media channel type such as chat.Yes
-->typeStringThe type of queue list.Yes
-->trackingIdStringUnique identifier based on the queue list available for transfer.Yes

Returns{Object} The object with the retrieved data.

Note: The type parameter value in the response payload depends on the success or failure of the method. If the method is successful, the value is VteamList; else, VteamListFailed.

Example Response

const vTeamResponse = {
  data: {
    agentSessionId: "5a84d32c-691b-4500-b163-d6cdba2a3163",
    callData: "",
    data: {
      allowConsultToQueue: true,
      vteamList: [
        {
          analyzerId: "AXT3_BAV0G6K4V3p9euK",
          callDistributionGroups: [],
          channelType: "chat",
          id: "7178",
          maxTimeInQueue: 500,
          name: "Chat_Demo",
          routingType: null,
          skillBasedRoutingType: null,
          type: "inboundqueue"
        },
        {
          analyzerId: "AXNSDOdSQJBc-emowhp3",
          callDistributionGroups: [],
          channelType: "chat",
          id: "5900",
          maxTimeInQueue: 500,
          name: "Chat_Automation_Queue",
          routingType: null,
          skillBasedRoutingType: null,
          type: "inboundqueue"
        },
        {
          analyzerId: "AXDiuOLjKin42Ov3QJXN",
          callDistributionGroups: [],
          channelType: "chat",
          id: "3381",
          maxTimeInQueue: 500,
          name: "Dont_delete_Chat_queue",
          routingType: null,
          skillBasedRoutingType: null,
          type: "inboundqueue"
        },
        {
          analyzerId: "AXCZ1Cc0B023QCbPLXpr",
          callDistributionGroups: [],
          channelType: "chat",
          id: "3270",
          maxTimeInQueue: 500,
          name: "Chat_Queue",
          routingType: null,
          skillBasedRoutingType: null,
          type: "inboundqueue"
        }
      ]
    },
    jsMethod: "vteamListChanged"
  },
  orgId: "f111e3af-1a45-42ef-9erf-4562354b8a25",
  trackingId: "notifs_0e6eff89-165e-46b6-8c85-1aada01dab82",
  type: "VteamList"
};
vTeamTransfer()

Caution: This method will be deprecated in the future.

Initiates a vTeam transfer request.

Example

await Desktop.agentContact.vteamTransfer({
    interactionId: “dab1a2f0 - bad0 - 11 ea - 8e7 c - 0 d99ede2535a”,
    data: {
        vteamId: "AXDiuOLjKin42Ov3QJXN",
        vteamType: "inboundqueue"
    }
});

// Vteam Transfer Payload Type

{
    interactionId: string;
    data: Contact.vteamTransferPayLoad
}

type vteamTransferPayLoad = {
    vteamId: string;
    vteamType: string;
}

The following table lists the payload details:

NameTypeDescriptionRequired
interactionIdStringUnique identifier for the user interaction.Yes
dataObjectOptions of the vTeam transfer request.Yes
-->vteamIdStringvTeam unique identifier.Yes
-->vteamTypeStringvTeam transfer type.
- inboundentrypoint: Indicates transfer to an entry point.
- inboundqueue: Indicates transfer to a queue.
Yes

Returns{Object} The object with the retrieved data.

Note: The type parameter value in the response payload depends on the success or failure of the method. If the method is successful, the value is AgentVteamTransferred; else, AgentVteamTransferFailed.

Example Response

const vTeamTransferResponse = {
        "agentId": "7d12d9ea-e8e0-41ee-81bf-c11a685b64ed",
        "eventType": "RoutingMessage",
        "interaction": {
            "callAssociatedData": {
                "ani": {
                    "value": "janedoe@gmail.com"
                },
                "category": {
                    "value": "Sales"
                },
                "customerName": {
                    "value": "Jane Doe"
                },
                "dn": {
                    "value": "Desktop"
                },
                "entryPointId": {
                    "value": "AXCqFyz1G2pKap9PI-mW"
                },
                "guestId": {
                    "value": "Y2lzY29zcGFyazovL3VzL1BFT1BMRS81NzNiODg1Mi1kZjM3LTRlODEtOGMxMi1mZjkyMTE3MmQ1NzY"
                },
                "mediaChannel": {
                    "value": "web"
                },
                "reason": {
                    "value": "Test"
                },
                "reasonCode": {
                    "value": "Sales"
                },
                "ronaTimeout": {
                    "value": "30"
                },
                "roomTitle": {
                    "value": "Help Jane Doe with Sales"
                },
                "taskToBeSelfServiced": {
                    "value": "false"
                },
                "templateId": {
                    "value": "b57990c0-5ec6-11ea-96ee-5df5aef56329"
                },
                "templateName": {
                    "value": "Desktop"
                },
                "virtualTeamName": {
                    "value": "Chat_Queue"
                }
            },
            "callAssociatedDetails": {
                "ani": "janedoe@gmail.com",
                "category": "Sales",
                "customerName": "Jane Doe",
                "dn": "Desktop",
                "entryPointId": "AXCqFyz1G2pKap9PI-mW",
                "guestId": "Y2lzY29zcGFyazovL3VzL1BFT1BMRS81NzNiODg1Mi1kZjM3LTRlODEtOGMxMi1mZjkyMTE3MmQ1NzY",
                "mediaChannel": "web",
                "reason": "Test",
                "reasonCode": "Sales",
                "ronaTimeout": "30",
                "roomTitle": "Help Jane Doe with Sales",
                "taskToBeSelfServiced": "false",
                "templateId": "b57990c0-5ec6-11ea-96ee-5df5aef56329",
                "templateName": "Desktop",
                "virtualTeamName": "Chat_Queue"
            },
            "callFlowParams": {
                "Automation": {
                    "description": "(vteam, A valid VTeam.)",
                    "name": "Automation",
                    "qualifier": "vteam",
                    "value": "3270",
                    "valueDataType": "string"
                },
                "Debit": {
                    "description": "(vteam, A valid VTeam.)",
                    "name": "Debit",
                    "qualifier": "vteam",
                    "value": "3270",
                    "valueDataType": "string"
                },
                "Sales": {
                    "description": "(vteam, A valid VTeam.)",
                    "name": "Sales",
                    "qualifier": "vteam",
                    "value": "3270",
                    "valueDataType": "string"
                }
            },
            "callProcessingDetails": {
                "QMgrName": "aqm",
                "QueueId": "3270",
                "ani": "janedoe@gmail.com",
                "category": "Sales",
                "customerName": "Jane Doe",
                "dnis": "Desktop",
                "doNotRouteToAgents": "7d12d9ea-e8e0-41ee-81bf-c11a685b64ed",
                "entryPointId": "AXCqFyz1G2pKap9PI-mW",
                "guestId": "Y2lzY29zcGFyazovL3VzL1BFT1BMRS81NzNiODg1Mi1kZjM3LTRlODEtOGMxMi1mZjkyMTE3MmQ1NzY",
                "mediaChannel": "web",
                "pauseDuration": "10",
                "pauseResumeEnabled": "true",
                "reason": "Test",
                "reasonCode": "Sales",
                "ronaTimeout": "30",
                "roomTitle": "Help Jane Doe with Sales",
                "taskToBeSelfServiced": "false",
                "templateId": "b57990c0-5ec6-11ea-96ee-5df5aef56329",
                "templateName": "Desktop",
                "tenantId": "133",
                "virtualTeamName": "Chat_Queue",
                "vteamId": "7178",
                "vteamType": "inboundqueue"
            },
            "contactDirection": {
                "type": "INBOUND"
            },
            "currentVTeam": "7178",
            "interactionId": "29bafa9c-40b5-11eb-8606-edd437f1b927",
            "isFcManaged": false,
            "isTerminated": false,
            "media": {
                "Y2lzY29zcGFyazovL3VzL1JPT00vMmNiMTMwMDAtNDBiNS0xMWViLWE4M2ItZWI4ZTQwMDk1MDk5": {
                    "holdTimestamp": null,
                    "isHold": false,
                    "mType": "mainCall",
                    "mediaMgr": "cmm",
                    "mediaResourceId": "Y2lzY29zcGFyazovL3VzL1JPT00vMmNiMTMwMDAtNDBiNS0xMWViLWE4M2ItZWI4ZTQwMDk1MDk5",
                    "mediaType": "chat",
                    "participants": ["janedoe@gmail.com", "7d12d9ea-e8e0-41ee-81bf-c11a685b64ed"]
                }
            },
            "mediaChannel": "web",
            "mediaType": "chat",
            "orgId": "f111e3af-1a45-42ef-9erf-4562354b8a25",
            "outboundType": null,
            "owner": null,
            "participants": {
                "7d12d9ea-e8e0-41ee-81bf-c11a685b64ed": {
                    "channelId": "ccbffa6f-4322-4e06-850f-e0ab2915f238",
                    "consultState": null,
                    "consultTimestamp": null,
                    "dn": "9997770110",
                    "hasJoined": true,
                    "id": "7d12d9ea-e8e0-41ee-81bf-c11a685b64ed",
                    "isConsulted": false,
                    "isWrapUp": true,
                    "joinTimestamp": 1608243279477,
                    "lastUpdated": 1608254153975,
                    "name": "FirstName LastName",
                    "pType": "Agent",
                    "queueId": "3270",
                    "queueMgrId": "aqm",
                    "sessionId": "b8c096ab-f9a0-49be-9efd-f8c78e1a7061",
                    "siteId": "473",
                    "teamId": "962",
                    "teamName": "Team X",
                    "type": "Agent",
                    "wrapUpTimestamp": 1608254153975
                },
                "janedoe@gmail.com": {
                    "id": "janedoe@gmail.com",
                    "pType": "Customer",
                    "type": "Customer"
                }
            },
            "previousVTeams": ["3270"],
            "state": "new"
        },
        "interactionId": "29bafa9c-40b5-11eb-8606-edd437f1b927",
        "orgId": "f111e3af-1a45-42ef-9erf-4562354b8a25",
        "queueMgr": "aqm",
        "trackingId": "91480930-40ce-11eb-840f-7f9e29c6b481",
        "type": "AgentVteamTransferred"
    },
    "orgId": "f111e3af-1a45-42ef-9erf-4562354b8a25", "trackingId": "notifs_08102baa-3437-4c6d-812c-db4ce8755ea0", "type": "RoutingMessage"
}
blindTransfer()

Caution: This method will be deprecated in the future.

Initiates a blind transfer request. This method can be used to transfer a contact to an Agent or to a Dial Number.

Blind Transfer to Agent

Example

await Desktop.agentContact.blindTransfer({
    interactionId: “08259 a2b - bacf - 11 ea - bdd9 - abbd16eaf1d5”,
    data: {
        agentId: “f795f41f - 3782 - 44 fa - 97 a4 - c8b4dc029477”,
        destAgentId: “299 b728a - d6f8 - 4934 - 8 fad - 577525 c0b7fc”,
        mediaType: “chat”,
        destAgentTeamId: “964”,
        destAgentDN: “9997770095”,
        destSiteId: “472”
    }
});

// BlindTransfer Payload Type

{
    interactionId: string;
    data: Contact.blindTransferPayLoad
}

type blindTransferPayLoad = {
    agentId: string;
    destAgentId: string;
    mediaType: string;
    destAgentTeamId: string;
    destAgentDN: string;
    destSiteId: string;
}

The following table lists the payload details:

NameTypeDescriptionRequired
interactionIdStringThe unique ID represents the task that the user is currently working on. It is generated automatically during the creation of a new task.Yes
dataObjectOptions of the blind transfer request.Yes
-->agentIdStringUnique identifier of the agent.Yes
-->destAgentIdStringUnique identifier of the destination agent.Yes
-->mediaTypeStringThe media channel type such as chat.Yes
-->destAgentTeamIdStringUnique identifier of the team to which the destination agent belongs.Yes
-->destAgentDNStringThe dial number of the destination agent.Yes
-->destSiteIdStringUnique identifier of the destination site.Yes

Returns{Object} The object with the retrieved data.

Note: The type parameter value in the response payload depends on the success or failure of the method. If the method is successful, the value is AgentBlindTransferred; else, AgentBlindTransferFailedEvent.

Example Response

const blindTransferResponse = {
  data: {
    agentId: "cdf786ef-3285-4b2f-8ef9-3cf8a4c755c2",
    destAgentId: "337c1cca-d79b-44fc-8d8e-20d1b5e4dadf",
    destinationType: "Agent",
    eventType: "RoutingMessage",
    interaction: {
      callAssociatedData: {
        ani: {
          agentEditable: false,
          displayName: "ani",
          name: "ani",
          type: "STRING",
          value: "displayName"
        },
        appUser: {
          agentEditable: false,
          displayName: "appUser",
          name: "appUser",
          type: "STRING",
          value: "qaus1-appuser-1212"
        },
        customerName: {
          agentEditable: false,
          displayName: "customerName",
          name: "customerName",
          type: "STRING",
          value: "displayName"
        },
        dn: {
          agentEditable: false,
          displayName: "dn",
          name: "dn",
          type: "STRING",
          value: "AXVP2lxF0G6K4V3pFKRG"
        },
        ronaTimeout: {
          agentEditable: false,
          displayName: "ronaTimeout",
          name: "ronaTimeout",
          type: "STRING",
          value: "30"
        },
        virtualTeamName: {
          agentEditable: false,
          displayName: "virtualTeamName",
          name: "virtualTeamName",
          type: "STRING",
          value: "QA-e2e-SocialQueue"
        }
      },
      callAssociatedDetails: {
        ani: "***********",
        appUser: "appuser-1212",
        customerName: "displayName",
        dn: "********************",
        ronaTimeout: "30",
        virtualTeamName: "QA-e2e-SocialQueue"
      },
      callFlowParams: {},
      callProcessingDetails: {
        BLIND_TRANSFER_IN_PROGRESS: "true",
        QMgrName: "aqm",
        QueueId: "5134",
        ani: "***********",
        appUser: "qaus1-appuser-1212",
        customerName: "displayName",
        dnis: "********************",
        pauseDuration: "30",
        pauseResumeEnabled: "true",
        ronaTimeout: "30",
        taskToBeSelfServiced: "false",
        tenantId: "82",
        virtualTeamName: "SocialQueue",
        vteamId: "5134"
      },
      contactDirection: {
        type: "INBOUND"
      },
      currentVTeam: "5134",
      interactionId: "1da228dc-66cc-11eb-b852-ed71847d1aec",
      isFcManaged: false,
      isTerminated: false,
      media: {
        Y2lzY29zcGFyazovL3VzL1JPT00vNGQ5NGJmMjAtYjYwZi0xMWVhLTk0YjAtNzdjZDBkYWVjNDA1:
          {
            holdTimestamp: null,
            isHold: false,
            mType: "mainCall",
            mediaMgr: "socialmm",
            mediaResourceId:
              "Y2lzY29zcGFyazovL3VzL1JPT00vNGQ5NGJmMjAtYjYwZi0xMWVhLTk0YjAtNzdjZDBkYWVjNDA1",
            mediaType: "social",
            participants: ["displayName"]
          }
      },
      mediaChannel: "type",
      mediaType: "social",
      orgId: "f111e3af-1a45-42ef-9erf-4562354b8a25",
      outboundType: null,
      owner: "337c1cca-d79b-44fc-8d8e-20d1b5e4dadf",
      participants: {
        "337c1cca-d79b-44fc-8d8e-20d1b5e4dadf": {
          channelId: "e08a6068-688d-472b-887b-1c5d39c7155f",
          consultState: null,
          consultTimestamp: null,
          dn: "*****",
          hasJoined: false,
          id: "337c1cca-d79b-44fc-8d8e-20d1b5e4dadf",
          isConsulted: false,
          isWrapUp: false,
          joinTimestamp: null,
          lastUpdated: 1612431250963,
          name: "social-agent2",
          pType: "Agent",
          queueId: "5134",
          queueMgrId: "aqm",
          sessionId: "a9aa9867-e62f-4415-9ea4-6babace39d4f",
          siteId: "205",
          teamId: "384",
          teamName: "TeamSales",
          type: "Agent",
          wrapUpTimestamp: null
        },
        "cdf786ef-3285-4b2f-8ef9-3cf8a4c755c2": {
          channelId: "59826e62-08c8-41e6-b51c-4a2b6d81d2f6",
          consultState: null,
          consultTimestamp: null,
          dn: "*****",
          hasJoined: true,
          id: "cdf786ef-3285-4b2f-8ef9-3cf8a4c755c2",
          isConsulted: false,
          isWrapUp: true,
          joinTimestamp: 1612431249042,
          lastUpdated: 1612431251178,
          name: "qaus1-gt-social-agent1 qaus1-gt-social-agent1",
          pType: "Agent",
          queueId: "5134",
          queueMgrId: "aqm",
          sessionId: "600e7ebb-20aa-4c91-a4f0-ebc596249603",
          siteId: "205",
          teamId: "384",
          teamName: "TeamSales",
          type: "Agent",
          wrapUpTimestamp: 1612431251178
        },
        displayName: {
          id: "displayName",
          pType: "Customer",
          type: "Customer"
        }
      },
      previousVTeams: ["AXVP2lxF0G6K4V3pFKRG"],
      state: "new",
      workflowManager: null
    },
    interactionId: "1da228dc-66cc-11eb-b852-ed71847d1aec",
    mediaResourceId:
      "Y2lzY29zcGFyazovL3VzL1JPT00vNGQ5NGJmMjAtYjYwZi0xMWVhLTk0YjAtNzdjZDBkYWVjNDA1",
    orgId: "f111e3af-1a45-42ef-9erf-4562354b8a25",
    queueMgr: "aqm",
    trackingId: "4a958ace-49a2-49aa-b2e5-8798ede03f13",
    type: "AgentBlindTransferred"
  },
  orgId: "f111e3af-1a45-42ef-9erf-4562354b8a25",
  trackingId: "notifs_68c519c8-04f5-48b4-a5cf-609a09ccd765",
  type: "RoutingMessage"
};
Blind Transfer to Dial Number(DN)

Example

await Desktop.agentContact.blindTransfer({
    interactionId: “08259a2b-bacf-11ea-bdd9-abbd16eaf1d5”,
    data: {
        destAgentId: “9997770095”,
        mediaType: “telephony”,
        destinationType: “DN“
    }
});

// BlindTransfer Payload Type

{
    interactionId: string;
    data: Contact.blindTransferPayLoad
}

type blindTransferPayLoad = {
    destAgentId: string;
    mediaType: string;
    destinationType: string;
}

The following table lists the payload details:

NameTypeDescriptionRequired
interactionIdStringThe unique ID represents the task that the user is currently working on. It is generated automatically during the creation of a new task.Yes
dataObjectPayload for blind transfer to Dial Number request.Yes
-->mediaTypeStringThe media channel type, for example, telephony.Yes
-->destAgentIdStringdestAgentId refers to the Dial Number used for transfer.Yes
-->destinationTypeStringThe type of transfer request to be placed, for example, DN.Yes

Returns{Object} The object with the retrieved data.

Note: The type parameter value in the response payload depends on the success or failure of the method. If the method is successful, the value is AgentBlindTransferred; else, AgentBlindTransferFailedEvent.

Example Response

const blindTransferResponse = {
  "data": {
    "agentId": "aef2f5d3-7666-4e09-845e-5b019a9123f2",
    "destAgentId": "57xxxxxx3",
    "destinationType": "DN",
    "eventTime": 1727296398345,
    "eventType": "RoutingMessage",
    "interaction": {
      "callAssociatedData": {
        "CallDate": {
          "agentEditable": true,
          "agentViewable": true,
          "displayName": "CallDate",
          "global": false,
          "isSecure": false,
          "name": "CallDate",
          "reportable": false,
          "secureKeyId": "",
          "secureKeyVersion": 0,
          "type": "DATETIME",
          "value": "2024-09-25T20:32:32.014Z[UTC]"
        },
        "Customer_Name": {
          "agentEditable": true,
          "agentViewable": true,
          "displayName": "Customer_Name",
          "global": false,
          "isSecure": false,
          "name": "Customer_Name",
          "reportable": false,
          "secureKeyId": "",
          "secureKeyVersion": 0,
          "type": "STRING",
          "value": "Test"
        },
        "Global_FeedbackSurveyOptIn": {
          "agentEditable": true,
          "agentViewable": true,
          "displayName": "Post Call Survey Opt-in",
          "global": true,
          "isSecure": false,
          "name": "Global_FeedbackSurveyOptIn",
          "reportable": true,
          "secureKeyId": "",
          "secureKeyVersion": 0,
          "type": "STRING",
          "value": "uninitialized"
        },
        "Global_Language": {
          "agentEditable": false,
          "agentViewable": true,
          "displayName": "Customer Language",
          "global": true,
          "isSecure": false,
          "name": "Global_Language",
          "reportable": true,
          "secureKeyId": "",
          "secureKeyVersion": 0,
          "type": "STRING",
          "value": "en-US"
        },
        "Global_TestKey": {
          "agentEditable": true,
          "agentViewable": true,
          "displayName": "Global Test Key",
          "global": true,
          "isSecure": true,
          "name": "Global_TestKey",
          "reportable": false,
          "secureKeyId": "root",
          "secureKeyVersion": 3,
          "type": "STRING",
          "value": "zkK9t2ebro52iV6X19vmJA==."
        },
        "TestKey": {
          "agentEditable": true,
          "agentViewable": true,
          "displayName": "Test Key 1",
          "global": false,
          "isSecure": false,
          "name": "TestKey",
          "reportable": false,
          "secureKeyId": "",
          "secureKeyVersion": 0,
          "type": "STRING",
          "value": "TestValue"
        },
        "TestGlobal": {
          "agentEditable": true,
          "agentViewable": true,
          "displayName": "TestGlobal",
          "global": true,
          "isSecure": false,
          "name": "TestGlobal",
          "reportable": false,
          "secureKeyId": "",
          "secureKeyVersion": 0,
          "type": "STRING",
          "value": "Test-value"
        },
        "ani": {
          "agentEditable": false,
          "agentViewable": true,
          "displayName": "ani",
          "global": false,
          "isSecure": false,
          "name": "ani",
          "reportable": false,
          "secureKeyId": "",
          "secureKeyVersion": 0,
          "type": "STRING",
          "value": "94xxxxxxx5"
        },
        "dn": {
          "agentEditable": false,
          "agentViewable": true,
          "displayName": "dn",
          "global": false,
          "isSecure": false,
          "name": "dn",
          "reportable": false,
          "secureKeyId": "",
          "secureKeyVersion": 0,
          "type": "STRING",
          "value": "94xxxxxxx5"
        },
        "ronaTimeout": {
          "agentEditable": false,
          "agentViewable": true,
          "displayName": "ronaTimeout",
          "global": false,
          "isSecure": false,
          "name": "ronaTimeout",
          "reportable": false,
          "secureKeyId": "",
          "secureKeyVersion": 0,
          "type": "STRING",
          "value": "25"
        },
        "test3": {
          "agentEditable": true,
          "agentViewable": true,
          "displayName": "test3-new",
          "global": false,
          "isSecure": false,
          "name": "test3",
          "reportable": false,
          "secureKeyId": "",
          "secureKeyVersion": 0,
          "type": "INTEGER",
          "value": "0"
        },
        "virtualTeamName": {
          "agentEditable": false,
          "agentViewable": true,
          "displayName": "virtualTeamName",
          "global": false,
          "isSecure": false,
          "name": "virtualTeamName",
          "reportable": false,
          "secureKeyId": "",
          "secureKeyVersion": 0,
          "type": "STRING",
          "value": "Queue_MCM"
        }
      },
      "callAssociatedDetails": {
        "ani": "94xxxxxxx5",
        "dn": "+15xxxxxxxx8",
        "ronaTimeout": "25",
        "virtualTeamName": "Queue_MCM"
      },
      "callFlowParams": {},
      "callProcessingDetails": {
        "BLIND_TRANSFER_IN_PROGRESS": "true",
        "CONTINUE_RECORDING_ON_TRANSFER": "true",
        "EP_ID": "8befa99f-903e-4c33-8311-19666546b810",
        "QMgrName": "aqm",
        "QueueId": "0025a125-4d2c-4e1a-833d-909e95a389cc",
        "ROUTING_TYPE": "queueBasedRouting",
        "ani": "94xxxxxxx5",
        "checkAgentAvailability": "false",
        "customerRegion": "intgus1",
        "dnis": "+15xxxxxxxx8",
        "fcDesktopView": "eNqVj0EKwjAQRe8y6xSsuuoFXAhump2ITHUWgXQSxzQgJXe3Ikg0irob/n8D/43gna9cJIFmOwJjT9AAsgEFEcVgZ6ml05TNIKkHcOSir/M+GgkDWk3Yb27JKzzPYXGM2vTkhlCAixzUdA5ruhTQEtJOgeFAgodgHFcemexfRt8W178uflJbWdeh3X8aXti100ly/3qrma7bbY9I",
        "fceRegisteredEvents": "",
        "flowTagId": "Latest",
        "isParked": "false",
        "mohFileName": "defaultmusic_on_hold.wav",
        "pauseDuration": "15",
        "pauseResumeEnabled": "true",
        "priority": "10",
        "queuedDestinationID": "0025a125-4d2c-4e1a-833d-909e95a389cc",
        "queuedTo": "Queue",
        "recordingStarted": "true",
        "ronaTimeout": "25",
        "taskToBeSelfServiced": "false",
        "tenantId": "58f1a59e-245c-4536-9ee4-06560658e493",
        "virtualTeamName": "Queue_MCM",
        "vteamId": "0025a125-4d2c-4e1a-833d-909e95a389cc",
        "workflowId": "62a165a995fe092e845f4804",
        "workflowName": "FlowTest"
      },
      "contactDirection": { "type": "INBOUND" },
      "createdTimestamp": 1727296351593,
      "currentVTeam": "0025a125-4d2c-4e1a-833d-909e95a389cc",
      "interactionId": "04b00173-9a60-4115-aaa2-9993c3496951",
      "isFcManaged": true,
      "isMediaForked": false,
      "isTerminated": false,
      "mainInteractionId": "04b00173-9a60-4115-aaa2-9993c3496951",
      "media": {
        "04b00173-9a60-4115-aaa2-9993c3496951": {
          "holdTimestamp": null,
          "isHold": false,
          "mType": "mainCall",
          "mediaMgr": "callmm",
          "mediaResourceId": "04b00173-9a60-4115-aaa2-9993c3496951",
          "mediaType": "telephony",
          "participants": ["94xxxxxxx5", "aef2f5d3-7666-4e09-845e-5b019a9123f2"]
        }
      },
      "mediaChannel": "telnyx",
      "mediaProperties": null,
      "mediaType": "telephony",
      "orgId": "58f1a59e-245c-4536-9ee4-06560658e493",
      "outboundType": null,
      "owner": null,
      "parentInteractionId": "04b00173-9a60-4115-aaa2-9993c3496951",
      "participants": {
        "5xxxxxxxx8": {
          "callerId": null,
          "hasLeft": false,
          "id": "5xxxxxxxx8",
          "isInPredial": false,
          "pType": "DN",
          "type": "DN"
        },
        "94xxxxxxx5": {
          "callerId": null,
          "hasJoined": true,
          "hasLeft": false,
          "id": "94xxxxxxx5",
          "isInPredial": false,
          "pType": "Customer",
          "type": "Customer"
        },
        "aef2f5d3-7666-4e09-845e-5b019a9123f2": {
          "autoAnswerEnabled": false,
          "bnrDetails": null,
          "callerId": null,
          "channelId": "9c04e312-8e14-43c4-a7e4-2c20f12b623e",
          "consultState": null,
          "consultTimestamp": null,
          "dn": "webrtc-aef2f5d3-7666-4e09-845e-5b019a9123f2",
          "hasJoined": true,
          "hasLeft": true,
          "id": "aef2f5d3-7666-4e09-845e-5b019a9123f2",
          "isConsulted": false,
          "isInPredial": false,
          "isOffered": true,
          "isWrapUp": false,
          "isWrappedUp": false,
          "joinTimestamp": 1727296375103,
          "lastUpdated": 1727296375103,
          "name": "Test User",
          "pType": "Agent",
          "queueId": "0025a125-4d2c-4e1a-833d-909e95a389cc",
          "queueMgrId": "aqm",
          "sessionId": "5cf402c0-f814-40d1-86fc-b0b756e4baf9",
          "siteId": "b302fbf4-28b8-4b56-add0-162e2464db89",
          "skillId": null,
          "skillName": null,
          "skills": [],
          "teamId": "bdd276cd-d051-4b80-bd6e-9fb9eec18b99",
          "teamName": "Team-Test",
          "type": "Agent",
          "wrapUpTimestamp": null
        }
      },
      "previousVTeams": ["8befa99f-903e-4c33-8311-19666546b810"],
      "queuedTimestamp": null,
      "state": "new",
      "workflowManager": null
    },
    "interactionId": "04b00173-9a60-4115-aaa2-9993c3496951",
    "mediaResourceId": "04b00173-9a60-4115-aaa2-9993c3496951",
    "orgId": "58f1a59e-245c-4536-9ee4-06560658e493",
    "queueMgr": "aqm",
    "trackingId": "be82db7f-04d6-4b03-a1df-655366e6c142",
    "type": "AgentBlindTransferred"
  },
  "orgId": "58f1a59e-245c-4536-9ee4-06560658e493",
  "trackingId": "notifs_4d2aca4a-409d-460d-a4be-e81973178919",
  "type": "RoutingMessage"
};
consultTransfer()

Caution: This method will be deprecated in the future.

Initiates a consult transfer request.

Example

await Desktop.agentContact.consultTransfer({
    interactionId: “5 c3d487a - 874 b - 447 d - b5f2 - ce1f626301f5”,
    data: {
        agentId: “43 bfcdef - 5551 - 45 b1 - a8f9 - a0b33e66e3fe”,
        destAgentId: “f795f41f - 3782 - 44 fa - 97 a4 - c8b4dc029477”,
        mediaType: “telephony”,
        mediaResourceId: “b102ed10 - fac2 - 4 f8e - bece - 1 c2da6ba6dd8”
        destinationType: "Agent",
    }
});

// consultTransfer Payload Type

{
    interactionId: string;data: Contact.consultTransferPayLoad
}

type consultTransferPayLoad = {
    agentId ? : string | undefined;
    destAgentId: string;
    mediaType: string;
    mediaResourceId: string;
    destinationType ? : string | undefined;
}

The following table lists the payload details:

NameTypeDescriptionRequired
interactionIdStringUnique identifier for the user interaction.Yes
dataObjectOptions of the consult transfer request.Yes
-->agentIdStringUnique identifier of the agent.Yes
-->destAgentIdStringUnique identifier of the consult transfer request destination agent.Yes
-->mediaTypeStringThe media channel type such as telephony.Yes
-->mediaResourceIdStringUnique identifier of the media resource.Yes
-->destinationTypeStringThe type of consult transfer request to be placed. The destination type can be Agent, Queue, or DN.Yes

Returns{Object} The object with the retrieved data.

Note: The type parameter value in the response payload depends on the success or failure of the method. If the method is successful, the value is AgentConsultTransferred; else, AgentConsultTransferFailed.

Example Response

const consultTransferResponse = {
  data: {
    agentId: "ff7dbe19-fa3f-4c63-8a1c-04dcffef8e4f",
    consultMediaResourceId: "fd0af60c-3250-46c3-96f8-1921f6ecf170",
    destAgentId: "9b036d89-930c-4187-a5bd-5dbb1439fe41",
    destinationType: "Agent",
    eventType: "RoutingMessage",
    interaction: {
      callAssociatedData: {
        "": {
          agentEditable: false,
          displayName: "",
          name: "",
          type: "STRING",
          value: ""
        },
        IvrPath: {
          agentEditable: false,
          displayName: "IvrPath",
          name: "IvrPath",
          type: "STRING",
          value: " EOI"
        },
        ani: {
          agentEditable: false,
          displayName: "ani",
          name: "ani",
          type: "STRING",
          value: "**********"
        },
        dn: {
          agentEditable: false,
          displayName: "dn",
          name: "dn",
          type: "STRING",
          value: "**********"
        },
        nextVteamId: {
          agentEditable: false,
          displayName: "nextVteamId",
          name: "nextVteamId",
          type: "STRING",
          value: "Queue"
        },
        pathId: {
          agentEditable: false,
          displayName: "pathId",
          name: "pathId",
          type: "STRING",
          value: " StartCall PlayDone"
        },
        ronaTimeout: {
          agentEditable: false,
          displayName: "ronaTimeout",
          name: "ronaTimeout",
          type: "STRING",
          value: "30"
        },
        virtualTeamName: {
          agentEditable: false,
          displayName: "virtualTeamName",
          name: "virtualTeamName",
          type: "STRING",
          value: "Queue-1"
        }
      },
      callAssociatedDetails: {
        "": "",
        IvrPath: " EOI",
        ani: "************",
        dn: "************",
        nextVteamId: "Queue",
        pathId: " StartCall PlayDone",
        ronaTimeout: "30",
        virtualTeamName: "Queue-1"
      },
      callFlowParams: {
        Queue: {
          description: "(vteam, A valid VTeam.)",
          name: "Queue",
          qualifier: "vteam",
          value: "1336",
          valueDataType: "string"
        },
        WelcomePrompt: {
          description: "(mediaFile, A valid media file.)",
          name: "WelcomePrompt",
          qualifier: "mediaFile",
          value: "GAwelcome.wav",
          valueDataType: "string"
        }
      },
      callProcessingDetails: {
        QMgrName: "aqm",
        QueueId: "1336",
        ani: "************",
        dnis: "************",
        isPaused: "false",
        jscriptId: "AW7HP3QNB44q0sL-cTVz",
        pauseDuration: "30",
        pauseResumeEnabled: "true",
        recordInProgress: "true",
        ronaTimeout: "30",
        taskToBeSelfServiced: "false",
        tenantId: "82",
        virtualTeamName: "Queue-1",
        vteamId: "1336"
      },
      contactDirection: {
        type: "INBOUND"
      },
      currentVTeam: "1336",
      interactionId: "1277da79-dc49-439c-ab72-f00453a1ff71",
      isFcManaged: false,
      isTerminated: false,
      media: {
        "1277da79-dc49-439c-ab72-f00453a1ff71": {
          holdTimestamp: null,
          isHold: false,
          mType: "mainCall",
          mediaMgr: "vmm",
          mediaResourceId: "1277da79-dc49-439c-ab72-f00453a1ff71",
          mediaType: "telephony",
          participants: ["**********", "9b036d89-930c-4187-a5bd-5dbb1439fe41"]
        }
      },
      mediaChannel: "broadcloud",
      mediaType: "telephony",
      orgId: "f111e3af-1a45-42ef-9erf-4562354b8a25",
      outboundType: null,
      owner: "9b036d89-930c-4187-a5bd-5dbb1439fe41",
      participants: {
        "**********": {
          id: "**********",
          pType: "Customer",
          type: "Customer"
        },
        "9b036d89-930c-4187-a5bd-5dbb1439fe41": {
          channelId: "3de6706f-95b7-485a-9304-30928f7ee52e",
          consultState: null,
          consultTimestamp: null,
          dn: "**********",
          hasJoined: true,
          id: "9b036d89-930c-4187-a5bd-5dbb1439fe41",
          isConsulted: true,
          isWrapUp: false,
          joinTimestamp: 1612429549032,
          lastUpdated: 1612429549032,
          name: "qaus1-gt-user1 qaus1-gt-user1",
          pType: "Agent",
          queueId: "1336",
          queueMgrId: "aqm",
          sessionId: "90896c91-0f77-4bc6-aec3-488a34ca88d3",
          siteId: "205",
          teamId: "598",
          teamName: "Sales",
          type: "Agent",
          wrapUpTimestamp: null
        },
        "ff7dbe19-fa3f-4c63-8a1c-04dcffef8e4f": {
          channelId: "fb704337-71c3-4802-a03b-84a2d18eeaa0",
          consultState: "consulting",
          consultTimestamp: 1612429549052,
          dn: "**********",
          hasJoined: true,
          id: "ff7dbe19-fa3f-4c63-8a1c-04dcffef8e4f",
          isConsulted: false,
          isWrapUp: false,
          joinTimestamp: 1612429537991,
          lastUpdated: 1612429537991,
          name: "qaus1-gt-user2 q",
          pType: "Agent",
          queueId: "1336",
          queueMgrId: "aqm",
          sessionId: "57323f8b-9460-45fa-aaf6-4ca51c327af8",
          siteId: "205",
          teamId: "598",
          teamName: "Sales",
          type: "Agent",
          wrapUpTimestamp: null
        }
      },
      previousVTeams: ["AW6h1AVRrZSGni185x28"],
      state: "connected",
      workflowManager: null
    },
    interactionId: "1277da79-dc49-439c-ab72-f00453a1ff71",
    mediaResourceId: "1277da79-dc49-439c-ab72-f00453a1ff71",
    orgId: "f111e3af-1a45-42ef-9erf-4562354b8a25",
    queueMgr: "aqm",
    trackingId: "05b38615-5bdc-4e1d-8efe-60ea1c70fd5c",
    transferredMediaResourceId: "1277da79-dc49-439c-ab72-f00453a1ff71",
    type: "AgentConsultTransferred"
  },
  orgId: "f111e3af-1a45-42ef-9erf-4562354b8a25",
  trackingId: "notifs_3464be63-83e7-4b2d-94d5-a63fddc108d5",
  type: "RoutingMessage"
};
hold()

Places a voice call on hold.

Example

await Desktop.agentContact.hold({
    interactionId: “c837e6f7 - 699 a - 4736 - bb82 - 03 a6d58bb7f3”,
    data: {
        mediaResourceId: “c837e6f7 - 699 a - 4736 - bb82 - 03 a6d58bb7f3”
    }
});

// Hold Payload

{
    interactionId: string;data: {
        mediaResourceId: string
    }
}

The following table lists the payload details:

NameTypeDescriptionRequired
interactionIdStringUnique identifier for the user interaction.Yes
dataObjectOptions to place the voice call on hold.Yes
-->mediaResourceIdStringUnique identifier of the media resource.Yes

Returns{Object} The object with the retrieved data.

Note: The type parameter value in the response payload depends on the success or failure of the method. If the method is successful, the value is AgentContactHeld; else, AgentContactHoldFailed.

Example Response

const holdResponse = {
  data: {
    agentId: "7c867aa9-ec768-341a-b767-e5hd6ae7g701",
    destAgentId: null,
    eventType: "RoutingMessage",
    interaction: {
      callAssociatedData: {
        dn: {
          agentEditable: false,
          displayName: "dn",
          name: "dn",
          type: "STRING",
          value: "8895579172"
        },
        ronaTimeout: {
          agentEditable: false,
          displayName: "ronaTimeout",
          name: "ronaTimeout",
          type: "STRING",
          value: "30"
        },
        virtualTeamName: {
          agentEditable: false,
          displayName: "virtualTeamName",
          name: "virtualTeamName",
          type: "STRING",
          value: "Outdial Queue-1"
        }
      },
      callAssociatedDetails: {
        dn: "8895579172",
        ronaTimeout: "30",
        virtualTeamName: "Outdial Queue-1"
      },
      callFlowParams: {
        OutdialQueue: {
          description: "(vteam, The Outdial Queue.)",
          name: "OutdialQueue",
          qualifier: "vteam",
          value: "3264",
          valueDataType: "string"
        }
      },
      callProcessingDetails: {
        QMgrName: "aqm",
        QueueId: "3264",
        dnis: "8895579172",
        isPaused: "false",
        outdialTransferToQueueEnabled: "false",
        pauseDuration: "10",
        pauseResumeEnabled: "true",
        recordInProgress: "true",
        ronaTimeout: "30",
        taskToBeSelfServiced: "false",
        tenantId: "133",
        virtualTeamName: "Outdial Queue-1",
        vteamId: "AXCLfZZU9S1oTdqE1OFZ"
      },
      contactDirection: {
        type: "OUTBOUND"
      },
      currentVTeam: "3264",
      interactionId: "1dd08726-bca5-4ce8-9b51-b20dca8ab154",
      isFcManaged: false,
      isTerminated: false,
      media: {
        "1dd08726-bca5-4ce8-9b51-b20dca8ab154": {
          holdTimestamp: 1612355834441,
          isHold: true,
          mType: "mainCall",
          mediaMgr: "vmm",
          mediaResourceId: "1dd08726-bca5-4ce8-9b51-b20dca8ab154",
          mediaType: "telephony",
          participants: [""]
        }
      },
      mediaChannel: "dialer",
      mediaType: "telephony",
      orgId: "f111e3af-1a45-42ef-9erf-4562354b8a25",
      outboundType: "OUTDIAL",
      owner: "7c867aa9-ec768-341a-b767-e5hd6ae7g701",
      participants: {
        "": {
          id: "",
          pType: "Customer",
          type: "Customer"
        },
        "7c867aa9-ec768-341a-b767-e5hd6ae7g701": {
          channelId: "0717a2ce-76cd-4ba4-9053-71f2c78168b8",
          consultState: null,
          consultTimestamp: null,
          dn: "8895579172",
          hasJoined: true,
          id: "7c867aa9-ec768-341a-b767-e5hd6ae7g701",
          isConsulted: false,
          isWrapUp: false,
          joinTimestamp: 1612354635705,
          lastUpdated: 1612354635705,
          name: "John Doe",
          pType: "Agent",
          queueId: "3264",
          queueMgrId: "aqm",
          sessionId: "3d017488-527a-4e89-9313-5d4eb353c789",
          siteId: "472",
          teamId: "960",
          teamName: "Email_Team",
          type: "Agent",
          wrapUpTimestamp: null
        }
      },
      previousVTeams: [],
      state: "connected",
      workflowManager: null
    },
    interactionId: "1dd08726-bca5-4ce8-9b51-b20dca8ab154",
    mediaResourceId: "1dd08726-bca5-4ce8-9b51-b20dca8ab154",
    orgId: "f111e3af-1a45-42ef-9erf-4562354b8a25",
    queueMgr: "aqm",
    trackingId: "3768264d-8588-465f-9ee6-0c25418ea9f7",
    type: "AgentContactHeld"
  },
  orgId: "f111e3af-1a45-42ef-9erf-4562354b8a25",
  trackingId: "notifs_8e8cabb7-6d5a-460d-9b8b-ecfad96448b3",
  type: "RoutingMessage"
};
unHold()

Resumes a voice call that is placed on hold.

Example

await Desktop.agentContact.unHold({
    interactionId: “c837e6f7 - 699 a - 4736 - bb82 - 03 a6d58bb7f3”,
    data: {
        mediaResourceId: “c837e6f7 - 699 a - 4736 - bb82 - 03 a6d58bb7f3”
    }
});

// unHold Payload Type

{
    interactionId: string;data: {
        mediaResourceId: string
    }
}

The following table lists the payload details:

NameTypeDescriptionRequired
interactionIdStringUnique identifier for the user interaction.Yes
dataObjectOptions to resume the voice call that is placed on hold.Yes
-->mediaResourceIdStringUnique identifier of the media resource.Yes

Returns{Object} The object with the retrieved data.

Note: The type parameter value in the response payload depends on the success or failure of the method. If the method is successful, the value is AgentContactUnheld; else, AgentContactUnHoldFailed.

Example Response

const unHoldResponse = {
  data: {
    agentId: "7c867aa9-ec768-341a-b767-e5hd6ae7g701",
    destAgentId: null,
    eventType: "RoutingMessage",
    interaction: {
      callAssociatedData: {
        dn: {
          agentEditable: false,
          displayName: "dn",
          name: "dn",
          type: "STRING",
          value: "8895579172"
        },
        ronaTimeout: {
          agentEditable: false,
          displayName: "ronaTimeout",
          name: "ronaTimeout",
          type: "STRING",
          value: "30"
        },
        virtualTeamName: {
          agentEditable: false,
          displayName: "virtualTeamName",
          name: "virtualTeamName",
          type: "STRING",
          value: "Outdial Queue-1"
        }
      },
      callAssociatedDetails: {
        dn: "8895579172",
        ronaTimeout: "30",
        virtualTeamName: "Outdial Queue-1"
      },
      callFlowParams: {
        OutdialQueue: {
          description: "(vteam, The Outdial Queue.)",
          name: "OutdialQueue",
          qualifier: "vteam",
          value: "3264",
          valueDataType: "string"
        }
      },
      callProcessingDetails: {
        QMgrName: "aqm",
        QueueId: "3264",
        dnis: "8895579172",
        isPaused: "false",
        outdialTransferToQueueEnabled: "false",
        pauseDuration: "10",
        pauseResumeEnabled: "true",
        recordInProgress: "true",
        ronaTimeout: "30",
        taskToBeSelfServiced: "false",
        tenantId: "133",
        virtualTeamName: "Outdial Queue-1",
        vteamId: "AXCLfZZU9S1oTdqE1OFZ"
      },
      contactDirection: {
        type: "OUTBOUND"
      },
      currentVTeam: "3264",
      interactionId: "1dd08726-bca5-4ce8-9b51-b20dca8ab154",
      isFcManaged: false,
      isTerminated: false,
      media: {
        "1dd08726-bca5-4ce8-9b51-b20dca8ab154": {
          holdTimestamp: null,
          isHold: false,
          mType: "mainCall",
          mediaMgr: "vmm",
          mediaResourceId: "1dd08726-bca5-4ce8-9b51-b20dca8ab154",
          mediaType: "telephony",
          participants: [""]
        }
      },
      mediaChannel: "dialer",
      mediaType: "telephony",
      orgId: "f111e3af-1a45-42ef-9erf-4562354b8a25",
      outboundType: "OUTDIAL",
      owner: "7c867aa9-ec768-341a-b767-e5hd6ae7g701",
      participants: {
        "": {
          id: "",
          pType: "Customer",
          type: "Customer"
        },
        "7c867aa9-ec768-341a-b767-e5hd6ae7g701": {
          channelId: "0717a2ce-76cd-4ba4-9053-71f2c78168b8",
          consultState: null,
          consultTimestamp: null,
          dn: "8895579172",
          hasJoined: true,
          id: "7c867aa9-ec768-341a-b767-e5hd6ae7g701",
          isConsulted: false,
          isWrapUp: false,
          joinTimestamp: 1612354635705,
          lastUpdated: 1612354635705,
          name: "John Doe",
          pType: "Agent",
          queueId: "3264",
          queueMgrId: "aqm",
          sessionId: "3d017488-527a-4e89-9313-5d4eb353c789",
          siteId: "472",
          teamId: "960",
          teamName: "Email_Team",
          type: "Agent",
          wrapUpTimestamp: null
        }
      },
      previousVTeams: [],
      state: "connected",
      workflowManager: null
    },
    interactionId: "1dd08726-bca5-4ce8-9b51-b20dca8ab154",
    mediaResourceId: "1dd08726-bca5-4ce8-9b51-b20dca8ab154",
    orgId: "f111e3af-1a45-42ef-9erf-4562354b8a25",
    queueMgr: "aqm",
    trackingId: "a5152cc8-004a-4e4c-b5d8-c9fc947f1e57",
    type: "AgentContactUnheld"
  },
  orgId: "f111e3af-1a45-42ef-9erf-4562354b8a25",
  trackingId: "notifs_85f4d943-8e95-49c9-92c4-66047d526506",
  type: "RoutingMessage"
};
pauseRecording()

Caution: This method will be deprecated in the future.

Pauses a call recording while obtaining sensitive information such as credit card information from the customer.

When configured by the administrator, voice calls are recorded for various reasons. When an agent handles sensitive customer information, the agent might want to pause the recording. The Pause/Resume functionality is available on the Desktop through the Interaction Control pane. You can access the Pause/Resume functionality from your widget also.

Example

await Desktop.agentContact.pauseRecording({
    interactionId: “c837e6f7 - 699 a - 4736 - bb82 - 03 a6d58bb7f3”
});
// Pausing a recording for telephony task

The following table lists the payload details:

NameTypeDescriptionRequired
interactionIdStringUnique identifier for the user interaction.Yes

Returns{Object} The object with the retrieved data.

Note: The type parameter value in the response payload depends on the success or failure of the method. If the method is successful, the value is ContactRecordingPaused; else, ContactRecordingPauseFailed.

Example Response

const pauseRecordingResponse = {
  data: {
    eventType: "RoutingMessage",
    interaction: {
      callAssociatedData: {
        dn: {
          agentEditable: false,
          displayName: "dn",
          name: "dn",
          type: "STRING",
          value: "8895579172"
        },
        ronaTimeout: {
          agentEditable: false,
          displayName: "ronaTimeout",
          name: "ronaTimeout",
          type: "STRING",
          value: "30"
        },
        virtualTeamName: {
          agentEditable: false,
          displayName: "virtualTeamName",
          name: "virtualTeamName",
          type: "STRING",
          value: "Outdial Queue-1"
        }
      },
      callAssociatedDetails: {
        dn: "8895579172",
        ronaTimeout: "30",
        virtualTeamName: "Outdial Queue-1"
      },
      callFlowParams: {
        OutdialQueue: {
          description: "(vteam, The Outdial Queue.)",
          name: "OutdialQueue",
          qualifier: "vteam",
          value: "3264",
          valueDataType: "string"
        }
      },
      callProcessingDetails: {
        QMgrName: "aqm",
        QueueId: "3264",
        dnis: "8895579172",
        isPaused: "true",
        outdialTransferToQueueEnabled: "false",
        pauseDuration: "10",
        pauseResumeEnabled: "true",
        recordInProgress: "true",
        ronaTimeout: "30",
        taskToBeSelfServiced: "false",
        tenantId: "133",
        virtualTeamName: "Outdial Queue-1",
        vteamId: "AXCLfZZU9S1oTdqE1OFZ"
      },
      contactDirection: {
        type: "OUTBOUND"
      },
      currentVTeam: "3264",
      interactionId: "1dd08726-bca5-4ce8-9b51-b20dca8ab154",
      isFcManaged: false,
      isTerminated: false,
      media: {
        "1dd08726-bca5-4ce8-9b51-b20dca8ab154": {
          holdTimestamp: null,
          isHold: false,
          mType: "mainCall",
          mediaMgr: "vmm",
          mediaResourceId: "1dd08726-bca5-4ce8-9b51-b20dca8ab154",
          mediaType: "telephony",
          participants: [""]
        }
      },
      mediaChannel: "dialer",
      mediaType: "telephony",
      orgId: "f111e3af-1a45-42ef-9erf-4562354b8a25",
      outboundType: "OUTDIAL",
      owner: "7c867aa9-ec768-341a-b767-e5hd6ae7g701",
      participants: {
        "": {
          id: "",
          pType: "Customer",
          type: "Customer"
        },
        "7c867aa9-ec768-341a-b767-e5hd6ae7g701": {
          channelId: "0717a2ce-76cd-4ba4-9053-71f2c78168b8",
          consultState: null,
          consultTimestamp: null,
          dn: "8895579172",
          hasJoined: true,
          id: "7c867aa9-ec768-341a-b767-e5hd6ae7g701",
          isConsulted: false,
          isWrapUp: false,
          joinTimestamp: 1612354635705,
          lastUpdated: 1612354635705,
          name: "John Doe",
          pType: "Agent",
          queueId: "3264",
          queueMgrId: "aqm",
          sessionId: "3d017488-527a-4e89-9313-5d4eb353c789",
          siteId: "472",
          teamId: "960",
          teamName: "Email_Team",
          type: "Agent",
          wrapUpTimestamp: null
        }
      },
      previousVTeams: [],
      state: "connected",
      workflowManager: null
    },
    interactionId: "1dd08726-bca5-4ce8-9b51-b20dca8ab154",
    orgId: "f111e3af-1a45-42ef-9erf-4562354b8a25",
    queueMgr: "aqm",
    trackingId: "b031f6d7-63a3-49d9-b377-e848bce41bd3",
    type: "ContactRecordingPaused"
  },
  orgId: "f111e3af-1a45-42ef-9erf-4562354b8a25",
  trackingId: "notifs_52a00992-95e8-438c-ac44-8302da18d252",
  type: "RoutingMessage"
};
resumeRecording()

Caution: This method will be deprecated in the future.

Resumes a voice call recording that is paused.

Example

await Desktop.agentContact.resumeRecording({
    interactionId: “c837e6f7 - 699 a - 4736 - bb82 - 03 a6d58bb7f3”,
    data: {
        autoResumed: true
    }
});
// Resuming recording for telephony task
// resumeRecording Payload Type

{
    interactionId: string;data: {
        autoResumed: boolean
    }
}

The following table lists the payload details:

NameTypeDescriptionRequired
interactionIdStringUnique identifier for the user interaction.Yes
dataObjectOptions to resume a voice call recording that is paused.Yes
-->autoResumedBooleanDetermines whether the paused call must be resumed manually.
True—Voice call to be resumed automatically after the specified time is lapsed.
False—User to take action on the paused voice call based on the button defined. For example, Start Recording.
Yes

Returns{Object} The object with the retrieved data.

Note: The type parameter value in the response payload depends on the success or failure of the method. If the method is successful, the value is ContactRecordingResumed; else, ContactRecordingResumeFailed.

Example Response

const resumeRecordingResponse = {
  data: {
    autoResumed: true,
    eventType: "RoutingMessage",
    interaction: {
      callAssociatedData: {
        dn: {
          agentEditable: false,
          displayName: "dn",
          name: "dn",
          type: "STRING",
          value: "8895579172"
        },
        ronaTimeout: {
          agentEditable: false,
          displayName: "ronaTimeout",
          name: "ronaTimeout",
          type: "STRING",
          value: "30"
        },
        virtualTeamName: {
          agentEditable: false,
          displayName: "virtualTeamName",
          name: "virtualTeamName",
          type: "STRING",
          value: "Outdial Queue-1"
        }
      },
      callAssociatedDetails: {
        dn: "8895579172",
        ronaTimeout: "30",
        virtualTeamName: "Outdial Queue-1"
      },
      callFlowParams: {
        OutdialQueue: {
          description: "(vteam, The Outdial Queue.)",
          name: "OutdialQueue",
          qualifier: "vteam",
          value: "3264",
          valueDataType: "string"
        }
      },
      callProcessingDetails: {
        QMgrName: "aqm",
        QueueId: "3264",
        dnis: "8895579172",
        isPaused: "false",
        outdialTransferToQueueEnabled: "false",
        pauseDuration: "10",
        pauseResumeEnabled: "true",
        recordInProgress: "true",
        ronaTimeout: "30",
        taskToBeSelfServiced: "false",
        tenantId: "133",
        virtualTeamName: "Outdial Queue-1",
        vteamId: "AXCLfZZU9S1oTdqE1OFZ"
      },
      contactDirection: {
        type: "OUTBOUND"
      },
      currentVTeam: "3264",
      interactionId: "1dd08726-bca5-4ce8-9b51-b20dca8ab154",
      isFcManaged: false,
      isTerminated: false,
      media: {
        "1dd08726-bca5-4ce8-9b51-b20dca8ab154": {
          holdTimestamp: null,
          isHold: false,
          mType: "mainCall",
          mediaMgr: "vmm",
          mediaResourceId: "1dd08726-bca5-4ce8-9b51-b20dca8ab154",
          mediaType: "telephony",
          participants: [""]
        }
      },
      mediaChannel: "dialer",
      mediaType: "telephony",
      orgId: "f111e3af-1a45-42ef-9erf-4562354b8a25",
      outboundType: "OUTDIAL",
      owner: "7c867aa9-ec768-341a-b767-e5hd6ae7g701",
      participants: {
        "": {
          id: "",
          pType: "Customer",
          type: "Customer"
        },
        "7c867aa9-ec768-341a-b767-e5hd6ae7g701": {
          channelId: "0717a2ce-76cd-4ba4-9053-71f2c78168b8",
          consultState: null,
          consultTimestamp: null,
          dn: "8895579172",
          hasJoined: true,
          id: "7c867aa9-ec768-341a-b767-e5hd6ae7g701",
          isConsulted: false,
          isWrapUp: false,
          joinTimestamp: 1612354635705,
          lastUpdated: 1612354635705,
          name: "John Doe",
          pType: "Agent",
          queueId: "3264",
          queueMgrId: "aqm",
          sessionId: "3d017488-527a-4e89-9313-5d4eb353c789",
          siteId: "472",
          teamId: "960",
          teamName: "Email_Team",
          type: "Agent",
          wrapUpTimestamp: null
        }
      },
      previousVTeams: [],
      state: "connected",
      workflowManager: null
    },
    interactionId: "1dd08726-bca5-4ce8-9b51-b20dca8ab154",
    orgId: "f111e3af-1a45-42ef-9erf-4562354b8a25",
    queueMgr: "aqm",
    trackingId: "9cf5bfc4-d120-4330-9996-039a9937c52c",
    type: "ContactRecordingResumed"
  },
  orgId: "f111e3af-1a45-42ef-9erf-4562354b8a25",
  trackingId: "notifs_c04510a0-140a-439c-9ab4-68b6fdf6ea2e",
  type: "RoutingMessage"
};
acceptV2()

Accepts an incoming task.

Note: This method works only for non-voice tasks and isn't applicable for voice contacts.

Example

await Desktop.agentContact.acceptV2({
    interactionId: “c837e6f7 - 699 a - 4736 - bb82 - 03 a6d58bb7f3”
});

The following table lists the payload details:

NameTypeDescriptionRequired
interactionIdStringUnique identifier for the user interaction.Yes

Returns

{Object} The value that corresponds to the task.

Note: The type parameter value in the response payload depends on the success or failure of the method. If the method is successful, the value is AgentContactAssigned; else, AgentContactAssignFailed.

Example Response

const acceptResponse = {
  data: {
    agentId: "7d12d9ea-e8e0-41ee-81bf-c11a685b64ed",
    eventType: "RoutingMessage",
    interaction: {
      callAssociatedData: {
        ani: {
          value: "janedoe@gmail.com"
        },
        category: {
          value: "Sales"
        },
        customerName: {
          value: "Jane Doe"
        },
        dn: {
          value: "Desktop"
        },
        entryPointId: {
          value: "AXCqFyz1G2pKap9PI-mW"
        },
        guestId: {
          value:
            "Y2lzY29zcGFyazovL3VzL1BFT1BMRS83ZjA3YjJmMC1jNTMyLTQ5MDktYTkzNi0yYTA3MTVmZGIwMTA"
        },
        mediaChannel: {
          value: "web"
        },
        reason: {
          value: "Test"
        },
        reasonCode: {
          value: "Sales"
        },
        ronaTimeout: {
          value: "30"
        },
        roomTitle: {
          value: "Help Jane Doe with Sales"
        },
        taskToBeSelfServiced: {
          value: "false"
        },
        templateId: {
          value: "b57990c0-5ec6-11ea-96ee-5df5aef56329"
        },
        templateName: {
          value: "Desktop"
        },
        virtualTeamName: {
          value: "Chat_Queue"
        }
      },
      callAssociatedDetails: {
        ani: "janedoe@gmail.com",
        category: "Sales",
        customerName: "Jane Doe",
        dn: "Desktop",
        entryPointId: "AXCqFyz1G2pKap9PI-mW",
        guestId:
          "Y2lzY29zcGFyazovL3VzL1BFT1BMRS83ZjA3YjJmMC1jNTMyLTQ5MDktYTkzNi0yYTA3MTVmZGIwMTA",
        mediaChannel: "web",
        reason: "Test",
        reasonCode: "Sales",
        ronaTimeout: "30",
        roomTitle: "Help Jane Doe with Sales",
        taskToBeSelfServiced: "false",
        templateId: "b57990c0-5ec6-11ea-96ee-5df5aef56329",
        templateName: "Desktop",
        virtualTeamName: "Chat_Queue"
      },
      callFlowParams: {
        Automation: {
          description: "(vteam, A valid VTeam.)",
          name: "Automation",
          qualifier: "vteam",
          value: "3270",
          valueDataType: "string"
        },
        Debit: {
          description: "(vteam, A valid VTeam.)",
          name: "Debit",
          qualifier: "vteam",
          value: "3270",
          valueDataType: "string"
        },
        Sales: {
          description: "(vteam, A valid VTeam.)",
          name: "Sales",
          qualifier: "vteam",
          value: "3270",
          valueDataType: "string"
        }
      },
      callProcessingDetails: {
        QMgrName: "aqm",
        QueueId: "3270",
        ani: "janedoe@gmail.com",
        category: "Sales",
        customerName: "Jane Doe",
        dnis: "Desktop",
        entryPointId: "AXCqFyz1G2pKap9PI-mW",
        guestId:
          "Y2lzY29zcGFyazovL3VzL1BFT1BMRS83ZjA3YjJmMC1jNTMyLTQ5MDktYTkzNi0yYTA3MTVmZGIwMTA",
        mediaChannel: "web",
        reason: "Test",
        reasonCode: "Sales",
        ronaTimeout: "30",
        roomTitle: "Help Jane Doe with Sales",
        taskToBeSelfServiced: "false",
        templateId: "b57990c0-5ec6-11ea-96ee-5df5aef56329",
        templateName: "Desktop",
        tenantId: "133",
        virtualTeamName: "Chat_Queue",
        vteamId: "AXCqFyz1G2pKap9PI-mW"
      },
      contactDirection: {
        type: "INBOUND"
      },
      currentVTeam: "3270",
      interactionId: "59dbbca6-4194-11eb-881c-253923a967e0",
      isFcManaged: false,
      isTerminated: false,
      media: {
        Y2lzY29zcGFyazovL3VzL1JPT00vNjVjOWVlYjAtNDE5NC0xMWViLWE1N2QtZWY2N2MwZTMyYmFh:
          {
            holdTimestamp: null,
            isHold: false,
            mType: "mainCall",
            mediaMgr: "cmm",
            mediaResourceId:
              "Y2lzY29zcGFyazovL3VzL1JPT00vNjVjOWVlYjAtNDE5NC0xMWViLWE1N2QtZWY2N2MwZTMyYmFh",
            mediaType: "chat",
            participants: [
              "janedoe@gmail.com",
              "7d12d9ea-e8e0-41ee-81bf-c11a685b64ed"
            ]
          }
      },
      mediaChannel: "web",
      mediaType: "chat",
      orgId: "f111e3af-1a45-42ef-9erf-4562354b8a25",
      outboundType: null,
      owner: "7d12d9ea-e8e0-41ee-81bf-c11a685b64ed",
      participants: {
        "7d12d9ea-e8e0-41ee-81bf-c11a685b64ed": {
          channelId: "bff9350a-9d2a-489a-a8d5-d9dacea4b692",
          consultState: null,
          consultTimestamp: null,
          dn: "9997770110",
          hasJoined: true,
          id: "7d12d9ea-e8e0-41ee-81bf-c11a685b64ed",
          isConsulted: false,
          isWrapUp: false,
          joinTimestamp: 1608339210824,
          lastUpdated: 1608339210824,
          name: "uuip-agent4 uuip-agent4",
          pType: "Agent",
          queueId: "3270",
          queueMgrId: "aqm",
          sessionId: "102d2096-bcc0-45bb-a583-a02f6c188071",
          siteId: "473",
          teamId: "1940",
          teamName: "Medical Help",
          type: "Agent",
          wrapUpTimestamp: null
        },
        "janedoe@gmail.com": {
          id: "janedoe@gmail.com",
          pType: "Customer",
          type: "Customer"
        }
      },
      previousVTeams: [],
      state: "connected"
    },
    interactionId: "59dbbca6-4194-11eb-881c-253923a967e0",
    mediaResourceId:
      "Y2lzY29zcGFyazovL3VzL1JPT00vNjVjOWVlYjAtNDE5NC0xMWViLWE1N2QtZWY2N2MwZTMyYmFh",
    orgId: "f111e3af-1a45-42ef-9erf-4562354b8a25",
    queueMgr: "aqm",
    trackingId: "9c9b97e0-4194-11eb-b819-7b8dd50ee0cd",
    type: "AgentContactAssigned"
  },
  orgId: "f111e3af-1a45-42ef-9erf-4562354b8a25",
  trackingId: "notifs_02db68c8-a5db-4028-95bb-1aebd6f87609",
  type: "RoutingMessage"
};
endV2()

Ends an interaction for a specific task. Note: The end call feature is enabled using the isEndCallEnabled payload. For more information, see Agent State Information Module.

Example

await Desktop.agentContact.endV2({
    interactionId: “c837e6f7 - 699 a - 4736 - bb82 - 03 a6d58bb7f3”,
    isEndingFromNonPrimary: true
});

The following table lists the payload details:

NameTypeDescriptionRequired
interactionIdStringUnique identifier for the user interaction.Yes
isEndingFromNonPrimaryBooleanDetermines whether the end requested from non primary agent.Yes

Returns

{Object} The value that corresponds to the task.

Note: The type parameter value in the response payload depends on the success or failure of the method. If the method is successful, the value is AgentWrapup or ContactEnded; else, ContactEndFailed.

Example Response

const endResponse = {
  data: {
    agentsPendingWrapUp: ["7d12d9ea-e8e0-41ee-81bf-c11a685b64ed"],
    eventType: "RoutingMessage",
    interaction: {
      callAssociatedData: {
        ani: {
          value: "janedoe@gmail.com"
        },
        category: {
          value: "Sales"
        },
        customerName: {
          value: "Jane Doe"
        },
        dn: {
          value: "Desktop"
        },
        entryPointId: {
          value: "AXCqFyz1G2pKap9PI-mW"
        },
        guestId: {
          value:
            "Y2lzY29zcGFyazovL3VzL1BFT1BMRS81NzNiODg1Mi1kZjM3LTRlODEtOGMxMi1mZjkyMTE3MmQ1NzY"
        },
        mediaChannel: {
          value: "web"
        },
        reason: {
          value: "Test"
        },
        reasonCode: {
          value: "Sales"
        },
        ronaTimeout: {
          value: "30"
        },
        roomTitle: {
          value: "Help Jane Doe with Sales"
        },
        taskToBeSelfServiced: {
          value: "false"
        },
        templateId: {
          value: "b57990c0-5ec6-11ea-96ee-5df5aef56329"
        },
        templateName: {
          value: "Desktop"
        },
        virtualTeamName: {
          value: "Chat_Queue"
        }
      },
      callAssociatedDetails: {
        ani: "janedoe@gmail.com",
        category: "Sales",
        customerName: "Jane Doe",
        dn: "Desktop",
        entryPointId: "AXCqFyz1G2pKap9PI-mW",
        guestId:
          "Y2lzY29zcGFyazovL3VzL1BFT1BMRS81NzNiODg1Mi1kZjM3LTRlODEtOGMxMi1mZjkyMTE3MmQ1NzY",
        mediaChannel: "web",
        reason: "Please help",
        reasonCode: "Sales",
        ronaTimeout: "30",
        roomTitle: "Help Jane Doe with Sales",
        taskToBeSelfServiced: "false",
        templateId: "b57990c0-5ec6-11ea-96ee-5df5aef56329",
        templateName: "Desktop",
        virtualTeamName: "Chat_Queue"
      },
      callFlowParams: {
        Automation: {
          description: "(vteam, A valid VTeam.)",
          name: "Automation",
          qualifier: "vteam",
          value: "3270",
          valueDataType: "string"
        },
        Debit: {
          description: "(vteam, A valid VTeam.)",
          name: "Debit",
          qualifier: "vteam",
          value: "3270",
          valueDataType: "string"
        },
        Sales: {
          description: "(vteam, A valid VTeam.)",
          name: "Sales",
          qualifier: "vteam",
          value: "3270",
          valueDataType: "string"
        }
      },
      callProcessingDetails: {
        QMgrName: "aqm",
        QueueId: "3270",
        ani: "janedoe@gmail.com",
        category: "Sales",
        customerName: "Jane Doe",
        dnis: "Desktop",
        entryPointId: "AXCqFyz1G2pKap9PI-mW",
        guestId:
          "Y2lzY29zcGFyazovL3VzL1BFT1BMRS81NzNiODg1Mi1kZjM3LTRlODEtOGMxMi1mZjkyMTE3MmQ1NzY",
        mediaChannel: "web",
        pauseDuration: "10",
        pauseResumeEnabled: "true",
        reason: "Please help",
        reasonCode: "Sales",
        ronaTimeout: "30",
        roomTitle: "Help Jane Doe with Sales",
        taskToBeSelfServiced: "false",
        templateId: "b57990c0-5ec6-11ea-96ee-5df5aef56329",
        templateName: "Desktop",
        tenantId: "133",
        virtualTeamName: "Chat_Queue",
        vteamId: "AXCqFyz1G2pKap9PI-mW"
      },
      contactDirection: {
        type: "INBOUND"
      },
      currentVTeam: "3270",
      interactionId: "a66d05ab-40ab-11eb-b59a-7d3326b3ffc1",
      isFcManaged: false,
      isTerminated: true,
      media: {},
      mediaChannel: "web",
      mediaType: "chat",
      orgId: "f111e3af-1a45-42ef-9erf-4562354b8a25",
      outboundType: null,
      owner: "7d12d9ea-e8e0-41ee-81bf-c11a685b64ed",
      participants: {
        "7d12d9ea-e8e0-41ee-81bf-c11a685b64ed": {
          channelId: "ff0a5296-8aa2-483b-8c50-577fedb1bfde",
          consultState: null,
          consultTimestamp: null,
          dn: "9997770110",
          hasJoined: true,
          id: "7d12d9ea-e8e0-41ee-81bf-c11a685b64ed",
          isConsulted: false,
          isWrapUp: false,
          joinTimestamp: 1608239195992,
          lastUpdated: 1608239195992,
          name: "uuip-agent4 uuip-agent4",
          pType: "Agent",
          queueId: "3270",
          queueMgrId: "aqm",
          sessionId: "b8c096ab-f9a0-49be-9efd-f8c78e1a7061",
          siteId: "473",
          teamId: "962",
          teamName: "Team X",
          type: "Agent",
          wrapUpTimestamp: null
        },
        "janedoe@gmail.com": {
          id: "janedoe@gmail.com",
          pType: "Customer",
          type: "Customer"
        }
      },
      previousVTeams: [],
      state: "connected"
    },
    interactionId: "a66d05ab-40ab-11eb-b59a-7d3326b3ffc1",
    mediaResourceId:
      "Y2lzY29zcGFyazovL3VzL1JPT00vYWEzNTA5YzAtNDBhYi0xMWViLWE1N2QtZWY2N2MwZTMyYmFh",
    orgId: "f111e3af-1a45-42ef-9erf-4562354b8a25",
    queueMgr: "aqm",
    trackingId: "4eb68870-40ac-11eb-8866-d7ef6ff89aa6",
    type: "ContactEnded"
  },
  orgId: "f111e3af-1a45-42ef-9erf-4562354b8a25",
  trackingId: "notifs_3cda2c34-1410-4476-9c5c-5d779a615b8a",
  type: "RoutingMessage"
};
cancelTaskV2()

Ends an interaction for a specific task. Note: The end call feature is enabled using the isEndCallEnabled payload. For more information, see Agent State Information Module.

Example

await Desktop.agentContact.cancelTaskV2({
    interactionId: “c837e6f7 - 699 a - 4736 - bb82 - 03 a6d58bb7f3”
});

The following table lists the payload details:

NameTypeDescriptionRequired
interactionIdStringUnique identifier for the user interaction.Yes

Returns

{Object} The value that corresponds to the task.

Note: The type parameter value in the response payload depends on the success or failure of the method. If the method is successful, the value is ContactEnded; else, ContactEndFailed.

Example Response

const endResponse = {
  data: {
    agentsPendingWrapUp: ["7d12d9ea-e8e0-41ee-81bf-c11a685b64ed"],
    eventType: "RoutingMessage",
    interaction: {
      callAssociatedData: {
        ani: {
          value: "janedoe@gmail.com"
        },
        category: {
          value: "Sales"
        },
        customerName: {
          value: "Jane Doe"
        },
        dn: {
          value: "Desktop"
        },
        entryPointId: {
          value: "AXCqFyz1G2pKap9PI-mW"
        },
        guestId: {
          value:
            "Y2lzY29zcGFyazovL3VzL1BFT1BMRS81NzNiODg1Mi1kZjM3LTRlODEtOGMxMi1mZjkyMTE3MmQ1NzY"
        },
        mediaChannel: {
          value: "web"
        },
        reason: {
          value: "Test"
        },
        reasonCode: {
          value: "Sales"
        },
        ronaTimeout: {
          value: "30"
        },
        roomTitle: {
          value: "Help Jane Doe with Sales"
        },
        taskToBeSelfServiced: {
          value: "false"
        },
        templateId: {
          value: "b57990c0-5ec6-11ea-96ee-5df5aef56329"
        },
        templateName: {
          value: "Desktop"
        },
        virtualTeamName: {
          value: "Chat_Queue"
        }
      },
      callAssociatedDetails: {
        ani: "janedoe@gmail.com",
        category: "Sales",
        customerName: "Jane Doe",
        dn: "Desktop",
        entryPointId: "AXCqFyz1G2pKap9PI-mW",
        guestId:
          "Y2lzY29zcGFyazovL3VzL1BFT1BMRS81NzNiODg1Mi1kZjM3LTRlODEtOGMxMi1mZjkyMTE3MmQ1NzY",
        mediaChannel: "web",
        reason: "Please help",
        reasonCode: "Sales",
        ronaTimeout: "30",
        roomTitle: "Help Jane Doe with Sales",
        taskToBeSelfServiced: "false",
        templateId: "b57990c0-5ec6-11ea-96ee-5df5aef56329",
        templateName: "Desktop",
        virtualTeamName: "Chat_Queue"
      },
      callFlowParams: {
        Automation: {
          description: "(vteam, A valid VTeam.)",
          name: "Automation",
          qualifier: "vteam",
          value: "3270",
          valueDataType: "string"
        },
        Debit: {
          description: "(vteam, A valid VTeam.)",
          name: "Debit",
          qualifier: "vteam",
          value: "3270",
          valueDataType: "string"
        },
        Sales: {
          description: "(vteam, A valid VTeam.)",
          name: "Sales",
          qualifier: "vteam",
          value: "3270",
          valueDataType: "string"
        }
      },
      callProcessingDetails: {
        QMgrName: "aqm",
        QueueId: "3270",
        ani: "janedoe@gmail.com",
        category: "Sales",
        customerName: "Jane Doe",
        dnis: "Desktop",
        entryPointId: "AXCqFyz1G2pKap9PI-mW",
        guestId:
          "Y2lzY29zcGFyazovL3VzL1BFT1BMRS81NzNiODg1Mi1kZjM3LTRlODEtOGMxMi1mZjkyMTE3MmQ1NzY",
        mediaChannel: "web",
        pauseDuration: "10",
        pauseResumeEnabled: "true",
        reason: "Please help",
        reasonCode: "Sales",
        ronaTimeout: "30",
        roomTitle: "Help Jane Doe with Sales",
        taskToBeSelfServiced: "false",
        templateId: "b57990c0-5ec6-11ea-96ee-5df5aef56329",
        templateName: "Desktop",
        tenantId: "133",
        virtualTeamName: "Chat_Queue",
        vteamId: "AXCqFyz1G2pKap9PI-mW"
      },
      contactDirection: {
        type: "INBOUND"
      },
      currentVTeam: "3270",
      interactionId: "a66d05ab-40ab-11eb-b59a-7d3326b3ffc1",
      isFcManaged: false,
      isTerminated: true,
      media: {},
      mediaChannel: "web",
      mediaType: "chat",
      orgId: "f111e3af-1a45-42ef-9erf-4562354b8a25",
      outboundType: null,
      owner: "7d12d9ea-e8e0-41ee-81bf-c11a685b64ed",
      participants: {
        "7d12d9ea-e8e0-41ee-81bf-c11a685b64ed": {
          channelId: "ff0a5296-8aa2-483b-8c50-577fedb1bfde",
          consultState: null,
          consultTimestamp: null,
          dn: "9997770110",
          hasJoined: true,
          id: "7d12d9ea-e8e0-41ee-81bf-c11a685b64ed",
          isConsulted: false,
          isWrapUp: false,
          joinTimestamp: 1608239195992,
          lastUpdated: 1608239195992,
          name: "uuip-agent4 uuip-agent4",
          pType: "Agent",
          queueId: "3270",
          queueMgrId: "aqm",
          sessionId: "b8c096ab-f9a0-49be-9efd-f8c78e1a7061",
          siteId: "473",
          teamId: "962",
          teamName: "Team X",
          type: "Agent",
          wrapUpTimestamp: null
        },
        "janedoe@gmail.com": {
          id: "janedoe@gmail.com",
          pType: "Customer",
          type: "Customer"
        }
      },
      previousVTeams: [],
      state: "connected"
    },
    interactionId: "a66d05ab-40ab-11eb-b59a-7d3326b3ffc1",
    mediaResourceId:
      "Y2lzY29zcGFyazovL3VzL1JPT00vYWEzNTA5YzAtNDBhYi0xMWViLWE1N2QtZWY2N2MwZTMyYmFh",
    orgId: "f111e3af-1a45-42ef-9erf-4562354b8a25",
    queueMgr: "aqm",
    trackingId: "4eb68870-40ac-11eb-8866-d7ef6ff89aa6",
    type: "ContactEnded"
  },
  orgId: "f111e3af-1a45-42ef-9erf-4562354b8a25",
  trackingId: "notifs_3cda2c34-1410-4476-9c5c-5d779a615b8a",
  type: "RoutingMessage"
};
pauseRecordingV2()

Pauses a call recording while obtaining sensitive information such as credit card information from the customer.

When configured by the administrator, voice calls are recorded for various reasons. When an agent handles sensitive customer information, the agent might want to pause the recording. The Pause/Resume functionality is available on the Desktop through the Interaction Control pane. You can access the Pause/Resume functionality from your widget also.

Example

await Desktop.agentContact.pauseRecordingV2({
    interactionId: “c837e6f7 - 699 a - 4736 - bb82 - 03 a6d58bb7f3”
});
// Pausing a recording for telephony task

The following table lists the payload details:

NameTypeDescriptionRequired
interactionIdStringUnique identifier for the user interaction.Yes

Returns{Object} The object with the retrieved data.

Note: The type parameter value in the response payload depends on the success or failure of the method. If the method is successful, the value is ContactRecordingPaused; else, ContactRecordingPauseFailed.

Example Response

const pauseRecordingResponse = {
  data: {
    eventType: "RoutingMessage",
    interaction: {
      callAssociatedData: {
        dn: {
          agentEditable: false,
          displayName: "dn",
          name: "dn",
          type: "STRING",
          value: "8895579172"
        },
        ronaTimeout: {
          agentEditable: false,
          displayName: "ronaTimeout",
          name: "ronaTimeout",
          type: "STRING",
          value: "30"
        },
        virtualTeamName: {
          agentEditable: false,
          displayName: "virtualTeamName",
          name: "virtualTeamName",
          type: "STRING",
          value: "Outdial Queue-1"
        }
      },
      callAssociatedDetails: {
        dn: "8895579172",
        ronaTimeout: "30",
        virtualTeamName: "Outdial Queue-1"
      },
      callFlowParams: {
        OutdialQueue: {
          description: "(vteam, The Outdial Queue.)",
          name: "OutdialQueue",
          qualifier: "vteam",
          value: "3264",
          valueDataType: "string"
        }
      },
      callProcessingDetails: {
        QMgrName: "aqm",
        QueueId: "3264",
        dnis: "8895579172",
        isPaused: "true",
        outdialTransferToQueueEnabled: "false",
        pauseDuration: "10",
        pauseResumeEnabled: "true",
        recordInProgress: "true",
        ronaTimeout: "30",
        taskToBeSelfServiced: "false",
        tenantId: "133",
        virtualTeamName: "Outdial Queue-1",
        vteamId: "AXCLfZZU9S1oTdqE1OFZ"
      },
      contactDirection: {
        type: "OUTBOUND"
      },
      currentVTeam: "3264",
      interactionId: "1dd08726-bca5-4ce8-9b51-b20dca8ab154",
      isFcManaged: false,
      isTerminated: false,
      media: {
        "1dd08726-bca5-4ce8-9b51-b20dca8ab154": {
          holdTimestamp: null,
          isHold: false,
          mType: "mainCall",
          mediaMgr: "vmm",
          mediaResourceId: "1dd08726-bca5-4ce8-9b51-b20dca8ab154",
          mediaType: "telephony",
          participants: [""]
        }
      },
      mediaChannel: "dialer",
      mediaType: "telephony",
      orgId: "f111e3af-1a45-42ef-9erf-4562354b8a25",
      outboundType: "OUTDIAL",
      owner: "7c867aa9-ec768-341a-b767-e5hd6ae7g701",
      participants: {
        "": {
          id: "",
          pType: "Customer",
          type: "Customer"
        },
        "7c867aa9-ec768-341a-b767-e5hd6ae7g701": {
          channelId: "0717a2ce-76cd-4ba4-9053-71f2c78168b8",
          consultState: null,
          consultTimestamp: null,
          dn: "8895579172",
          hasJoined: true,
          id: "7c867aa9-ec768-341a-b767-e5hd6ae7g701",
          isConsulted: false,
          isWrapUp: false,
          joinTimestamp: 1612354635705,
          lastUpdated: 1612354635705,
          name: "John Doe",
          pType: "Agent",
          queueId: "3264",
          queueMgrId: "aqm",
          sessionId: "3d017488-527a-4e89-9313-5d4eb353c789",
          siteId: "472",
          teamId: "960",
          teamName: "Email_Team",
          type: "Agent",
          wrapUpTimestamp: null
        }
      },
      previousVTeams: [],
      state: "connected",
      workflowManager: null
    },
    interactionId: "1dd08726-bca5-4ce8-9b51-b20dca8ab154",
    orgId: "f111e3af-1a45-42ef-9erf-4562354b8a25",
    queueMgr: "aqm",
    trackingId: "b031f6d7-63a3-49d9-b377-e848bce41bd3",
    type: "ContactRecordingPaused"
  },
  orgId: "f111e3af-1a45-42ef-9erf-4562354b8a25",
  trackingId: "notifs_52a00992-95e8-438c-ac44-8302da18d252",
  type: "RoutingMessage"
};
resumeRecordingV2()

Resumes a voice call recording that is paused.

Example

await Desktop.agentContact.resumeRecordingV2({
    interactionId: “c837e6f7 - 699 a - 4736 - bb82 - 03 a6d58bb7f3”,
    data: {
        autoResumed: true
    }
});
// Resuming recording for telephony task
// resumeRecording Payload Type

{
    interactionId: string;data: {
        autoResumed: boolean
    }
}

The following table lists the payload details:

NameTypeDescriptionRequired
interactionIdStringUnique identifier for the user interaction.Yes
dataObjectOptions to resume a voice call recording that is paused.Yes
-->autoResumedBooleanDetermines whether the paused call must be resumed manually.
True—Voice call to be resumed automatically after the specified time is lapsed.
False—User to take action on the paused voice call based on the button defined. For example, Start Recording.
Yes

Returns{Object} The object with the retrieved data.

Note: The type parameter value in the response payload depends on the success or failure of the method. If the method is successful, the value is ContactRecordingResumed; else, ContactRecordingResumeFailed.

Example Response

const resumeRecordingResponse = {
  data: {
    autoResumed: true,
    eventType: "RoutingMessage",
    interaction: {
      callAssociatedData: {
        dn: {
          agentEditable: false,
          displayName: "dn",
          name: "dn",
          type: "STRING",
          value: "8895579172"
        },
        ronaTimeout: {
          agentEditable: false,
          displayName: "ronaTimeout",
          name: "ronaTimeout",
          type: "STRING",
          value: "30"
        },
        virtualTeamName: {
          agentEditable: false,
          displayName: "virtualTeamName",
          name: "virtualTeamName",
          type: "STRING",
          value: "Outdial Queue-1"
        }
      },
      callAssociatedDetails: {
        dn: "8895579172",
        ronaTimeout: "30",
        virtualTeamName: "Outdial Queue-1"
      },
      callFlowParams: {
        OutdialQueue: {
          description: "(vteam, The Outdial Queue.)",
          name: "OutdialQueue",
          qualifier: "vteam",
          value: "3264",
          valueDataType: "string"
        }
      },
      callProcessingDetails: {
        QMgrName: "aqm",
        QueueId: "3264",
        dnis: "8895579172",
        isPaused: "false",
        outdialTransferToQueueEnabled: "false",
        pauseDuration: "10",
        pauseResumeEnabled: "true",
        recordInProgress: "true",
        ronaTimeout: "30",
        taskToBeSelfServiced: "false",
        tenantId: "133",
        virtualTeamName: "Outdial Queue-1",
        vteamId: "AXCLfZZU9S1oTdqE1OFZ"
      },
      contactDirection: {
        type: "OUTBOUND"
      },
      currentVTeam: "3264",
      interactionId: "1dd08726-bca5-4ce8-9b51-b20dca8ab154",
      isFcManaged: false,
      isTerminated: false,
      media: {
        "1dd08726-bca5-4ce8-9b51-b20dca8ab154": {
          holdTimestamp: null,
          isHold: false,
          mType: "mainCall",
          mediaMgr: "vmm",
          mediaResourceId: "1dd08726-bca5-4ce8-9b51-b20dca8ab154",
          mediaType: "telephony",
          participants: [""]
        }
      },
      mediaChannel: "dialer",
      mediaType: "telephony",
      orgId: "f111e3af-1a45-42ef-9erf-4562354b8a25",
      outboundType: "OUTDIAL",
      owner: "7c867aa9-ec768-341a-b767-e5hd6ae7g701",
      participants: {
        "": {
          id: "",
          pType: "Customer",
          type: "Customer"
        },
        "7c867aa9-ec768-341a-b767-e5hd6ae7g701": {
          channelId: "0717a2ce-76cd-4ba4-9053-71f2c78168b8",
          consultState: null,
          consultTimestamp: null,
          dn: "8895579172",
          hasJoined: true,
          id: "7c867aa9-ec768-341a-b767-e5hd6ae7g701",
          isConsulted: false,
          isWrapUp: false,
          joinTimestamp: 1612354635705,
          lastUpdated: 1612354635705,
          name: "John Doe",
          pType: "Agent",
          queueId: "3264",
          queueMgrId: "aqm",
          sessionId: "3d017488-527a-4e89-9313-5d4eb353c789",
          siteId: "472",
          teamId: "960",
          teamName: "Email_Team",
          type: "Agent",
          wrapUpTimestamp: null
        }
      },
      previousVTeams: [],
      state: "connected",
      workflowManager: null
    },
    interactionId: "1dd08726-bca5-4ce8-9b51-b20dca8ab154",
    orgId: "f111e3af-1a45-42ef-9erf-4562354b8a25",
    queueMgr: "aqm",
    trackingId: "9cf5bfc4-d120-4330-9996-039a9937c52c",
    type: "ContactRecordingResumed"
  },
  orgId: "f111e3af-1a45-42ef-9erf-4562354b8a25",
  trackingId: "notifs_c04510a0-140a-439c-9ab4-68b6fdf6ea2e",
  type: "RoutingMessage"
};
wrapupV2()

Wraps up work for a task. Wrap up reason is applied after the task has been ended either by the agent or by the customer. A wrap up is essential and is the last step in an agent's flow of handling tasks.

Example

await Desktop.agentContact.wrapupV2({
    interactionId: “dab1a2f0 - bad0 - 11 ea - 8e7 c - 0 d99ede2535a”,
    data: {
        wrapUpReason: "Sales";
        auxCodeId: "AXUH3oN12eV-WekpnDpl";
        isAutoWrapup: "false";
    }
});

// Wrap Payload Type

{
    interactionId: string;data: Contact.WrapupPayLoad
}

The following table lists the payload details:

NameTypeDescriptionRequired
interactionIdStringUnique identifier for the user interaction.Yes
dataObjectOptions of the wrap up.Yes
-->wrapUpReasonStringEvery wrap up reason will have an unique auxillary code. Use this field to specify the reason for wrapping up the call, maximum length 128 characters.Yes
-->auxCodeIdStringAuxiliary codes are status codes which an agent can select in Webex Contact Center Agent Desktop. They are of two types: Idle and Wrap-Up codes, and every agent profile must have one of each for the agent to use. Wrap-up codes indicate the result of customer contacts, such as successful resolution or escalation of the contact. Creating and managing auxiliary codes requires an administrator role and the appropriate cjp:config_write or cjp:config_read scopes, maximum length 36 characters.Yes
-->isAutoWrapupBooleanDetermines whether the auto wrap up is enabled or not.

- True—The auto warp up is enabled.
- False—The auto warp up is disabled.
Yes

Returns{Object} The object with the retrieved data.

Note: The type parameter value in the response payload depends on the success or failure of the method. If the method is successful, the value is AgentWrappedUp; else, AgentWrapupFailed.

Example Response

const wrapUpResponse = {
    "data": {
        "agentId": "7d12d9ea-e8e0-41ee-81bf-c11a685b64ed",
        "eventType": "RoutingMessage",
        "interaction": {
            "callAssociatedData": {
                "ani": {
                    "value": "janedoe@gmail.com"
                },
                "category": {
                    "value": "Sales"
                },
                "customerName": {
                    "value": "Jane Doe"
                },
                "dn": {
                    "value": "Desktop"
                },
                "entryPointId": {
                    "value": "AXCqFyz1G2pKap9PI-mW"
                },
                "guestId": {
                    "value": "Y2lzY29zcGFyazovL3VzL1BFT1BMRS81NzNiODg1Mi1kZjM3LTRlODEtOGMxMi1mZjkyMTE3MmQ1NzY"
                },
                "mediaChannel": {
                    "value": "web"
                },
                "reason": {
                    ,
                    "value": "Test"
                },
                "reasonCode": {
                    "value": "Sales"
                },
                "ronaTimeout": {
                    "value": "30"
                },
                "roomTitle": {
                    "value": "Help Jane Doe with Sales"
                },
                "taskToBeSelfServiced": {
                    "value": "false"
                },
                "templateId": {
                    "value": "b57990c0-5ec6-11ea-96ee-5df5aef56329"
                },
                "templateName": {
                    "value": "Desktop"
                },
                "virtualTeamName": {
                    "value": "Chat_Queue"
                }
            },
            "callAssociatedDetails": {
                "ani": "janedoe@gmail.com",
                "category": "Sales",
                "customerName": "Jane Doe",
                "dn": "Desktop",
                "entryPointId": "AXCqFyz1G2pKap9PI-mW",
                "guestId": "Y2lzY29zcGFyazovL3VzL1BFT1BMRS81NzNiODg1Mi1kZjM3LTRlODEtOGMxMi1mZjkyMTE3MmQ1NzY",
                "mediaChannel": "web",
                "reason": "Test",
                "reasonCode": "Sales",
                "ronaTimeout": "30",
                "roomTitle": "Help Jane Doe with Sales",
                "taskToBeSelfServiced": "false",
                "templateId": "b57990c0-5ec6-11ea-96ee-5df5aef56329",
                "templateName": "Desktop",
                "virtualTeamName": "Chat_Queue"
            },
            "callFlowParams": {
                "Automation": {
                    "description": "(vteam, A valid VTeam.)",
                    "name": "Automation",
                    "qualifier": "vteam",
                    "value": "3270",
                    "valueDataType": "string"
                },
                "Debit": {
                    "description": "(vteam, A valid VTeam.)",
                    "name": "Debit",
                    "qualifier": "vteam",
                    "value": "3270",
                    "valueDataType": "string"
                },
                "Sales": {
                    "description": "(vteam, A valid VTeam.)",
                    "name": "Sales",
                    "qualifier": "vteam",
                    "value": "3270",
                    "valueDataType": "string"
                }
            },
            "callProcessingDetails": {
                "QMgrName": "aqm",
                "QueueId": "3270",
                "ani": "janedoe@gmail.com",
                "category": "Sales",
                "customerName": "Jane Doe",
                "dnis": "Desktop",
                "entryPointId": "AXCqFyz1G2pKap9PI-mW",
                "guestId": "Y2lzY29zcGFyazovL3VzL1BFT1BMRS81NzNiODg1Mi1kZjM3LTRlODEtOGMxMi1mZjkyMTE3MmQ1NzY",
                "mediaChannel": "web",
                "pauseDuration": "10",
                "pauseResumeEnabled": "true",
                "reason": "Test",
                "reasonCode": "Sales",
                "ronaTimeout": "30",
                "roomTitle": "Help Jane Doe with Sales",
                "taskToBeSelfServiced": "false",
                "templateId": "b57990c0-5ec6-11ea-96ee-5df5aef56329",
                "templateName": "Desktop",
                "tenantId": "133",
                "virtualTeamName": "Chat_Queue",
                "vteamId": "AXCqFyz1G2pKap9PI-mW"
            },
            "contactDirection": {
                "type": "INBOUND"
            },
            "currentVTeam": "3270",
            "interactionId": "a66d05ab-40ab-11eb-b59a-7d3326b3ffc1",
            "isFcManaged": false,
            "isTerminated": true,
            "media": {},
            "mediaChannel": "web",
            "mediaType": "chat",
            "orgId": "f111e3af-1a45-42ef-9erf-4562354b8a25",
            "outboundType": null,
            "owner": "7d12d9ea-e8e0-41ee-81bf-c11a685b64ed",
            "participants": {
                "janedoe@gmail.com": {
                    "id": "janedoe@gmail.com",
                    "pType": "Customer",
                    "type": "Customer"
                }
            },
            "previousVTeams": [],
            "state": "connected"
        },
        "interactionId": "a66d05ab-40ab-11eb-b59a-7d3326b3ffc1",
        "orgId": "f111e3af-1a45-42ef-9erf-4562354b8a25",
        "queueMgr": "aqm",
        "trackingId": "5272a610-40ac-11eb-8866-d7ef6ff89aa6",
        "type": "AgentWrappedUp",
        "wrapUpAuxCodeId": "0"
    },
    "orgId": "f111e3af-1a45-42ef-9erf-4562354b8a25",
    "trackingId": "notifs_b5e0ebb7-fd1d-479f-8663-81a64030cee6",
    "type": "RoutingMessage"
}
consultV2()

Initiates a consult request with an agent, a dial number (DN), a entrypoint or a queue.

Note: The consult call to queue feature is enabled using the allowConsultToQueue payload. For more information, see Agent State Information Module.

Example

await Desktop.agentContact.consultV2({
    interactionId: “a26d035d - b547 - 11 ea - 984 b - d3128111ce6b”,
    data: {
        to: “43 bfcdef - 5551 - 45 b1 - a8f9 - a0b33e66e3fe”,
        destinationType: “f795f41f - 3782 - 44 fa - 97 a4 - c8b4dc029477”,
        holdParticipants: true
    }
});
// consult Payload Type
type consultDataV2 = {
  to: string | undefined;
  destinationType: string;
  holdParticipants?: boolean;
};

The following table lists the payload details:

NameTypeDescriptionRequired
interactionIdStringUnique identifier for the user interaction.Yes
dataObjectOptions of the consult request.Yes
-->toStringUnique identifier a agentId or a queueId, or a dialNumber or a entryPointId.Yes
-->destinationTypeStringThe type of consult request to be placed. The destination type can be agent, queue, or dialNumber, or entryPoint.Yes
-->holdParticipantsBooleanDetermines whether to hold the particpants or not during consult.Yes

Returns{Object} The object with the retrieved data.

Note: The type parameter value in the response payload depends on the success or failure of the method. If the method is successful, the value is AgentConsultCreated; else, AgentCtqFailed or AgentConsultFailed.

Example Response

const consultResponse = {
  data: {
    agentId: "7d12d9ea-e8e0-41ee-81bf-c11a685b64ed",
    consultMediaResourceId:
      "consult_Y2lzY29zcGFyazovL3VzL1JPT00vNjJkYjBmMzAtNDBhZi0xMWViLWE3ZGItYjkyYTZkMmI5NTI1",
    destAgentId: "aad323de-32d8-48c9-af6b-b68dfbabfe20",
    destinationType: "Agent",
    eventType: "RoutingMessage",
    interaction: {
      callAssociatedData: {
        ani: {
          value: "janedoe@gmail.com"
        },
        category: {
          value: "Sales"
        },
        customerName: {
          value: "Jane Doe"
        },
        dn: {
          value: "Desktop"
        },
        entryPointId: {
          value: "AXCqFyz1G2pKap9PI-mW"
        },
        guestId: {
          value:
            "Y2lzY29zcGFyazovL3VzL1BFT1BMRS81NzNiODg1Mi1kZjM3LTRlODEtOGMxMi1mZjkyMTE3MmQ1NzY"
        },
        mediaChannel: {
          value: "web"
        },
        reason: {
          value: "test"
        },
        reasonCode: {
          value: "Sales"
        },
        ronaTimeout: {
          value: "30"
        },
        roomTitle: {
          value: "Help Jane Doe with Sales"
        },
        taskToBeSelfServiced: {
          value: "false"
        },
        templateId: {
          value: "b57990c0-5ec6-11ea-96ee-5df5aef56329"
        },
        templateName: {
          value: "Desktop"
        },
        virtualTeamName: {
          agentEditable: false,
          displayName: "virtualTeamName",
          name: "virtualTeamName",
          type: "STRING",
          value: "Chat_Queue"
        }
      },
      callAssociatedDetails: {
        ani: "janedoe@gmail.com",
        category: "Sales",
        customerName: "Jane Doe",
        dn: "Desktop",
        entryPointId: "AXCqFyz1G2pKap9PI-mW",
        guestId:
          "Y2lzY29zcGFyazovL3VzL1BFT1BMRS81NzNiODg1Mi1kZjM3LTRlODEtOGMxMi1mZjkyMTE3MmQ1NzY",
        mediaChannel: "web",
        reason: "test",
        reasonCode: "Sales",
        ronaTimeout: "30",
        roomTitle: "Help Jane Doe with Sales",
        taskToBeSelfServiced: "false",
        templateId: "b57990c0-5ec6-11ea-96ee-5df5aef56329",
        templateName: "Desktop",
        virtualTeamName: "Chat_Queue"
      },
      callFlowParams: {
        Automation: {
          description: "(vteam, A valid VTeam.)",
          name: "Automation",
          qualifier: "vteam",
          value: "3270",
          valueDataType: "string"
        },
        Debit: {
          description: "(vteam, A valid VTeam.)",
          name: "Debit",
          qualifier: "vteam",
          value: "3270",
          valueDataType: "string"
        },
        Sales: {
          description: "(vteam, A valid VTeam.)",
          name: "Sales",
          qualifier: "vteam",
          value: "3270",
          valueDataType: "string"
        }
      },
      callProcessingDetails: {
        QMgrName: "aqm",
        QueueId: "3270",
        ani: "janedoe@gmail.com",
        category: "Sales",
        customerName: "Jane Doe",
        dnis: "Desktop",
        entryPointId: "AXCqFyz1G2pKap9PI-mW",
        guestId:
          "Y2lzY29zcGFyazovL3VzL1BFT1BMRS81NzNiODg1Mi1kZjM3LTRlODEtOGMxMi1mZjkyMTE3MmQ1NzY",
        mediaChannel: "web",
        pauseDuration: "10",
        pauseResumeEnabled: "true",
        reason: "test",
        reasonCode: "Sales",
        ronaTimeout: "30",
        roomTitle: "Help Jane Doe with Sales",
        taskToBeSelfServiced: "false",
        templateId: "b57990c0-5ec6-11ea-96ee-5df5aef56329",
        templateName: "Desktop",
        tenantId: "133",
        virtualTeamName: "Chat_Queue",
        vteamId: "AXCqFyz1G2pKap9PI-mW"
      },
      contactDirection: {
        type: "INBOUND"
      },
      currentVTeam: "3270",
      interactionId: "5622d599-40af-11eb-8606-657fd6cc0548",
      isFcManaged: false,
      isTerminated: false,
      media: {
        Y2lzY29zcGFyazovL3VzL1JPT00vNjJkYjBmMzAtNDBhZi0xMWViLWE3ZGItYjkyYTZkMmI5NTI1:
          {
            holdTimestamp: null,
            isHold: false,
            mType: "mainCall",
            mediaMgr: "cmm",
            mediaResourceId:
              "Y2lzY29zcGFyazovL3VzL1JPT00vNjJkYjBmMzAtNDBhZi0xMWViLWE3ZGItYjkyYTZkMmI5NTI1",
            mediaType: "chat",
            participants: [
              "janedoe@gmail.com",
              "7d12d9ea-e8e0-41ee-81bf-c11a685b64ed"
            ]
          },
        consult_Y2lzY29zcGFyazovL3VzL1JPT00vNjJkYjBmMzAtNDBhZi0xMWViLWE3ZGItYjkyYTZkMmI5NTI1:
          {
            holdTimestamp: null,
            isHold: false,
            mType: "consult",
            mediaMgr: "cmm",
            mediaResourceId:
              "consult_Y2lzY29zcGFyazovL3VzL1JPT00vNjJkYjBmMzAtNDBhZi0xMWViLWE3ZGItYjkyYTZkMmI5NTI1",
            mediaType: "chat",
            participants: [
              "aad323de-32d8-48c9-af6b-b68dfbabfe20",
              "7d12d9ea-e8e0-41ee-81bf-c11a685b64ed"
            ]
          }
      },
      mediaChannel: "web",
      mediaType: "chat",
      orgId: "f111e3af-1a45-42ef-9erf-4562354b8a25",
      outboundType: null,
      owner: "7d12d9ea-e8e0-41ee-81bf-c11a685b64ed",
      participants: {
        "7d12d9ea-e8e0-41ee-81bf-c11a685b64ed": {
          channelId: "7272c119-821f-485a-b352-29be1f3f0fff",
          consultState: "consultInitiated",
          consultTimestamp: 1608240860457,
          dn: "9997770110",
          hasJoined: true,
          id: "7d12d9ea-e8e0-41ee-81bf-c11a685b64ed",
          isConsulted: false,
          isWrapUp: false,
          joinTimestamp: 1608240840633,
          lastUpdated: 1608240840633,
          name: "uuip-agent4 uuip-agent4",
          pType: "Agent",
          queueId: "3270",
          queueMgrId: "aqm",
          sessionId: "b8c096ab-f9a0-49be-9efd-f8c78e1a7061",
          siteId: "473",
          teamId: "962",
          teamName: "Team X",
          type: "Agent",
          wrapUpTimestamp: null
        },
        "aad323de-32d8-48c9-af6b-b68dfbabfe20": {
          channelId: "b1da7e42-2aeb-492b-ad06-115ba8dfa506",
          consultState: null,
          consultTimestamp: null,
          dn: "9997770109",
          hasJoined: false,
          id: "aad323de-32d8-48c9-af6b-b68dfbabfe20",
          isConsulted: true,
          isWrapUp: false,
          joinTimestamp: null,
          lastUpdated: 1608240860436,
          name: "uuip-agent2 uuip-agent2",
          pType: "Agent",
          queueId: "3270",
          queueMgrId: "aqm",
          sessionId: "3443f9d7-68de-42a0-a590-176a37a3565a",
          siteId: "473",
          teamId: "962",
          teamName: "Team X",
          type: "Agent",
          wrapUpTimestamp: null
        },
        "janedoe@gmail.com": {
          id: "janedoe@gmail.com",
          pType: "Customer",
          type: "Customer"
        }
      },
      previousVTeams: [],
      state: "consult"
    },
    interactionId: "5622d599-40af-11eb-8606-657fd6cc0548",
    mediaResourceId:
      "Y2lzY29zcGFyazovL3VzL1JPT00vNjJkYjBmMzAtNDBhZi0xMWViLWE3ZGItYjkyYTZkMmI5NTI1",
    orgId: "f111e3af-1a45-42ef-9erf-4562354b8a25",
    queueMgr: "aqm",
    trackingId: "9f682870-40af-11eb-bc9c-df3ff755538c",
    type: "AgentConsultCreated"
  },
  orgId: "f111e3af-1a45-42ef-9erf-4562354b8a25",
  trackingId: "notifs_6dc77353-e810-4751-82ac-dab03e3951c2",
  type: "RoutingMessage"
};
consultEndV2()

Ends a consult request. Note: The end consult call feature is enabled using the isEndConsultEnabled payload. For more information, see Agent State Information Module.

Example

await Desktop.agentContact.consultEndV2({
    interactionId: “a26d035d - b547 - 11 ea - 984 b - d3128111ce6b”,
    isConsult: false,
    isSecondaryEpDnAgent: true;
    queueId: 'queueId'
});

// Consult end payload type
{
    interactionId: string;isConsult: boolean;isSecondaryEpDnAgent?: boolean;queueId?: string;
}

The following table lists the payload details:

NameTypeDescriptionRequired
interactionIdStringUnique identifier for the user interaction.Yes
isConsultBooleanDetermines whether the task request is consult or not.

- True—The task request is consult.
- False—The task request is not consult.
Yes
isSecondaryEpDnAgentBooleanDetermines whether the agent requesting is primary or not.Yes
queueIdstringCancel consult request made to queue.Yes

Returns{Object} The object with the retrieved data.

Note: The type parameter value in the response payload depends on the success or failure of the method. If the method is successful, and isConsult is true, the value is AgentConsultEnded; else, AgentConsultConferenceEnded. If the method is unsuccessful, the value is AgentConsultEndFailed.

Example Response

const consultEndResponse = {
  data: {
    agentId: "7c867aa9-ec768-341a-b767-e5hd6ae7g701",
    consultMediaResourceId: "f23b5b8a-4b02-451e-b9f5-8517b5bef97c",
    destAgentId: "9fca6158-a8bd-43e6-aeba-e5055aea08c5",
    destinationType: "Agent",
    eventType: "RoutingMessage",
    interaction: {
      callAssociatedData: {
        dn: {
          agentEditable: false,
          displayName: "dn",
          name: "dn",
          type: "STRING",
          value: "8895579172"
        },
        ronaTimeout: {
          agentEditable: false,
          displayName: "ronaTimeout",
          name: "ronaTimeout",
          type: "STRING",
          value: "30"
        },
        virtualTeamName: {
          agentEditable: false,
          displayName: "virtualTeamName",
          name: "virtualTeamName",
          type: "STRING",
          value: "Outdial Queue-1"
        }
      },
      callAssociatedDetails: {
        dn: "8895579172",
        ronaTimeout: "30",
        virtualTeamName: "Outdial Queue-1"
      },
      callFlowParams: {
        OutdialQueue: {
          description: "(vteam, The Outdial Queue.)",
          name: "OutdialQueue",
          qualifier: "vteam",
          value: "3264",
          valueDataType: "string"
        }
      },
      callProcessingDetails: {
        QMgrName: "aqm",
        QueueId: "3264",
        dnis: "8895579172",
        isPaused: "false",
        outdialTransferToQueueEnabled: "false",
        pauseDuration: "10",
        pauseResumeEnabled: "true",
        recordInProgress: "true",
        ronaTimeout: "30",
        taskToBeSelfServiced: "false",
        tenantId: "133",
        virtualTeamName: "Outdial Queue-1",
        vteamId: "AXCLfZZU9S1oTdqE1OFZ"
      },
      contactDirection: {
        type: "OUTBOUND"
      },
      currentVTeam: "3264",
      interactionId: "1dd08726-bca5-4ce8-9b51-b20dca8ab154",
      isFcManaged: false,
      isTerminated: false,
      media: {
        "1dd08726-bca5-4ce8-9b51-b20dca8ab154": {
          holdTimestamp: 1612356600241,
          isHold: true,
          mType: "mainCall",
          mediaMgr: "vmm",
          mediaResourceId: "1dd08726-bca5-4ce8-9b51-b20dca8ab154",
          mediaType: "telephony",
          participants: [""]
        }
      },
      mediaChannel: "dialer",
      mediaType: "telephony",
      orgId: "f111e3af-1a45-42ef-9erf-4562354b8a25",
      outboundType: "OUTDIAL",
      owner: "7c867aa9-ec768-341a-b767-e5hd6ae7g701",
      participants: {
        "": {
          id: "",
          pType: "Customer",
          type: "Customer"
        },
        "7c867aa9-ec768-341a-b767-e5hd6ae7g701": {
          channelId: "0717a2ce-76cd-4ba4-9053-71f2c78168b8",
          consultState: null,
          consultTimestamp: null,
          dn: "8895579172",
          hasJoined: true,
          id: "7c867aa9-ec768-341a-b767-e5hd6ae7g701",
          isConsulted: false,
          isWrapUp: false,
          joinTimestamp: 1612354635705,
          lastUpdated: 1612354635705,
          name: "John Doe",
          pType: "Agent",
          queueId: "3264",
          queueMgrId: "aqm",
          sessionId: "3d017488-527a-4e89-9313-5d4eb353c789",
          siteId: "472",
          teamId: "960",
          teamName: "Email_Team",
          type: "Agent",
          wrapUpTimestamp: null
        }
      },
      previousVTeams: [],
      state: "connected",
      workflowManager: null
    },
    interactionId: "1dd08726-bca5-4ce8-9b51-b20dca8ab154",
    orgId: "f111e3af-1a45-42ef-9erf-4562354b8a25",
    queueMgr: "aqm",
    trackingId: "f7c7ecd2-ef27-4273-bc11-1543bddc8810",
    type: "AgentConsultEnded"
  },
  orgId: "f111e3af-1a45-42ef-9erf-4562354b8a25",
  trackingId: "notifs_860d1e16-88b8-4d6c-8bac-18075d72a7e8",
  type: "RoutingMessage"
};
consultConferenceV2()

Initiates a conference request with consulting agent.

Example

await Desktop.agentContact.consultConferenceV2({
    interactionId: “a26d035d - b547 - 11 ea - 984 b - d3128111ce6b”,
    data: {
      to: "b66d035d - b547 - 11 ea - 984 b - d3128111cedb",
      destinationType: "agent";
    }
});
// consult conference Payload Type

type consultConferenceDataV2 = {
  to: string | undefined;
  destinationType: string;
};

The following table lists the payload details:

NameTypeDescriptionRequired
interactionIdStringUnique identifier for the user interaction.Yes
dataObjectOptions of the conference request.Yes
-->toStringUnique identifier of the agent.Yes
-->destinationTypeStringThe type of consult conference request to be placed. The destination type can be Agent, Queue, or DN.Yes

Returns{Object} The object with the retrieved data.

Note: The type parameter value in the response payload depends on the success or failure of the method. If the method is successful, the value isAgentConsultConferenced; else, AgentConsultConferenceFailed.

Example Response

const consultConferenceResponse = {
  data: {
    agentId: "337c1cca-d79b-44fc-8d8e-20d1b5e4dadf",
    consultMediaResourceId:
      "consult_Y2lzY29zcGFyazovL3VzL1JPT00vNGQ5NGJmMjAtYjYwZi0xMWVhLTk0YjAtNzdjZDBkYWVjNDA1",
    destAgentId: "cdf786ef-3285-4b2f-8ef9-3cf8a4c755c2",
    destinationType: "Agent",
    eventType: "RoutingMessage",
    interaction: {
      callAssociatedData: {
        ani: {
          agentEditable: false,
          displayName: "ani",
          name: "ani",
          type: "STRING",
          value: "displayName"
        },
        appUser: {
          agentEditable: false,
          displayName: "appUser",
          name: "appUser",
          type: "STRING",
          value: "appuser-1212"
        },
        customerName: {
          agentEditable: false,
          displayName: "customerName",
          name: "customerName",
          type: "STRING",
          value: "displayName"
        },
        dn: {
          agentEditable: false,
          displayName: "dn",
          name: "dn",
          type: "STRING",
          value: "AXVP2lxF0G6K4V3pFKRG"
        },
        ronaTimeout: {
          agentEditable: false,
          displayName: "ronaTimeout",
          name: "ronaTimeout",
          type: "STRING",
          value: "30"
        },
        virtualTeamName: {
          agentEditable: false,
          displayName: "virtualTeamName",
          name: "virtualTeamName",
          type: "STRING",
          value: "QA-e2e-SocialQueue"
        }
      },
      callAssociatedDetails: {
        ani: "***********",
        appUser: "appuser-1212",
        customerName: "displayName",
        dn: "********************",
        ronaTimeout: "30",
        virtualTeamName: "QA-e2e-SocialQueue"
      },
      callFlowParams: {},
      callProcessingDetails: {
        QMgrName: "aqm",
        QueueId: "5134",
        ani: "***********",
        appUser: "appuser-1212",
        customerName: "displayName",
        dnis: "********************",
        pauseDuration: "30",
        pauseResumeEnabled: "true",
        ronaTimeout: "30",
        taskToBeSelfServiced: "false",
        tenantId: "82",
        virtualTeamName: "QA-e2e-SocialQueue",
        vteamId: "5134"
      },
      contactDirection: {
        type: "INBOUND"
      },
      currentVTeam: "5134",
      interactionId: "1da228dc-66cc-11eb-b852-ed71847d1aec",
      isFcManaged: false,
      isTerminated: false,
      media: {
        Y2lzY29zcGFyazovL3VzL1JPT00vNGQ5NGJmMjAtYjYwZi0xMWVhLTk0YjAtNzdjZDBkYWVjNDA1:
          {
            holdTimestamp: null,
            isHold: false,
            mType: "mainCall",
            mediaMgr: "socialmm",
            mediaResourceId:
              "Y2lzY29zcGFyazovL3VzL1JPT00vNGQ5NGJmMjAtYjYwZi0xMWVhLTk0YjAtNzdjZDBkYWVjNDA1",
            mediaType: "social",
            participants: [
              "displayName",
              "337c1cca-d79b-44fc-8d8e-20d1b5e4dadf",
              "cdf786ef-3285-4b2f-8ef9-3cf8a4c755c2"
            ]
          },
        consult_Y2lzY29zcGFyazovL3VzL1JPT00vNGQ5NGJmMjAtYjYwZi0xMWVhLTk0YjAtNzdjZDBkYWVjNDA1:
          {
            holdTimestamp: null,
            isHold: false,
            mType: "consult",
            mediaMgr: "socialmm",
            mediaResourceId:
              "consult_Y2lzY29zcGFyazovL3VzL1JPT00vNGQ5NGJmMjAtYjYwZi0xMWVhLTk0YjAtNzdjZDBkYWVjNDA1",
            mediaType: "social",
            participants: [
              "cdf786ef-3285-4b2f-8ef9-3cf8a4c755c2",
              "337c1cca-d79b-44fc-8d8e-20d1b5e4dadf",
              "cdf786ef-3285-4b2f-8ef9-3cf8a4c755c2"
            ]
          }
      },
      mediaChannel: "type",
      mediaType: "social",
      orgId: "f111e3af-1a45-42ef-9erf-4562354b8a25",
      outboundType: null,
      owner: "337c1cca-d79b-44fc-8d8e-20d1b5e4dadf",
      participants: {
        "337c1cca-d79b-44fc-8d8e-20d1b5e4dadf": {
          channelId: "e08a6068-688d-472b-887b-1c5d39c7155f",
          consultState: "conferencing",
          consultTimestamp: 1612431260416,
          dn: "*****",
          hasJoined: true,
          id: "337c1cca-d79b-44fc-8d8e-20d1b5e4dadf",
          isConsulted: false,
          isWrapUp: false,
          joinTimestamp: 1612431253790,
          lastUpdated: 1612431253790,
          name: "social-agent2",
          pType: "Agent",
          queueId: "5134",
          queueMgrId: "aqm",
          sessionId: "a9aa9867-e62f-4415-9ea4-6babace39d4f",
          siteId: "205",
          teamId: "384",
          teamName: "TeamSales",
          type: "Agent",
          wrapUpTimestamp: null
        },
        "cdf786ef-3285-4b2f-8ef9-3cf8a4c755c2": {
          channelId: "841235e4-7052-455b-be64-30f2f3c4a59b",
          consultState: "conferencing",
          consultTimestamp: 1612431260416,
          dn: "*****",
          hasJoined: true,
          id: "cdf786ef-3285-4b2f-8ef9-3cf8a4c755c2",
          isConsulted: true,
          isWrapUp: false,
          joinTimestamp: 1612431258137,
          lastUpdated: 1612431258137,
          name: "social-agent1",
          pType: "Agent",
          queueId: "5134",
          queueMgrId: "aqm",
          sessionId: "600e7ebb-20aa-4c91-a4f0-ebc596249603",
          siteId: "205",
          teamId: "384",
          teamName: "TeamSales",
          type: "Agent",
          wrapUpTimestamp: null
        },
        displayName: {
          id: "displayName",
          pType: "Customer",
          type: "Customer"
        }
      },
      previousVTeams: ["AXVP2lxF0G6K4V3pFKRG"],
      state: "conference",
      workflowManager: null
    },
    interactionId: "1da228dc-66cc-11eb-b852-ed71847d1aec",
    mediaResourceId:
      "Y2lzY29zcGFyazovL3VzL1JPT00vNGQ5NGJmMjAtYjYwZi0xMWVhLTk0YjAtNzdjZDBkYWVjNDA1",
    orgId: "f111e3af-1a45-42ef-9erf-4562354b8a25",
    queueMgr: "aqm",
    trackingId: "4a958ace-49a2-49aa-b2e5-8798ede03f13",
    type: "AgentConsultConferenced"
  },
  orgId: "f111e3af-1a45-42ef-9erf-4562354b8a25",
  trackingId: "notifs_68c519c8-04f5-48b4-a5cf-609a09ccd765",
  type: "RoutingMessage"
};
exitConference()

exits a conference request. Note: The end consult call feature is enabled using the isEndConsultEnabled payload. For more information, see Agent State Information Module.

Example

await Desktop.agentContact.exitConference({
    interactionId: “a26d035d - b547 - 11 ea - 984 b - d3128111ce6b”
});

// exitConference payload
{
    interactionId: string;
}

The following table lists the payload details:

NameTypeDescriptionRequired
interactionIdStringUnique identifier for the user interaction.Yes

Returns{Object} The object with the retrieved data.

Note: The type parameter value in the response payload depends on the success or failure of the method. If the method is successful, and isConsult is true, the value is AgentConsultEnded; else, AgentConsultConferenceEnded. If the method is unsuccessful, the value is AgentConsultEndFailed.

Example Response

const exitConferenceResponse = {
  "data": {
    "agentId": "366f2a3a-dd91-482f-b57e-1abf93dda1f7",
    "consultMediaResourceId": "0b09cfec-feea-4ccf-a78a-b7b06d485be2",
    "destAgentId": "3b05f0e9-48e5-40c9-8923-c50e9b0b22a7",
    "destinationType": "Agent",
    "eventTime": 1728979843658,
    "eventType": "RoutingMessage",
    "force": false,
    "interaction": {
      "callAssociatedData": {
        "CallDate": {
          "agentEditable": true,
          "agentViewable": true,
          "displayName": "CallDate",
          "global": false,
          "isSecure": false,
          "name": "CallDate",
          "reportable": false,
          "secureKeyId": "",
          "secureKeyVersion": 0,
          "type": "DATETIME",
          "value": "2024-10-15T08:09:54.214Z[UTC]"
        },
        "Customer_Name": {
          "agentEditable": true,
          "agentViewable": true,
          "displayName": "Customer_Name",
          "global": false,
          "isSecure": false,
          "name": "Customer_Name",
          "reportable": false,
          "secureKeyId": "",
          "secureKeyVersion": 0,
          "type": "STRING",
          "value": "ModiJi"
        },
        "Global_FeedbackSurveyOptIn": {
          "agentEditable": true,
          "agentViewable": true,
          "displayName": "Post Call Survey Opt-in",
          "global": true,
          "isSecure": false,
          "name": "Global_FeedbackSurveyOptIn",
          "reportable": true,
          "secureKeyId": "",
          "secureKeyVersion": 0,
          "type": "STRING",
          "value": "uninitialized"
        },
        "Global_Language": {
          "agentEditable": false,
          "agentViewable": true,
          "displayName": "Customer Language",
          "global": true,
          "isSecure": false,
          "name": "Global_Language",
          "reportable": true,
          "secureKeyId": "",
          "secureKeyVersion": 0,
          "type": "STRING",
          "value": "en-US"
        },
        "Global_TestKey": {
          "agentEditable": true,
          "agentViewable": true,
          "displayName": "Global Test Key",
          "global": true,
          "isSecure": true,
          "name": "Global_TestKey",
          "reportable": false,
          "secureKeyId": "root",
          "secureKeyVersion": 3,
          "type": "STRING",
          "value": "eYXFa2Myvp7U0sIDvJDtKw==."
        },
        "TestKey": {
          "agentEditable": true,
          "agentViewable": true,
          "displayName": "Test Key 1",
          "global": false,
          "isSecure": false,
          "name": "TestKey",
          "reportable": false,
          "secureKeyId": "",
          "secureKeyVersion": 0,
          "type": "STRING",
          "value": "TestValue"
        },
        "TestSameerGlobal": {
          "agentEditable": true,
          "agentViewable": true,
          "displayName": "TestGlobal",
          "global": true,
          "isSecure": false,
          "name": "TestSameerGlobal",
          "reportable": false,
          "secureKeyId": "",
          "secureKeyVersion": 0,
          "type": "STRING",
          "value": "Sameer-value"
        },
        "ani": {
          "agentEditable": false,
          "agentViewable": true,
          "displayName": "ani",
          "global": false,
          "isSecure": false,
          "name": "ani",
          "reportable": false,
          "secureKeyId": "",
          "secureKeyVersion": 0,
          "type": "STRING",
          "value": "9487554325"
        },
        "dn": {
          "agentEditable": false,
          "agentViewable": true,
          "displayName": "dn",
          "global": false,
          "isSecure": false,
          "name": "dn",
          "reportable": false,
          "secureKeyId": "",
          "secureKeyVersion": 0,
          "type": "STRING",
          "value": "+15109024298"
        },
        "ronaTimeout": {
          "agentEditable": false,
          "agentViewable": true,
          "displayName": "ronaTimeout",
          "global": false,
          "isSecure": false,
          "name": "ronaTimeout",
          "reportable": false,
          "secureKeyId": "",
          "secureKeyVersion": 0,
          "type": "STRING",
          "value": "25"
        },
        "test3": {
          "agentEditable": true,
          "agentViewable": true,
          "displayName": "test3-new",
          "global": false,
          "isSecure": false,
          "name": "test3",
          "reportable": false,
          "secureKeyId": "",
          "secureKeyVersion": 0,
          "type": "INTEGER",
          "value": "0"
        },
        "virtualTeamName": {
          "agentEditable": false,
          "agentViewable": true,
          "displayName": "virtualTeamName",
          "global": false,
          "isSecure": false,
          "name": "virtualTeamName",
          "reportable": false,
          "secureKeyId": "",
          "secureKeyVersion": 0,
          "type": "STRING",
          "value": "Queue_MCM"
        }
      },
      "callAssociatedDetails": {
        "ani": "9487554325",
        "dn": "+15109024298",
        "ronaTimeout": "25",
        "virtualTeamName": "Queue_MCM"
      },
      "callFlowParams": {},
      "callProcessingDetails": {
        "CONSULTED_AGENT_QUEUE_ID": "0025a125-4d2c-4e1a-833d-909e95a389cc",
        "CONTINUE_RECORDING_ON_TRANSFER": "true",
        "EP_ID": "8befa99f-903e-4c33-8311-19666546b810",
        "QMgrName": "aqm",
        "QueueId": "0025a125-4d2c-4e1a-833d-909e95a389cc",
        "ani": "9487554325",
        "checkAgentAvailability": "false",
        "customerRegion": "intgus1",
        "dnis": "+15109024298",
        "fcDesktopView": "eNqVj0EKwjAQRe8y6xSsuuoFXAhump2ITHUWgXQSxzQgJXe3Ikg0irob/n8D/43gna9cJIFmOwJjT9AAsgEFEcVgZ6ml05TNIKkHcOSir/M+GgkDWk3Yb27JKzzPYXGM2vTkhlCAixzUdA5ruhTQEtJOgeFAgodgHFcemexfRt8W178uflJbWdeh3X8aXti100ly/3qrma7bbY9I",
        "fceRegisteredEvents": "",
        "flowTagId": "Latest",
        "isParked": "false",
        "mohFileName": "defaultmusic_on_hold.wav",
        "participantInviteTimeout": "false",
        "pauseDuration": "15",
        "pauseResumeEnabled": "true",
        "priority": "10",
        "queuedDestinationID": "0025a125-4d2c-4e1a-833d-909e95a389cc",
        "queuedTo": "Queue",
        "recordInProgress": "true",
        "recordingStarted": "true",
        "ronaTimeout": "25",
        "taskToBeSelfServiced": "false",
        "tenantId": "58f1a59e-245c-4536-9ee4-06560658e493",
        "virtualTeamName": "Queue_MCM",
        "vteamId": "0025a125-4d2c-4e1a-833d-909e95a389cc",
        "workflowId": "62a165a995fe092e845f4804",
        "workflowName": "FlowSameer"
      },
      "contactDirection": { "type": "INBOUND" },
      "createdTimestamp": 1728979793852,
      "currentVTeam": "0025a125-4d2c-4e1a-833d-909e95a389cc",
      "interactionId": "0b09cfec-feea-4ccf-a78a-b7b06d485be2",
      "isFcManaged": true,
      "isMediaForked": false,
      "isTerminated": false,
      "mainInteractionId": "0b09cfec-feea-4ccf-a78a-b7b06d485be2",
      "media": {
        "0b09cfec-feea-4ccf-a78a-b7b06d485be2": {
          "holdTimestamp": null,
          "isHold": false,
          "mType": "mainCall",
          "mediaMgr": "callmm",
          "mediaResourceId": "0b09cfec-feea-4ccf-a78a-b7b06d485be2",
          "mediaType": "telephony",
          "participants": ["9487554325", "3b05f0e9-48e5-40c9-8923-c50e9b0b22a7"]
        }
      },
      "mediaChannel": "telnyx",
      "mediaProperties": null,
      "mediaType": "telephony",
      "orgId": "58f1a59e-245c-4536-9ee4-06560658e493",
      "outboundType": null,
      "owner": "366f2a3a-dd91-482f-b57e-1abf93dda1f7",
      "parentInteractionId": "0b09cfec-feea-4ccf-a78a-b7b06d485be2",
      "participants": {
        "366f2a3a-dd91-482f-b57e-1abf93dda1f7": {
          "autoAnswerEnabled": true,
          "bnrDetails": null,
          "callerId": null,
          "channelId": "7be4ef42-e2d8-450c-b89c-84c966539fc0",
          "consultState": null,
          "consultTimestamp": null,
          "deviceCallId": null,
          "deviceId": null,
          "deviceType": null,
          "dn": "webrtc-366f2a3a-dd91-482f-b57e-1abf93dda1f7",
          "hasJoined": true,
          "hasLeft": true,
          "id": "366f2a3a-dd91-482f-b57e-1abf93dda1f7",
          "isConsulted": false,
          "isInPredial": false,
          "isOffered": true,
          "isWrapUp": true,
          "isWrappedUp": false,
          "joinTimestamp": 1728979798880,
          "lastUpdated": 1728979843589,
          "name": "vik intg3",
          "pType": "Agent",
          "queueId": "0025a125-4d2c-4e1a-833d-909e95a389cc",
          "queueMgrId": "aqm",
          "sessionId": "226f136d-c3ac-4440-98c8-e4ff2ada91b2",
          "siteId": "b302fbf4-28b8-4b56-add0-162e2464db89",
          "skillId": null,
          "skillName": null,
          "skills": [],
          "teamId": "bdd276cd-d051-4b80-bd6e-9fb9eec18b99",
          "teamName": "Team-Minions",
          "type": "Agent",
          "wrapUpTimestamp": 1728979843589
        },
        "3b05f0e9-48e5-40c9-8923-c50e9b0b22a7": {
          "autoAnswerEnabled": false,
          "bnrDetails": null,
          "callerId": null,
          "channelId": "83160396-10a1-460b-bc12-9d151050fb08",
          "consultState": null,
          "consultTimestamp": null,
          "deviceCallId": null,
          "deviceId": null,
          "deviceType": null,
          "dn": "webrtc-3b05f0e9-48e5-40c9-8923-c50e9b0b22a7",
          "hasJoined": true,
          "hasLeft": false,
          "id": "3b05f0e9-48e5-40c9-8923-c50e9b0b22a7",
          "isConsulted": false,
          "isInPredial": false,
          "isOffered": true,
          "isWrapUp": false,
          "isWrappedUp": false,
          "joinTimestamp": 1728979815616,
          "lastUpdated": 1728979815616,
          "name": "vik intg2",
          "pType": "Agent",
          "queueId": "0025a125-4d2c-4e1a-833d-909e95a389cc",
          "queueMgrId": "aqm",
          "sessionId": "b97fc378-c09d-43f0-8bf0-18294ab8d208",
          "siteId": "b302fbf4-28b8-4b56-add0-162e2464db89",
          "skillId": null,
          "skillName": null,
          "skills": [],
          "teamId": "bdd276cd-d051-4b80-bd6e-9fb9eec18b99",
          "teamName": "Team-Minions",
          "type": "Agent",
          "wrapUpTimestamp": null
        },
        "9487554325": {
          "callerId": null,
          "hasJoined": true,
          "hasLeft": false,
          "id": "9487554325",
          "isInPredial": false,
          "pType": "Customer",
          "type": "Customer"
        }
      },
      "previousVTeams": ["8befa99f-903e-4c33-8311-19666546b810"],
      "queuedTimestamp": null,
      "state": "connected",
      "workflowManager": null
    },
    "interactionId": "0b09cfec-feea-4ccf-a78a-b7b06d485be2",
    "orgId": "58f1a59e-245c-4536-9ee4-06560658e493",
    "queueMgr": "aqm",
    "trackingId": "05bcf437-d798-4c85-a70e-ce711de3c785",
    "type": "AgentConsultConferenceEnded"
  },
  "orgId": "58f1a59e-245c-4536-9ee4-06560658e493",
  "trackingId": "notifs_2a563687-b74d-4cbb-8679-94aa349c5a13",
  "type": "RoutingMessage"
}
consultTransferV2()

Initiates a consult transfer request.

Example

await Desktop.agentContact.consultTransferV2({
    interactionId: “5 c3d487a - 874 b - 447 d - b5f2 - ce1f626301f5”,
    data: {
        to: “43 bfcdef - 5551 - 45 b1 - a8f9 - a0b33e66e3fe”,
        destinationType: "agent"
    }
});

// consultTransfer Payload Type

{
    interactionId: string;data: Contact.consultTransferPayLoad
}

type consultTransferV2PayLoad = {
    to: string;
    destinationType: string;
}

The following table lists the payload details:

NameTypeDescriptionRequired
interactionIdStringUnique identifier for the user interaction.Yes
dataObjectOptions of the consult transfer request.Yes
toStringUnique identifier for the agent.Yes
-->destinationTypeStringThe type of consult transfer request to be placed. The destination type can be agent, queue, entryPoint or dialNumber.Yes

Returns{Object} The object with the retrieved data.

Note: The type parameter value in the response payload depends on the success or failure of the method. If the method is successful, the value is AgentConsultTransferred; else, AgentConsultTransferFailed.

Example Response

const consultTransferResponse = {
  data: {
    agentId: "ff7dbe19-fa3f-4c63-8a1c-04dcffef8e4f",
    consultMediaResourceId: "fd0af60c-3250-46c3-96f8-1921f6ecf170",
    destAgentId: "9b036d89-930c-4187-a5bd-5dbb1439fe41",
    destinationType: "Agent",
    eventType: "RoutingMessage",
    interaction: {
      callAssociatedData: {
        "": {
          agentEditable: false,
          displayName: "",
          name: "",
          type: "STRING",
          value: ""
        },
        IvrPath: {
          agentEditable: false,
          displayName: "IvrPath",
          name: "IvrPath",
          type: "STRING",
          value: " EOI"
        },
        ani: {
          agentEditable: false,
          displayName: "ani",
          name: "ani",
          type: "STRING",
          value: "**********"
        },
        dn: {
          agentEditable: false,
          displayName: "dn",
          name: "dn",
          type: "STRING",
          value: "**********"
        },
        nextVteamId: {
          agentEditable: false,
          displayName: "nextVteamId",
          name: "nextVteamId",
          type: "STRING",
          value: "Queue"
        },
        pathId: {
          agentEditable: false,
          displayName: "pathId",
          name: "pathId",
          type: "STRING",
          value: " StartCall PlayDone"
        },
        ronaTimeout: {
          agentEditable: false,
          displayName: "ronaTimeout",
          name: "ronaTimeout",
          type: "STRING",
          value: "30"
        },
        virtualTeamName: {
          agentEditable: false,
          displayName: "virtualTeamName",
          name: "virtualTeamName",
          type: "STRING",
          value: "Queue-1"
        }
      },
      callAssociatedDetails: {
        "": "",
        IvrPath: " EOI",
        ani: "************",
        dn: "************",
        nextVteamId: "Queue",
        pathId: " StartCall PlayDone",
        ronaTimeout: "30",
        virtualTeamName: "Queue-1"
      },
      callFlowParams: {
        Queue: {
          description: "(vteam, A valid VTeam.)",
          name: "Queue",
          qualifier: "vteam",
          value: "1336",
          valueDataType: "string"
        },
        WelcomePrompt: {
          description: "(mediaFile, A valid media file.)",
          name: "WelcomePrompt",
          qualifier: "mediaFile",
          value: "GAwelcome.wav",
          valueDataType: "string"
        }
      },
      callProcessingDetails: {
        QMgrName: "aqm",
        QueueId: "1336",
        ani: "************",
        dnis: "************",
        isPaused: "false",
        jscriptId: "AW7HP3QNB44q0sL-cTVz",
        pauseDuration: "30",
        pauseResumeEnabled: "true",
        recordInProgress: "true",
        ronaTimeout: "30",
        taskToBeSelfServiced: "false",
        tenantId: "82",
        virtualTeamName: "Queue-1",
        vteamId: "1336"
      },
      contactDirection: {
        type: "INBOUND"
      },
      currentVTeam: "1336",
      interactionId: "1277da79-dc49-439c-ab72-f00453a1ff71",
      isFcManaged: false,
      isTerminated: false,
      media: {
        "1277da79-dc49-439c-ab72-f00453a1ff71": {
          holdTimestamp: null,
          isHold: false,
          mType: "mainCall",
          mediaMgr: "vmm",
          mediaResourceId: "1277da79-dc49-439c-ab72-f00453a1ff71",
          mediaType: "telephony",
          participants: ["**********", "9b036d89-930c-4187-a5bd-5dbb1439fe41"]
        }
      },
      mediaChannel: "broadcloud",
      mediaType: "telephony",
      orgId: "f111e3af-1a45-42ef-9erf-4562354b8a25",
      outboundType: null,
      owner: "9b036d89-930c-4187-a5bd-5dbb1439fe41",
      participants: {
        "**********": {
          id: "**********",
          pType: "Customer",
          type: "Customer"
        },
        "9b036d89-930c-4187-a5bd-5dbb1439fe41": {
          channelId: "3de6706f-95b7-485a-9304-30928f7ee52e",
          consultState: null,
          consultTimestamp: null,
          dn: "**********",
          hasJoined: true,
          id: "9b036d89-930c-4187-a5bd-5dbb1439fe41",
          isConsulted: true,
          isWrapUp: false,
          joinTimestamp: 1612429549032,
          lastUpdated: 1612429549032,
          name: "qaus1-gt-user1 qaus1-gt-user1",
          pType: "Agent",
          queueId: "1336",
          queueMgrId: "aqm",
          sessionId: "90896c91-0f77-4bc6-aec3-488a34ca88d3",
          siteId: "205",
          teamId: "598",
          teamName: "Sales",
          type: "Agent",
          wrapUpTimestamp: null
        },
        "ff7dbe19-fa3f-4c63-8a1c-04dcffef8e4f": {
          channelId: "fb704337-71c3-4802-a03b-84a2d18eeaa0",
          consultState: "consulting",
          consultTimestamp: 1612429549052,
          dn: "**********",
          hasJoined: true,
          id: "ff7dbe19-fa3f-4c63-8a1c-04dcffef8e4f",
          isConsulted: false,
          isWrapUp: false,
          joinTimestamp: 1612429537991,
          lastUpdated: 1612429537991,
          name: "qaus1-gt-user2 q",
          pType: "Agent",
          queueId: "1336",
          queueMgrId: "aqm",
          sessionId: "57323f8b-9460-45fa-aaf6-4ca51c327af8",
          siteId: "205",
          teamId: "598",
          teamName: "Sales",
          type: "Agent",
          wrapUpTimestamp: null
        }
      },
      previousVTeams: ["AW6h1AVRrZSGni185x28"],
      state: "connected",
      workflowManager: null
    },
    interactionId: "1277da79-dc49-439c-ab72-f00453a1ff71",
    mediaResourceId: "1277da79-dc49-439c-ab72-f00453a1ff71",
    orgId: "f111e3af-1a45-42ef-9erf-4562354b8a25",
    queueMgr: "aqm",
    trackingId: "05b38615-5bdc-4e1d-8efe-60ea1c70fd5c",
    transferredMediaResourceId: "1277da79-dc49-439c-ab72-f00453a1ff71",
    type: "AgentConsultTransferred"
  },
  orgId: "f111e3af-1a45-42ef-9erf-4562354b8a25",
  trackingId: "notifs_3464be63-83e7-4b2d-94d5-a63fddc108d5",
  type: "RoutingMessage"
};
blindTransferV2()

Initiates a blind transfer request. This method can be used to transfer a contact to an Agent or to a Dial Number.

Blind Transfer to Agent or DialNumber

Example

await Desktop.agentContact.blindTransferV2({
    interactionId: “08259 a2b - bacf - 11 ea - bdd9 - abbd16eaf1d5”,
    data: {
        to: “43 bfcdef - 5551 - 45 b1 - a8f9 - a0b33e66e3fe”,
        destinationType: "agent"
    }
});

await Desktop.agentContact.blindTransferV2({
    interactionId: “08259a2b-bacf-11ea-bdd9-abbd16eaf1d5”,
    data: {
        to: “9997770095”,
        destinationType: "dialNumber"
    }
});

// BlindTransfer Payload Type

{
    interactionId: string;
    data: Contact.blindTransferPayLoad
}

type blindTransferPayLoad = {
    to: string;
    destinationType: string;
}

The following table lists the payload details:

NameTypeDescriptionRequired
interactionIdStringThe unique ID represents the task that the user is currently working on. It is generated automatically during the creation of a new task.Yes
dataObjectOptions of the blind transfer request.Yes
-->toStringUnique identifier of the agent.Yes
-->destinationTypeStringThe type of consult transfer request to be placed. The destination type can be agent or dialNumber.Yes

Returns{Object} The object with the retrieved data.

Note: The type parameter value in the response payload depends on the success or failure of the method. If the method is successful, the value is AgentBlindTransferred; else, AgentBlindTransferFailedEvent.

Example Response

const blindTransferResponse = {
  data: {
    agentId: "cdf786ef-3285-4b2f-8ef9-3cf8a4c755c2",
    destAgentId: "337c1cca-d79b-44fc-8d8e-20d1b5e4dadf",
    destinationType: "Agent",
    eventType: "RoutingMessage",
    interaction: {
      callAssociatedData: {
        ani: {
          agentEditable: false,
          displayName: "ani",
          name: "ani",
          type: "STRING",
          value: "displayName"
        },
        appUser: {
          agentEditable: false,
          displayName: "appUser",
          name: "appUser",
          type: "STRING",
          value: "qaus1-appuser-1212"
        },
        customerName: {
          agentEditable: false,
          displayName: "customerName",
          name: "customerName",
          type: "STRING",
          value: "displayName"
        },
        dn: {
          agentEditable: false,
          displayName: "dn",
          name: "dn",
          type: "STRING",
          value: "AXVP2lxF0G6K4V3pFKRG"
        },
        ronaTimeout: {
          agentEditable: false,
          displayName: "ronaTimeout",
          name: "ronaTimeout",
          type: "STRING",
          value: "30"
        },
        virtualTeamName: {
          agentEditable: false,
          displayName: "virtualTeamName",
          name: "virtualTeamName",
          type: "STRING",
          value: "QA-e2e-SocialQueue"
        }
      },
      callAssociatedDetails: {
        ani: "***********",
        appUser: "appuser-1212",
        customerName: "displayName",
        dn: "********************",
        ronaTimeout: "30",
        virtualTeamName: "QA-e2e-SocialQueue"
      },
      callFlowParams: {},
      callProcessingDetails: {
        BLIND_TRANSFER_IN_PROGRESS: "true",
        QMgrName: "aqm",
        QueueId: "5134",
        ani: "***********",
        appUser: "qaus1-appuser-1212",
        customerName: "displayName",
        dnis: "********************",
        pauseDuration: "30",
        pauseResumeEnabled: "true",
        ronaTimeout: "30",
        taskToBeSelfServiced: "false",
        tenantId: "82",
        virtualTeamName: "SocialQueue",
        vteamId: "5134"
      },
      contactDirection: {
        type: "INBOUND"
      },
      currentVTeam: "5134",
      interactionId: "1da228dc-66cc-11eb-b852-ed71847d1aec",
      isFcManaged: false,
      isTerminated: false,
      media: {
        Y2lzY29zcGFyazovL3VzL1JPT00vNGQ5NGJmMjAtYjYwZi0xMWVhLTk0YjAtNzdjZDBkYWVjNDA1:
          {
            holdTimestamp: null,
            isHold: false,
            mType: "mainCall",
            mediaMgr: "socialmm",
            mediaResourceId:
              "Y2lzY29zcGFyazovL3VzL1JPT00vNGQ5NGJmMjAtYjYwZi0xMWVhLTk0YjAtNzdjZDBkYWVjNDA1",
            mediaType: "social",
            participants: ["displayName"]
          }
      },
      mediaChannel: "type",
      mediaType: "social",
      orgId: "f111e3af-1a45-42ef-9erf-4562354b8a25",
      outboundType: null,
      owner: "337c1cca-d79b-44fc-8d8e-20d1b5e4dadf",
      participants: {
        "337c1cca-d79b-44fc-8d8e-20d1b5e4dadf": {
          channelId: "e08a6068-688d-472b-887b-1c5d39c7155f",
          consultState: null,
          consultTimestamp: null,
          dn: "*****",
          hasJoined: false,
          id: "337c1cca-d79b-44fc-8d8e-20d1b5e4dadf",
          isConsulted: false,
          isWrapUp: false,
          joinTimestamp: null,
          lastUpdated: 1612431250963,
          name: "social-agent2",
          pType: "Agent",
          queueId: "5134",
          queueMgrId: "aqm",
          sessionId: "a9aa9867-e62f-4415-9ea4-6babace39d4f",
          siteId: "205",
          teamId: "384",
          teamName: "TeamSales",
          type: "Agent",
          wrapUpTimestamp: null
        },
        "cdf786ef-3285-4b2f-8ef9-3cf8a4c755c2": {
          channelId: "59826e62-08c8-41e6-b51c-4a2b6d81d2f6",
          consultState: null,
          consultTimestamp: null,
          dn: "*****",
          hasJoined: true,
          id: "cdf786ef-3285-4b2f-8ef9-3cf8a4c755c2",
          isConsulted: false,
          isWrapUp: true,
          joinTimestamp: 1612431249042,
          lastUpdated: 1612431251178,
          name: "qaus1-gt-social-agent1 qaus1-gt-social-agent1",
          pType: "Agent",
          queueId: "5134",
          queueMgrId: "aqm",
          sessionId: "600e7ebb-20aa-4c91-a4f0-ebc596249603",
          siteId: "205",
          teamId: "384",
          teamName: "TeamSales",
          type: "Agent",
          wrapUpTimestamp: 1612431251178
        },
        displayName: {
          id: "displayName",
          pType: "Customer",
          type: "Customer"
        }
      },
      previousVTeams: ["AXVP2lxF0G6K4V3pFKRG"],
      state: "new",
      workflowManager: null
    },
    interactionId: "1da228dc-66cc-11eb-b852-ed71847d1aec",
    mediaResourceId:
      "Y2lzY29zcGFyazovL3VzL1JPT00vNGQ5NGJmMjAtYjYwZi0xMWVhLTk0YjAtNzdjZDBkYWVjNDA1",
    orgId: "f111e3af-1a45-42ef-9erf-4562354b8a25",
    queueMgr: "aqm",
    trackingId: "4a958ace-49a2-49aa-b2e5-8798ede03f13",
    type: "AgentBlindTransferred"
  },
  orgId: "f111e3af-1a45-42ef-9erf-4562354b8a25",
  trackingId: "notifs_68c519c8-04f5-48b4-a5cf-609a09ccd765",
  type: "RoutingMessage"
};
vTeamTransferV2()

Initiates a vTeam transfer request.

Example

await Desktop.agentContact.vteamTransferV2({
    interactionId: “dab1a2f0 - bad0 - 11 ea - 8e7 c - 0 d99ede2535a”,
    data: {
        to: "AXDiuOLjKin42Ov3QJXN",
        destinationType: "queue"
    }
});

// Vteam Transfer Payload Type

{
    interactionId: string;
    data: Contact.vteamTransferV2PayLoad
}

type vteamTransferV2PayLoad = {
    to: string;
    destinationType: string;
}

The following table lists the payload details:

NameTypeDescriptionRequired
interactionIdStringUnique identifier for the user interaction.Yes
dataObjectOptions of the vTeam transfer request.Yes
-->toStringvTeam unique identifier.Yes
-->destinationTypeStringvTeam transfer type.
- entrypoint: Indicates transfer to an entry point.
- queue: Indicates transfer to a queue.
Yes

Returns{Object} The object with the retrieved data.

Note: The type parameter value in the response payload depends on the success or failure of the method. If the method is successful, the value is AgentVteamTransferred; else, AgentVteamTransferFailed.

Example Response

const vTeamTransferResponse = {
        "agentId": "7d12d9ea-e8e0-41ee-81bf-c11a685b64ed",
        "eventType": "RoutingMessage",
        "interaction": {
            "callAssociatedData": {
                "ani": {
                    "value": "janedoe@gmail.com"
                },
                "category": {
                    "value": "Sales"
                },
                "customerName": {
                    "value": "Jane Doe"
                },
                "dn": {
                    "value": "Desktop"
                },
                "entryPointId": {
                    "value": "AXCqFyz1G2pKap9PI-mW"
                },
                "guestId": {
                    "value": "Y2lzY29zcGFyazovL3VzL1BFT1BMRS81NzNiODg1Mi1kZjM3LTRlODEtOGMxMi1mZjkyMTE3MmQ1NzY"
                },
                "mediaChannel": {
                    "value": "web"
                },
                "reason": {
                    "value": "Test"
                },
                "reasonCode": {
                    "value": "Sales"
                },
                "ronaTimeout": {
                    "value": "30"
                },
                "roomTitle": {
                    "value": "Help Jane Doe with Sales"
                },
                "taskToBeSelfServiced": {
                    "value": "false"
                },
                "templateId": {
                    "value": "b57990c0-5ec6-11ea-96ee-5df5aef56329"
                },
                "templateName": {
                    "value": "Desktop"
                },
                "virtualTeamName": {
                    "value": "Chat_Queue"
                }
            },
            "callAssociatedDetails": {
                "ani": "janedoe@gmail.com",
                "category": "Sales",
                "customerName": "Jane Doe",
                "dn": "Desktop",
                "entryPointId": "AXCqFyz1G2pKap9PI-mW",
                "guestId": "Y2lzY29zcGFyazovL3VzL1BFT1BMRS81NzNiODg1Mi1kZjM3LTRlODEtOGMxMi1mZjkyMTE3MmQ1NzY",
                "mediaChannel": "web",
                "reason": "Test",
                "reasonCode": "Sales",
                "ronaTimeout": "30",
                "roomTitle": "Help Jane Doe with Sales",
                "taskToBeSelfServiced": "false",
                "templateId": "b57990c0-5ec6-11ea-96ee-5df5aef56329",
                "templateName": "Desktop",
                "virtualTeamName": "Chat_Queue"
            },
            "callFlowParams": {
                "Automation": {
                    "description": "(vteam, A valid VTeam.)",
                    "name": "Automation",
                    "qualifier": "vteam",
                    "value": "3270",
                    "valueDataType": "string"
                },
                "Debit": {
                    "description": "(vteam, A valid VTeam.)",
                    "name": "Debit",
                    "qualifier": "vteam",
                    "value": "3270",
                    "valueDataType": "string"
                },
                "Sales": {
                    "description": "(vteam, A valid VTeam.)",
                    "name": "Sales",
                    "qualifier": "vteam",
                    "value": "3270",
                    "valueDataType": "string"
                }
            },
            "callProcessingDetails": {
                "QMgrName": "aqm",
                "QueueId": "3270",
                "ani": "janedoe@gmail.com",
                "category": "Sales",
                "customerName": "Jane Doe",
                "dnis": "Desktop",
                "doNotRouteToAgents": "7d12d9ea-e8e0-41ee-81bf-c11a685b64ed",
                "entryPointId": "AXCqFyz1G2pKap9PI-mW",
                "guestId": "Y2lzY29zcGFyazovL3VzL1BFT1BMRS81NzNiODg1Mi1kZjM3LTRlODEtOGMxMi1mZjkyMTE3MmQ1NzY",
                "mediaChannel": "web",
                "pauseDuration": "10",
                "pauseResumeEnabled": "true",
                "reason": "Test",
                "reasonCode": "Sales",
                "ronaTimeout": "30",
                "roomTitle": "Help Jane Doe with Sales",
                "taskToBeSelfServiced": "false",
                "templateId": "b57990c0-5ec6-11ea-96ee-5df5aef56329",
                "templateName": "Desktop",
                "tenantId": "133",
                "virtualTeamName": "Chat_Queue",
                "vteamId": "7178",
                "vteamType": "inboundqueue"
            },
            "contactDirection": {
                "type": "INBOUND"
            },
            "currentVTeam": "7178",
            "interactionId": "29bafa9c-40b5-11eb-8606-edd437f1b927",
            "isFcManaged": false,
            "isTerminated": false,
            "media": {
                "Y2lzY29zcGFyazovL3VzL1JPT00vMmNiMTMwMDAtNDBiNS0xMWViLWE4M2ItZWI4ZTQwMDk1MDk5": {
                    "holdTimestamp": null,
                    "isHold": false,
                    "mType": "mainCall",
                    "mediaMgr": "cmm",
                    "mediaResourceId": "Y2lzY29zcGFyazovL3VzL1JPT00vMmNiMTMwMDAtNDBiNS0xMWViLWE4M2ItZWI4ZTQwMDk1MDk5",
                    "mediaType": "chat",
                    "participants": ["janedoe@gmail.com", "7d12d9ea-e8e0-41ee-81bf-c11a685b64ed"]
                }
            },
            "mediaChannel": "web",
            "mediaType": "chat",
            "orgId": "f111e3af-1a45-42ef-9erf-4562354b8a25",
            "outboundType": null,
            "owner": null,
            "participants": {
                "7d12d9ea-e8e0-41ee-81bf-c11a685b64ed": {
                    "channelId": "ccbffa6f-4322-4e06-850f-e0ab2915f238",
                    "consultState": null,
                    "consultTimestamp": null,
                    "dn": "9997770110",
                    "hasJoined": true,
                    "id": "7d12d9ea-e8e0-41ee-81bf-c11a685b64ed",
                    "isConsulted": false,
                    "isWrapUp": true,
                    "joinTimestamp": 1608243279477,
                    "lastUpdated": 1608254153975,
                    "name": "FirstName LastName",
                    "pType": "Agent",
                    "queueId": "3270",
                    "queueMgrId": "aqm",
                    "sessionId": "b8c096ab-f9a0-49be-9efd-f8c78e1a7061",
                    "siteId": "473",
                    "teamId": "962",
                    "teamName": "Team X",
                    "type": "Agent",
                    "wrapUpTimestamp": 1608254153975
                },
                "janedoe@gmail.com": {
                    "id": "janedoe@gmail.com",
                    "pType": "Customer",
                    "type": "Customer"
                }
            },
            "previousVTeams": ["3270"],
            "state": "new"
        },
        "interactionId": "29bafa9c-40b5-11eb-8606-edd437f1b927",
        "orgId": "f111e3af-1a45-42ef-9erf-4562354b8a25",
        "queueMgr": "aqm",
        "trackingId": "91480930-40ce-11eb-840f-7f9e29c6b481",
        "type": "AgentVteamTransferred"
    }
}
buddyAgentsV2()

Fetches the list of agents available for consult call and conference call.

Example

await Desktop.agentContact.buddyAgentsV2({
    data: {
        agentProfileId: "AXCLfZhH9S1oTdqE1OFw",
        channelName: "chat",
        state: "Available"
    }
});

The following table lists the payload details:

NameTypeDescriptionRequired
dataObjectOptions of the buddy agents.Yes
-->agentProfileIdStringUnique identifier of the agent profile.Yes
-->channelNameStringThe media channel type such as chat.Yes
-->stateStringThe agent availability status.Yes

Returns{Object} The object with the retrieved data.

Note: The type parameter value in the response payload depends on the success or failure of the method. If the method is successful, the value is BuddyAgents; else, BuddyAgentsRetrieveFailed.

Example Response

BuddyAgentResponse = {
  data: {
    agentId: "7c867aa9-ec768-341a-b767-e5hd6ae7g701",
    agentList: [],
    agentSessionId: "25f31485-f41c-4cca-abe5-e12b80735715",
    eventType: "AgentDesktopMessage",
    orgId: "f111e3af-1a45-42ef-9erf-4562354b8a25",
    trackingId: "1a2737c0-6704-11eb-9a89-971a3ca976b4",
    type: "BuddyAgents"
  },
  orgId: "f111e3af-1a45-42ef-9erf-4562354b8a25",
  trackingId: "notifs_49119bed-6dbc-48e6-89fa-9dde8da3fc3e",
  type: "BuddyAgents"
};
Asynchronous Events

In order to subscribe to asynchronous events, use the following events:

  • eAgentContact
  • eAgentContactAssigned
  • eAgentContactAssignFailed
  • eAgentContactWrappedUp
  • eAgentContactAniUpdated
  • eAgentOfferContact
  • eAgentOfferContactRona
  • eAgentOfferConsult
  • eAgentWrapup
  • eAgentContactHeld
  • eAgentContactUnHeld
  • eCallRecordingStarted
  • eResumeRecording
  • ePauseRecording
  • eConsultTransfer
  • eAgentblindTransferred
  • eAgentvteamTransfer
  • eAgentConsultCreated
  • eAgentConsultConferenced
  • eAgentConsultEnded
  • eAgentCtqCancelled
  • eAgentConsultConferenceEnded
  • eAgentConsulting
  • eAgentConsultFailed
  • eAgentConsultEndFailed
  • eAgentCtqFailed
  • eAgentCtqCancelFailed
  • eAgentConsultConferenceEndFailed
  • eAgentMonitorStateChanged
  • eAgentMonitoringEnded
  • eAgentOfferCampaignReserved
  • eAgentAddCampaignReserved

Example

await Desktop.agentStateInfo.stateChange({
  state: "Available",
  auxCodeIdArray: "0"
});

// Get success/failure event here
Desktop.agentStateInfo.addEventListener("updated", (updatedList) =>
  logger.info(updatedList)
);

To remove an event subscription in order to avoid memory leaks, use the following options:

// Module supports removing added listeners like:
const listener = (msg) => logger.info(msg);
Desktop.agentContact.addEventListener("eAgentContact", listener);
Desktop.agentContact.removeEventListener("eAgentContact", listener);

// Module supports one-time added listeners like:
Desktop.agentContact.addOnceEventListener("eAgentContact", listener);
Desktop.agentContact.removeOnceEventListener("eAgentContact", listener);

// Module supports removing all listeners like:
Desktop.agentContact.removeAllEventListeners();

Note: It is recommended to rely on the events, than on the responses of the asynchronous events such as stateChange.

Desktop custom widgets will receive events only when they are mounted. For a widget to be mounted always, you can consider persistent widgets or headless widgets. When you switch between pages, the widgets are unmounted from the previous page, and the changes made to widgets are lost. For more information, see the Custom Widgets section and the Desktop Layout section in the Provisioning chapter of the Cisco Webex Contact Center Setup and Administration Guide.

Methods
addEventListener(event, handler)

Adds an event listener. This method listens to a particular event if generated. The event name can be specified as a string to the parameter.

Example

Desktop.agentContact.addEventListener("eAgentContact", (msg: Service.Aqm.Contact.AgentContact) => logger

Parameters

NameTypeDescriptionRequired
eventStringType of an event.Yes
handlerFunctionThe function that is invoked when the conditions are met.Yes
removeEventListener(event, handler)

Removes an added event listener that has been attached with the addEventListener() method.

Example

Desktop.agentContact.removeEventListener(
  "eAgentContact",
  (msg: Service.Aqm.Contact.AgentContact) => logger.info(msg)
);

Parameters

NameTypeDescriptionRequired
eventStringType of an event.Yes
handlerFunctionThe function that is invoked when the conditions are met.Yes
addOnceEventListener(event, handler)

Adds a one-time event listener.

Example

Desktop.agentContact.addOnceEventListener(
  "eAgentContact",
  (msg: Service.Aqm.Contact.AgentContact) => logger.info(msg)
);

Parameters

NameTypeDescriptionRequired
eventStringType of an event.Yes
handlerFunctionThe function that is invoked when the conditions are met.Yes
removeOnceEventListener(event, handler)

Removes a one-time added event listener.

Example

javascriptDesktop.agentContact.removeOnceEventListener(
  "eAgentContact",
  (msg: Service.Aqm.Contact.AgentContact) => logger.info(msg)
);

Parameters

NameTypeDescriptionRequired
eventStringType of an event.Yes
handlerFunctionThe function that is invoked when the conditions are met.Yes
removeAllEventListeners(event, handler)

Removes all added event listeners.

Example

Desktop.agentContact.removeAllEventListeners();
Events
eAgentContact

Loads the desktop with the agent tasks.

Example

Desktop.agentContact.addEventListener(
  "eAgentContact",
  (msg: Service.Aqm.Contact.AgentContact) => logger.info(msg)
);

Example Response

const eAgentContact = {
  type: "RoutingMessage",
  orgId: "f111e3af-1a45-42ef-9erf-4562354b8a25",
  trackingId: "notifs_6f0ee13d-bb2f-4600-8631-c7d86fb08dfe",
  data: {
    mediaResourceId: "80c213d5-2747-4bf4-8a0c-9c45b0afdf2a",
    eventType: "RoutingMessage",
    agentId: "9738292f-3a68-4909-bdea-b541cccd6935",
    trackingId: "68bca42c-8a50-4cf1-8c18-f5229b04afa9",
    interaction: {
      isFcManaged: false,
      isTerminated: false,
      mediaType: "telephony",
      previousVTeams: ["AXCZ0YCAXrf9I0XFBI7b"],
      state: "new",
      currentVTeam: "3268",
      participants: {
        "+19997770095": {
          id: "+19997770095",
          pType: "Customer",
          type: "Customer"
        },
        "9738292f-3a68-4909-bdea-b541cccd6935": {
          joinTimestamp: null,
          name: "",
          pType: "Agent",
          teamName: "Email_Team",
          lastUpdated: 1593440068730,
          teamId: "960",
          isConsulted: false,
          hasJoined: false,
          dn: "9997770093",
          queueId: "3268",
          id: "9738292f-3a68-4909-bdea-b541cccd6935",
          sessionId: "054ebc22-b34e-4e1b-8730-da294093f813",
          queueMgrId: "aqm",
          siteId: "472",
          type: "Agent",
          channelId: "53e05ff1-69c7-425f-a660-5f9e21f0a4bb",
          isWrapUp: false
        }
      },
      interactionId: "80c213d5-2747-4bf4-8a0c-9c45b0afdf2a",
      orgId: "f111e3af-1a45-42ef-9erf-4562354b8a25",
      callProcessingDetails: {
        QMgrName: "aqm",
        taskToBeSelfServiced: "false",
        ani: "+19997770095",
        dnis: "+12147659000",
        tenantId: "133",
        QueueId: "3268",
        vteamId: "3268",
        jscriptId: "AXCZ4c3mjkwgAuS7vSIU",
        virtualTeamName: "Queue - Telephony",
        customerName: "Jane Doe",
        ronaTimeout: "30",
        reasonCode: "Credit",
        IvrPath: " EOI",
        pathId: " StartCall PlayDone out out out"
      },
      media: {
        "80c213d5-2747-4bf4-8a0c-9c45b0afdf2a": {
          mediaResourceId: "80c213d5-2747-4bf4-8a0c-9c45b0afdf2a",
          mediaType: "telephony",
          mediaMgr: "vmm",
          participants: ["+19997770095"],
          mType: "mainCall",
          isHold: false
        }
      },
      owner: "9738292f-3a68-4909-bdea-b541cccd6935",
      mediaChannel: "broadcloud",
      contactDirection: {
        type: "INBOUND"
      },
      callFlowParams: {
        Play2: {
          name: "Play2",
          qualifier: "",
          description: "(A valid text.)",
          valueDataType: "string",
          value: "Welcome to Contact Center"
        },
        Queue3: {
          name: "Queue3",
          qualifier: "vteam",
          description: "(vteam, A valid VTeam.)",
          valueDataType: "string",
          value: "3268"
        }
      }
    },
    interactionId: "80c213d5-2747-4bf4-8a0c-9c45b0afdf2a",
    orgId: "f111e3af-1a45-42ef-9erf-4562354b8a25",
    queueMgr: "aqm",
    type: "AgentContact",
    isConsulted: false,
    consultMediaResourceId: null
  }
};
eAgentContactAssigned

New task or contact has been assigned successfully.

Example

Desktop.agentContact.addEventListener(
  "eAgentContactAssigned",
  (msg: Service.Aqm.Contact.AgentContact) => logger.info(msg)
);

For more information on example response, see accept.

eAgentContactAssignFailed

Assigned task or contact did not succeed.

Example

Desktop.agentContact.addEventListener(
  "eAgentContactAssignFailed",
  (msg: Service.Aqm.Contact.AgentContact) => logger.info(msg)
);

For more information on example response, see accept.

eAgentContactWrappedUp

Accepted task or contact has been wrapped up.

Example

Desktop.agentContact.addEventListener(
  "eAgentContactWrappedUp",
  (msg: Service.Aqm.Contact.AgentContact) => logger.info(msg)
);

For more information on example response, see wrapup.

eAgentContactAniUpdated

Task or contact ANI has been updated.

Example

Desktop.agentContact.addEventListener(
  "eAgentContactAniUpdated",
  (msg: Service.Aqm.Contact.AgentContact) => logger.info(msg)
);

Example Response

const eAgentContactAniUpdated = {
  data: {
    eventType: "RoutingMessage",
    interactionId: "bd2b36fc-deec-44a4-8d37-ea175332b4f9",
    orgId: "8ee9d5a5-7099-43da-a468-4115a6849a8f",
    interaction: {
      interactionId: "80cf49a5-2449-4246-a891-76256b772e32",
      orgId: "6e30f3a2-500b-49c9-a091-fc9442a23466",
      state: "connected",
      mediaType: "telephony",
      ani: "888****066",
      callAssociatedDetails: {
        ani: "888****066",
        dnis: "+15*****8006",
        virtualTeamName: "webrtc_inbound_desktop"
      },
      callAssociatedData: {
        ani: {
          name: "ani",
          agentEditable: false,
          value: "888****066",
          type: "STRING",
          displayName: "ani",
          agentViewable: true,
          isSecure: false
        }
      },
      callProcessingDetails: {
        ani: "888****066",
        workflowName: "webrtc_inbound",
        queueId: "c0dcca57-55dd-466e-8c70-bd08b096f5a7",
        priority: "10",
        dnis: "+15*****8006"
      }
    },
    ani: "888****066",
    trackingId: "bbceaa12-6ab0-4e71-af16-7c612a6ef120",
    eventTime: 1742826471297,
    type: "ContactAniUpdated"
  }
};
eAgentOfferContact

New task or contact has been routed to an agent.

Example

Desktop.agentContact.addEventListener(
  "eAgentOfferContact",
  (msg: Service.Aqm.Contact.AgentContact) => logger.info(msg)
);

Example Response

const eAgentOfferContact = {
  data: {
    agentId: "7d12d9ea-e8e0-41ee-81bf-c11a685b64ed",
    eventType: "RoutingMessage",
    interaction: {
      callAssociatedData: {
        ani: {
          value: "janedoe@gmail.com"
        },
        category: {
          value: "Automation"
        },
        customerName: {
          value: "Jane Doe"
        },
        dn: {
          value: "Desktop"
        },
        entryPointId: {
          value: "AXCqFyz1G2pKap9PI-mW"
        },
        guestId: {
          value:
            "Y2lzY29zcGFyazovL3VzL1BFT1BMRS83ZjA3YjJmMC1jNTMyLTQ5MDktYTkzNi0yYTA3MTVmZGIwMTA"
        },
        mediaChannel: {
          value: "web"
        },
        reason: {
          value: "Test"
        },
        reasonCode: {
          value: "Automation"
        },
        ronaTimeout: {
          value: "30"
        },
        roomTitle: {
          value: "Help Jane Doe with Automation"
        },
        taskToBeSelfServiced: {
          value: "false"
        },
        templateId: {
          value: "b57990c0-5ec6-11ea-96ee-5df5aef56329"
        },
        templateName: {
          value: "Desktop"
        },
        virtualTeamName: {
          value: "Chat_Queue"
        }
      },
      callAssociatedDetails: {
        ani: "janedoe@gmail.com",
        category: "Automation",
        customerName: "Jane Doe",
        dn: "Desktop",
        entryPointId: "AXCqFyz1G2pKap9PI-mW",
        guestId:
          "Y2lzY29zcGFyazovL3VzL1BFT1BMRS83ZjA3YjJmMC1jNTMyLTQ5MDktYTkzNi0yYTA3MTVmZGIwMTA",
        mediaChannel: "web",
        reason: "Test",
        reasonCode: "Automation",
        ronaTimeout: "30",
        roomTitle: "Help Jane Doe with Automation",
        taskToBeSelfServiced: "false",
        templateId: "b57990c0-5ec6-11ea-96ee-5df5aef56329",
        templateName: "Desktop",
        virtualTeamName: "Chat_Queue"
      },
      callFlowParams: {
        Automation: {
          description: "(vteam, A valid VTeam.)",
          name: "Automation",
          qualifier: "vteam",
          value: "3270",
          valueDataType: "string"
        },
        Debit: {
          description: "(vteam, A valid VTeam.)",
          name: "Debit",
          qualifier: "vteam",
          value: "3270",
          valueDataType: "string"
        },
        Sales: {
          description: "(vteam, A valid VTeam.)",
          name: "Sales",
          qualifier: "vteam",
          value: "3270",
          valueDataType: "string"
        }
      },
      callProcessingDetails: {
        QMgrName: "aqm",
        QueueId: "3270",
        ani: "janedoe@gmail.com",
        category: "Automation",
        customerName: "Jane Doe",
        dnis: "Desktop",
        entryPointId: "AXCqFyz1G2pKap9PI-mW",
        guestId:
          "Y2lzY29zcGFyazovL3VzL1BFT1BMRS83ZjA3YjJmMC1jNTMyLTQ5MDktYTkzNi0yYTA3MTVmZGIwMTA",
        mediaChannel: "web",
        reason: "Test",
        reasonCode: "Automation",
        ronaTimeout: "30",
        roomTitle: "Help Jane Doe with Automation",
        taskToBeSelfServiced: "false",
        templateId: "b57990c0-5ec6-11ea-96ee-5df5aef56329",
        templateName: "Desktop",
        tenantId: "133",
        virtualTeamName: "Chat_Queue",
        vteamId: "AXCqFyz1G2pKap9PI-mW"
      },
      contactDirection: {
        type: "INBOUND"
      },
      currentVTeam: "3270",
      interactionId: "8d3a56fa-4172-11eb-abaf-1b20df734401",
      isFcManaged: false,
      isTerminated: false,
      media: {
        Y2lzY29zcGFyazovL3VzL1JPT00vOTAxMmEzZjAtNDE3Mi0xMWViLWE1N2QtZWY2N2MwZTMyYmFh:
          {
            holdTimestamp: null,
            isHold: false,
            mType: "mainCall",
            mediaMgr: "cmm",
            mediaResourceId:
              "Y2lzY29zcGFyazovL3VzL1JPT00vOTAxMmEzZjAtNDE3Mi0xMWViLWE1N2QtZWY2N2MwZTMyYmFh",
            mediaType: "chat",
            participants: ["janedoe@gmail.com"]
          }
      },
      mediaChannel: "web",
      mediaType: "chat",
      orgId: "f111e3af-1a45-42ef-9erf-4562354b8a25",
      outboundType: null,
      owner: "7d12d9ea-e8e0-41ee-81bf-c11a685b64ed",
      participants: {
        "7d12d9ea-e8e0-41ee-81bf-c11a685b64ed": {
          channelId: "bff9350a-9d2a-489a-a8d5-d9dacea4b692",
          consultState: null,
          consultTimestamp: null,
          dn: "9997770110",
          hasJoined: false,
          id: "7d12d9ea-e8e0-41ee-81bf-c11a685b64ed",
          isConsulted: false,
          isWrapUp: false,
          joinTimestamp: null,
          lastUpdated: 1608324587206,
          name: "uuip-agent4 uuip-agent4",
          pType: "Agent",
          queueId: "3270",
          queueMgrId: "aqm",
          sessionId: "102d2096-bcc0-45bb-a583-a02f6c188071",
          siteId: "473",
          teamId: "1940",
          teamName: "Medical Help",
          type: "Agent",
          wrapUpTimestamp: null
        },
        "janedoe@gmail.com": {
          id: "janedoe@gmail.com",
          pType: "Customer",
          type: "Customer"
        }
      },
      previousVTeams: [],
      state: "new"
    },
    interactionId: "8d3a56fa-4172-11eb-abaf-1b20df734401",
    mediaResourceId:
      "Y2lzY29zcGFyazovL3VzL1JPT00vOTAxMmEzZjAtNDE3Mi0xMWViLWE1N2QtZWY2N2MwZTMyYmFh",
    orgId: "f111e3af-1a45-42ef-9erf-4562354b8a25",
    queueMgr: "aqm",
    ronaTimeout: 30,
    trackingId: "429bb73d-7463-4661-94aa-a3230d60e88a",
    type: "AgentOfferContact"
  },
  orgId: "f111e3af-1a45-42ef-9erf-4562354b8a25",
  trackingId: "notifs_f23e73e4-b130-4bce-b110-1c1da7225ffa",
  type: "RoutingMessage"
};
eAgentOfferContactRona

Agent failed to accept the task or contact request within the maximum available time. The system changes the agent state from Available to RONA.

Example

Desktop.agentContact.addEventListener(
  "eAgentOfferContactRona",
  (msg: Service.Aqm.Contact.AgentContact) => logger.info(msg)
);

For more information on example response, see decline.

eAgentOfferConsult

Accepted task or contact consult request has been routed to an agent.

Example

Desktop.agentContact.addEventListener(
  "eAgentOfferConsult",
  (msg: Service.Aqm.Contact.AgentContact) => logger.info(msg)
);

Example Response

export const eAgentOfferConsult = {
  type: "RoutingMessage",
  orgId: "f111e3af-1a45-42ef-9erf-4562354b8a25",
  trackingId: "notifs_50e9d868-71c0-48f2-9880-4a12fc505988",
  data: {
    consultMediaResourceId:
      "consult_Y2lzY29zcGFyazovL3VzL1JPT00vODZkMGQ2MDAtOTQ0Yy0xMWVhLWE4MjMtNzFjMjA3YWRlYjAx",
    eventType: "RoutingMessage",
    agentId: "8546f083-74ae-4510-b2a6-c8e21f01689b",
    consultingAgentId: "9738292f-3a68-4909-bdea-b541cccd6935",
    trackingId: "ca074768-9d2b-427e-86af-3745c2a8cc60",
    interaction: {
      isFcManaged: false,
      isTerminated: false,
      mediaType: "chat",
      previousVTeams: [],
      state: "consult",
      currentVTeam: "3270",
      participants: {
        "mohaksin@cisco.com": {
          id: "mohaksin@cisco.com",
          pType: "Customer",
          type: "Customer"
        },
        "8546f083-74ae-4510-b2a6-c8e21f01689b": {
          name: "",
          pType: "Agent",
          teamName: "Dont_Use_Team",
          joinTimestamp: null,
          lastUpdated: 1589287209385,
          teamId: "964",
          isConsulted: true,
          hasJoined: false,
          dn: "9997770111",
          queueId: "3270",
          id: "8546f083-74ae-4510-b2a6-c8e21f01689b",
          sessionId: "dead6d11-3d8f-42ea-87d9-b94d5f5b6370",
          queueMgrId: "aqm",
          siteId: "472",
          type: "Agent",
          channelId: "a4297667-6d16-4d9d-ad2f-b21fee6b97fe",
          isWrapUp: false
        },
        "9738292f-3a68-4909-bdea-b541cccd6935": {
          name: "vivek",
          pType: "Agent",
          teamName: "Dont_Use_Team",
          joinTimestamp: 1594295035415,
          lastUpdated: 1589287209385,
          teamId: "964",
          isConsulted: false,
          hasJoined: true,
          dn: "9997770111",
          queueId: "3270",
          id: "9738292f-3a68-4909-bdea-b541cccd6935",
          sessionId: "dead6d11-3d8f-42ea-87d9-b94d5f5b6370",
          queueMgrId: "aqm",
          siteId: "472",
          type: "Agent",
          channelId: "a4297667-6d16-4d9d-ad2f-b21fee6b97fe",
          isWrapUp: false
        }
      },
      interactionId: "cd4f3721-944b-11ea-a5e5-bdac2bb8b026",
      orgId: "f111e3af-1a45-42ef-9erf-4562354b8a25",
      callProcessingDetails: {
        QMgrName: "aqm",
        taskToBeSelfServiced: "false",
        ani: "mohaksin@cisco.com",
        dnis: "AgentX",
        tenantId: "133",
        QueueId: "3270",
        vteamId: "AXCqFyz1G2pKap9PI-mW",
        virtualTeamName: "Chat_Queue",
        customerName: "Mohak",
        ronaTimeout: "30",
        reasonCode: "Sales",
        reason: "Lockdown challeeeya",
        category: "Sales"
      },
      media: {
        Y2lzY29zcGFyazovL3VzL1JPT00vODZkMGQ2MDAtOTQ0Yy0xMWVhLWE4MjMtNzFjMjA3YWRlYjAx:
          {
            mediaResourceId:
              "Y2lzY29zcGFyazovL3VzL1JPT00vODZkMGQ2MDAtOTQ0Yy0xMWVhLWE4MjMtNzFjMjA3YWRlYjAx",
            mediaType: "chat",
            mediaMgr: "cmm",
            participants: ["mohaksin@cisco.com"],
            mType: "mainCall",
            isHold: false
          }
      },
      owner: "8546f083-74ae-4510-b2a6-c8e21f01689b",
      mediaChannel: "web",
      contactDirection: {
        type: "INBOUND"
      },
      callFlowParams: {
        Sales: {
          name: "Sales",
          qualifier: "vteam",
          description: "(vteam, A valid VTeam.)",
          valueDataType: "string",
          value: "3270"
        },
        Debit: {
          name: "Debit",
          qualifier: "vteam",
          description: "(vteam, A valid VTeam.)",
          valueDataType: "string",
          value: "3270"
        },
        Automation: {
          name: "Automation",
          qualifier: "vteam",
          description: "(vteam, A valid VTeam.)",
          valueDataType: "string",
          value: "3270"
        }
      }
    },
    ronaTimeout: 30,
    interactionId: "cd4f3721-944b-11ea-a5e5-bdac2bb8b026",
    orgId: "f111e3af-1a45-42ef-9erf-4562354b8a25",
    queueMgr: "aqm",
    type: "AgentOfferConsult"
  }
};
eAgentWrapup

Accepted task or contact has been moved to a wrap up state.

Example

Desktop.agentContact.addEventListener(
  "eAgentWrapup",
  (msg: Service.Aqm.Contact.AgentContact) => logger.info(msg)
);

For more information on example response, see end.

eAgentContactHeld

Accepted task or contact has been put on hold.

Example

Desktop.agentContact.addEventListener(
  "eAgentContactHeld",
  (msg: Service.Aqm.Contact.AgentContact) => logger.info(msg)
);

For more information on example response, see hold.

eAgentContactUnHeld

Accepted task or contact has been resumed.

Example

Desktop.agentContact.addEventListener(
  "eAgentContactUnHeld",
  (msg: Service.Aqm.Contact.AgentContact) => logger.info(msg)
);

For more information on example response, see unHold().

eCallRecordingStarted

Call recording for an accepted task or contact has started.

Example

Desktop.agentContact.addEventListener(
  "eCallRecordingStarted",
  (msg: Service.Aqm.Contact.AgentContact) => logger.info(msg)
);

Example Response

const eCallRecordingStarted = {
  data: {
    eventType: "RoutingMessage",
    interaction: {
      callAssociatedData: {
        ani: {
          agentEditable: false,
          displayName: "ani",
          name: "ani",
          type: "STRING",
          value: "9997652131"
        },
        dn: {
          agentEditable: false,
          displayName: "dn",
          name: "dn",
          type: "STRING",
          value: "9997651073"
        },
        ronaTimeout: {
          agentEditable: false,
          displayName: "ronaTimeout",
          name: "ronaTimeout",
          type: "STRING",
          value: "30"
        },
        virtualTeamName: {
          agentEditable: false,
          displayName: "virtualTeamName",
          name: "virtualTeamName",
          type: "STRING",
          value: "qaus1-gt-requeue"
        }
      },
      callAssociatedDetails: {
        ani: "**********",
        dn: "**********",
        ronaTimeout: "30",
        virtualTeamName: "qaus1-gt-requeue"
      },
      callFlowParams: {
        OutdialQueue: {
          description: "(vteam, The Outdial Queue.)",
          name: "OutdialQueue",
          qualifier: "vteam",
          value: "4125",
          valueDataType: "string"
        }
      },
      callProcessingDetails: {
        QMgrName: "aqm",
        QueueId: "4125",
        agent_ani: "9997652131",
        ani: "**********",
        dnis: "**********",
        doNotRouteToAgents: "9b036d89-930c-4187-a5bd-5dbb1439fe41",
        outdialParkEpId: "AXRnbLmz1OI4n5klYr5E",
        outdialTransferToQueueEnabled: "true",
        pauseDuration: "30",
        pauseResumeEnabled: "true",
        recordInProgress: "true",
        ronaTimeout: "30",
        taskToBeSelfServiced: "false",
        tenantId: "82",
        virtualTeamName: "qaus1-gt-requeue",
        vteamId: "6838",
        vteamType: "inboundqueue"
      },
      contactDirection: {
        type: "OUTBOUND"
      },
      currentVTeam: "6838",
      interactionId: "28a8f08f-0d2f-46f9-9751-a2d9536886c1",
      isFcManaged: false,
      isTerminated: false,
      media: {
        "28a8f08f-0d2f-46f9-9751-a2d9536886c1": {
          holdTimestamp: null,
          isHold: false,
          mType: "mainCall",
          mediaMgr: "vmm",
          mediaResourceId: "28a8f08f-0d2f-46f9-9751-a2d9536886c1",
          mediaType: "telephony",
          participants: ["**********", "**********"]
        }
      },
      mediaChannel: "dialer",
      mediaType: "telephony",
      orgId: "f111e3af-1a45-42ef-9erf-4562354b8a25",
      outboundType: "OUTDIAL",
      owner: "5b24107f-aae2-45e6-9bf8-a36d18b6f0e5",
      participants: {
        "5b24107f-aae2-45e6-9bf8-a36d18b6f0e5": {
          channelId: "1b61e3f4-9c33-4241-9304-9ea054b88be0",
          consultState: null,
          consultTimestamp: null,
          dn: "**********",
          hasJoined: true,
          id: "5b24107f-aae2-45e6-9bf8-a36d18b6f0e5",
          isConsulted: false,
          isWrapUp: false,
          joinTimestamp: 1612429637332,
          lastUpdated: 1612429637332,
          name: "qaus1-gt-requeue-user qaus1-gt-requeue-user",
          pType: "Agent",
          queueId: "6838",
          queueMgrId: "aqm",
          sessionId: "56d94e8d-fbd0-4933-936d-7c19f422ec47",
          siteId: "205",
          teamId: "1837",
          teamName: "integ-test-team",
          type: "Agent",
          wrapUpTimestamp: null
        },
        "**********": {
          id: "9997652131",
          pType: "Customer",
          type: "Customer"
        },
        "9b036d89-930c-4187-a5bd-5dbb1439fe41": {
          channelId: "3de6706f-95b7-485a-9304-30928f7ee52e",
          consultState: null,
          consultTimestamp: null,
          dn: "**********",
          hasJoined: true,
          id: "9b036d89-930c-4187-a5bd-5dbb1439fe41",
          isConsulted: false,
          isWrapUp: true,
          joinTimestamp: 1612429625705,
          lastUpdated: 1612429636839,
          name: "qaus1-gt-user1 qaus1-gt-user1",
          pType: "Agent",
          queueId: "4125",
          queueMgrId: "aqm",
          sessionId: "90896c91-0f77-4bc6-aec3-488a34ca88d3",
          siteId: "205",
          teamId: "598",
          teamName: "integ-test-team",
          type: "Agent",
          wrapUpTimestamp: 1612429636839
        }
      },
      previousVTeams: ["4125"],
      state: "connected",
      workflowManager: null
    },
    interactionId: "28a8f08f-0d2f-46f9-9751-a2d9536886c1",
    orgId: "f111e3af-1a45-42ef-9erf-4562354b8a25",
    queueMgr: "aqm",
    trackingId: "795e3411-191d-4524-b01c-bf672126fe02",
    type: "ContactRecordingStarted"
  },
  orgId: "f111e3af-1a45-42ef-9erf-4562354b8a25",
  trackingId: "notifs_9e18c618-cdd6-4bf7-be18-cafd250faabc",
  type: "RoutingMessage"
};
eResumeRecording

Resumes a voice call recording for an accepted task or contact.

Example

Desktop.agentContact.addEventListener(
  "eResumeRecording",
  (msg: Service.Aqm.Contact.AgentContact) => logger.info(msg)
);

For more information on example response, see resumeRecording.

ePauseRecording

Pauses a call recording for an accepted task or contact.

Example

Desktop.agentContact.addEventListener(
  "ePauseRecording",
  (msg: Service.Aqm.Contact.AgentContact) => logger.info(msg)
);

For more information on example response, see pauseRecording.

eConsultTransfer

Consult transfer request for an accepted task or contact.

Example

Desktop.agentContact.addEventListener(
  "eConsultTransfer",
  (msg: Service.Aqm.Contact.AgentContact) => logger.info(msg)
);

For more information on example response, see consultTransfer.

eAgentblindTransferred

Transfers an accepted task or contact to an agent or queue.

Example

Desktop.agentContact.addEventListener(
  "eAgentblindTransferred",
  (msg: Service.Aqm.Contact.AgentContact) => logger.info(msg)
);

For more information on example response, see blindTransfer.

eAgentvteamTransfer

Transfers an accepted task or contact to a queue.

Example

Desktop.agentContact.addEventListener(
  "eAgentvteamTransfer",
  (msg: Service.Aqm.Contact.AgentContact) => logger.info(msg)
);

For more information on example response, see vTeamTransfer.

eAgentConsultCreated

Consult request for an accepted task or contact has been created.

Example

Desktop.agentContact.addEventListener(
  "eAgentConsultCreated",
  (msg: Service.Aqm.Contact.AgentContact) => logger.info(msg)
);

For more information on example response, see consult.

eAgentConsultConferenced

Consult conference request for an accepted task or contact has been connected.

Note: Event is received when conference is established for all channels except email.

Example

Desktop.agentContact.addEventListener(
  "eAgentConsultConferenced",
  (msg: Service.Aqm.Contact.AgentContact) => logger.info(msg)
);

For more information on example response, see consultConference.

eAgentConsultEnded

Consult request for an accepted task or contact has ended.

Example

Desktop.agentContact.addEventListener(
  "eAgentConsultEnded",
  (msg: Service.Aqm.Contact.AgentContact) => logger.info(msg)
);

For more information on example response, see consultEnd.

eAgentCtqCancelled

Consult request to the queue has been canceled.

Example

Desktop.agentContact.addEventListener(
  "eAgentCtqCancelled",
  (msg: Service.Aqm.Contact.AgentContact) => logger.info(msg)
);

For more information on example response, see cancelCtq.

eAgentConsultConferenceEnded

Consult conference request for an accepted task or contact has ended.

Example

Desktop.agentContact.addEventListener(
  "eAgentConsultConferenceEnded",
  (msg: Service.Aqm.Contact.AgentContact) => logger.info(msg)
);

For more information on example response, see consultEnd.

eAgentConsulting

Agent has started consulting an incoming task or contact.

Example

Desktop.agentContact.addEventListener(
  "eAgentConsulting",
  (msg: Service.Aqm.Contact.AgentContact) => logger.info(msg)
);

For more information on example response, see consultAccept.

eAgentConsultFailed

Consult request for an accepted task or contact did not succeed.

Example

Desktop.agentContact.addEventListener(
  "eAgentConsultFailed",
  (msg: Service.Aqm.Contact.AgentContact) => logger.info(msg)
);

For more information on example response, see consult.

eAgentConsultEndFailed

Request to end consult for an accepted task or contact did not succeed.

Example

Desktop.agentContact.addEventListener(
  "eAgentConsultEndFailed",
  (msg: Service.Aqm.Contact.AgentContact) => logger.info(msg)
);

For more information on example response, see consultEnd.

eAgentCtqFailed

Consult request to the queue did not succeed.

Example

Desktop.agentContact.addEventListener(
  "eAgentCtqFailed",
  (msg: Service.Aqm.Contact.AgentContact) => logger.info(msg)
);

For more information on example response, see consult.

eAgentCtqCancelFailed

Request to cancel the consult to the queue did not succeed.

Example

Desktop.agentContact.addEventListener(
  "eAgentCtqCancelFailed",
  (msg: Service.Aqm.Contact.AgentContact) => logger.info(msg)
);

For more information on example response, see cancelCtq.

eAgentConsultConferenceEndFailed

Request to end the consult conference request did not succeed.

Example

Desktop.agentContact.addEventListener(
  "eAgentConsultConferenceEndFailed",
  (msg: Service.Aqm.Contact.AgentContact) => logger.info(msg)
);
eAgentMonitorStateChanged

The agent listens to this event when supervisor barges in to the interaction between the agent and customer.

Example

Desktop.agentContact.addEventListener(
  "eAgentMonitorStateChanged",
  (msg: Service.Aqm.Contact.AgentContact) => logger.info(msg)
);
eAgentMonitoringEnded

The agent listens to this event when supervisor has ended the call monitoring.

Example

Desktop.agentContact.addEventListener(
  "eAgentMonitoringEnded",
  (msg: Service.Aqm.Contact.AgentContact) => logger.info(msg)
);
eAgentOfferCampaignReserved

The agent listens to this event when the progressive campaign reservation call is ringing in the agent's device.

Example

Desktop.agentContact.addEventListener(
  "eAgentOfferCampaignReserved",
  (msg => console.log(msg)
);
eAgentAddCampaignReserved

The agent listens to this event when the agents answers the progressive campaign reservation call.

Example

Desktop.agentContact.addEventListener(
  "eAgentAddCampaignReserved",
  (msg => console.log(msg)
);
Update Dynamic Widget Title

Updates the wrapper title using the JavaScript SDK for the dynamic web component widget.

Example

const e = new CustomEvent("unique-id-to-update-title", {
  bubbles: true,
  detail: {
    title: "new title"
  }
});
window.dispatchEvent(e);

In the CustomEvent, ensure that you use the same unique identifier (unique-id-to-update-title) specified in the JSON desktop layout. For more information on JSON layout, see the Desktop Layout section in the Provisioning chapter of the Cisco Webex Contact Center Setup and Administration Guide.

To update the iFrame-based widget title, use the iFrame content from the same domain.

Example

<
script type = "text/javascript" >
    var title = "";
window.addEventListener("update-title-event", function(e) {
    title = e.detail.title;
});
document.querySelector('#customEvent').onclick = function() {
    const e = new CustomEvent("update-title-event", {
        bubbles: true,
        detail: {
            title: "new title"
        }
    });
    window.parent.dispatchEvent(e);
}; <
/script> <
button id = "customEvent" > New Title < /button> <
    iframe src = "https://blog.logrocket.com/the-ultimate-guide-to-iframes/" > < /iframe>
Dialer Module

The Desktop.dialer module makes requests and listens to notification events related to the outdial activity (outgoing customer calls initiated by agents).

Example

import {
    Desktop
} from "@wxcc-desktop/sdk";

...

const outdial = await Desktop.dialer.startOutdial({
    data: {
        entryPointId: “1212312567”,
        destination: “12078995678”,
        origin: "+1-3364112001"
        direction: “OUTBOUND”,
        attributes: {},
        mediaType: “telephony”,
        outboundType: “OUTDIAL”
    }
});

logger.info(“Dialer outdial: “, outdial);

// List of available subscription events:
Desktop.dialer.addEventListener("eOutdialFailed", msg => logger.info(msg));

To remove an event subscription in order to avoid memory leaks, you have the following options:

// Module supports removing added listeners like:
const listener = (msg) => logger.info(msg);
Desktop.dialer.addEventListener("eOutdialFailed", listener);
Desktop.dialer.removeEventListener("eOutdialFailed", listener);

// Module supports one-time added listeners like:
Desktop.dialer.addOnceEventListener("eOutdialFailed", listener);
Desktop.dialer.removeOnceEventListener("eOutdialFailed", listener);

// Module supports removing all listeners like:
Desktop.dialer.removeAllEventListeners();
Methods
startOutdial(data)

Initiates an outdial call.

Example

await Desktop.dialer.startOutdial({
    data: {
        entryPointId: “1212312567”,
        destination: “12078995678”,
        direction: “OUTBOUND”,
    origin: "67078005678",
        attributes: {},
        mediaType: “telephony”,
        outboundType: “CourtesyCallback”
    }
});

Parameters

NameTypeDescriptionRequired
dataObjectOptions for the outdial call.Yes
-->entryPointIdStringUnique identifier of the outdial entry point.Yes
-->destinationStringDial number of the end recipient.Yes
-->directionStringDirection of call from a dialer to recipient.Yes
-->originStringTo add any outdial ANI value.Yes
-->attributesObjectOptions of the attributes.Optional
-->mediaTypeStringThe media channel type such as telephony, social, email, and chat.Yes
-->outboundTypeStringType of an outdial call such as OUTDIAL, CourtesyCallback.Yes

Returns{Object} The object with the retrieved data.

Example Response

const startOutdialResponse = {
  data: {
    agentId: "7c867aa9-ec768-341a-b767-e5hd6ae7g701",
    eventType: "RoutingMessage",
    interaction: {
      callAssociatedData: {
        dn: {
          agentEditable: false,
          displayName: "dn",
          name: "dn",
          type: "STRING",
          value: "8895579172"
        },
        ronaTimeout: {
          agentEditable: false,
          displayName: "ronaTimeout",
          name: "ronaTimeout",
          type: "STRING",
          value: "30"
        },
        virtualTeamName: {
          agentEditable: false,
          displayName: "virtualTeamName",
          name: "virtualTeamName",
          type: "STRING",
          value: "Outdial Queue-1"
        }
      },
      callAssociatedDetails: {
        dn: "8895579172",
        ronaTimeout: "30",
        virtualTeamName: "Outdial Queue-1"
      },
      callFlowParams: {
        OutdialQueue: {
          description: "(vteam, The Outdial Queue.)",
          name: "OutdialQueue",
          qualifier: "vteam",
          value: "3264",
          valueDataType: "string"
        }
      },
      callProcessingDetails: {
        QMgrName: "aqm",
        QueueId: "3264",
        dnis: "8895579172",
        outdialTransferToQueueEnabled: "false",
        ronaTimeout: "30",
        taskToBeSelfServiced: "false",
        tenantId: "133",
        virtualTeamName: "Outdial Queue-1",
        vteamId: "AXCLfZZU9S1oTdqE1OFZ"
      },
      contactDirection: {
        type: "OUTBOUND"
      },
      currentVTeam: "3264",
      interactionId: "8da312bb-5349-4d97-89d9-7bedd01b8782",
      isFcManaged: false,
      isTerminated: false,
      media: {
        "8da312bb-5349-4d97-89d9-7bedd01b8782": {
          holdTimestamp: null,
          isHold: false,
          mType: "mainCall",
          mediaMgr: "vmm",
          mediaResourceId: "8da312bb-5349-4d97-89d9-7bedd01b8782",
          mediaType: "telephony",
          participants: []
        }
      },
      mediaChannel: "dialer",
      mediaType: "telephony",
      orgId: "f111e3af-1a45-42ef-9erf-4562354b8a25",
      outboundType: "OUTDIAL",
      owner: "7c867aa9-ec768-341a-b767-e5hd6ae7g701",
      participants: {
        "7c867aa9-ec768-341a-b767-e5hd6ae7g701": {
          channelId: "0717a2ce-76cd-4ba4-9053-71f2c78168b8",
          consultState: null,
          consultTimestamp: null,
          dn: "8895579172",
          hasJoined: false,
          id: "7c867aa9-ec768-341a-b767-e5hd6ae7g701",
          isConsulted: false,
          isWrapUp: false,
          joinTimestamp: null,
          lastUpdated: 1612345959131,
          name: "Jane Doe",
          pType: "Agent",
          queueId: "3264",
          queueMgrId: "aqm",
          sessionId: "3d017488-527a-4e89-9313-5d4eb353c789",
          siteId: "472",
          teamId: "960",
          teamName: "Email_Team",
          type: "Agent",
          wrapUpTimestamp: null
        }
      },
      previousVTeams: [],
      state: "new",
      workflowManager: null
    },
    interactionId: "8da312bb-5349-4d97-89d9-7bedd01b8782",
    mediaResourceId: "8da312bb-5349-4d97-89d9-7bedd01b8782",
    orgId: "f111e3af-1a45-42ef-9erf-4562354b8a25",
    queueMgr: "aqm",
    ronaTimeout: 30,
    trackingId: "cfe421df-f107-42f3-945b-a6da5dd13ccd",
    type: "AgentOfferContact"
  },
  orgId: "f111e3af-1a45-42ef-9erf-4562354b8a25",
  trackingId: "notifs_a6cfbcc4-7a8c-4a2e-a9d5-6c23683cdcb7",
  type: "RoutingMessage"
};
updateCadVariables()

Updates the Call-Associated Data (CAD) variables of a task.

Example

try {
  await Desktop.dialer.updateCadVariables({
    interactionId: "842ba17b-9902-4420-8607-ea89a13ab332111",
    data: {
      attributes: {
        Global_FeedbackSurveyOptIn: "uninitialized"
      }
    }
  });
} catch (e) {
  // Handle Exception
}

Note: You can add a JavaScript try-catch block to pass the error code and handle the exceptions.

Parameters

NameTypeDescriptionRequired
interactionIdStringUnique identifier for the user interaction.Yes
dataObjectOptions to update CAD variables.Yes
-->attributesObjectOptions for the attributes.Yes
-->nameStringKey (unique identifier) for the CAD variable.
Note: You can have a maximum of 30 CAD variables.
Yes
-->valueStringValue of the CAD variable.
Note: You can have a maximum of 256 characters.
Yes

Returns

{Object} The object with the retrieved data.

Example Response

const updateCadVariablesResponse = {
  data: {
    agentId: null,
    eventType: "RoutingMessage",
    interaction: {
      callAssociatedData: {
        AgentID: {
          agentEditable: true,
          agentViewable: true,
          displayName: "AgentIId",
          global: false,
          name: "AgentID",
          reportable: false,
          type: "STRING",
          value: "Test"
        },
        Global_FeedbackSurveyOptIn: {
          agentEditable: true,
          agentViewable: true,
          displayName: "Post Call Survey Opt-in",
          global: false,
          name: "Global_FeedbackSurveyOptIn",
          reportable: false,
          type: "STRING",
          value: "uninitialized"
        },
        Global_Language: {
          agentEditable: false,
          agentViewable: true,
          displayName: "Customer Language",
          global: false,
          name: "Global_Language",
          reportable: false,
          type: "STRING",
          value: "en-US"
        },
        InteractionId: {
          agentEditable: true,
          agentViewable: true,
          displayName: "Interaction ID",
          global: false,
          name: "InteractionId",
          reportable: false,
          type: "STRING",
          value: "842ba17b-9902-4420-8607-ea89a13ab332111"
        },
        ani: {
          agentEditable: false,
          agentViewable: true,
          displayName: "ani",
          global: false,
          name: "ani",
          reportable: false,
          type: "STRING",
          value: "+12157702012"
        },
        dn: {
          agentEditable: false,
          agentViewable: true,
          displayName: "dn",
          global: false,
          name: "dn",
          reportable: false,
          type: "STRING",
          value: "+12147659005"
        },
        ronaTimeout: {
          agentEditable: false,
          agentViewable: true,
          displayName: "ronaTimeout",
          global: false,
          name: "ronaTimeout",
          reportable: false,
          type: "STRING",
          value: "18"
        },
        test: {
          agentEditable: false,
          agentViewable: true,
          displayName: "test",
          global: false,
          name: "test",
          reportable: false,
          type: "BOOLEAN",
          value: "true"
        },
        virtualTeamName: {
          agentEditable: false,
          agentViewable: true,
          displayName: "virtualTeamName",
          global: false,
          name: "virtualTeamName",
          reportable: false,
          type: "STRING",
          value: "Queue - Telephony"
        }
      },
      callAssociatedDetails: {
        InteractionId: "842ba17b-9902-4420-8607-ea89a13ab332111",
        ani: "+12157702012",
        dn: "+12147659005",
        ronaTimeout: "18",
        virtualTeamName: "Queue - Telephony"
      },
      callFlowParams: {},
      callProcessingDetails: {
        CONTINUE_RECORDING_ON_TRANSFER: "true",
        EP_ID: "AXUCQa9666OI4n5klmFgk",
        QMgrName: "aqm",
        QueueId: "AXCZ0riRefBr7nI0lIHo",
        ani: "+12167702012",
        dnis: "+12137659005",
        fceRegisteredEvents: "",
        isParked: "false",
        mohFileName: "defaultmusic_on_hold.wav",
        participantInviteTimeout: "false",
        pauseDuration: "10",
        pauseResumeEnabled: "true",
        priority: "10",
        recordInProgress: "true",
        recordingStarted: "true",
        ronaTimeout: "18",
        routingStrategyId: "AXUCRX6iQA-8GMFVNc5I",
        taskToBeSelfServiced: "false",
        tenantId: "133",
        virtualTeamName: "Queue - Telephony",
        vteamId: "AXCZ0riRe7Br7nI0lIHo",
        workflowId: "5fb7b590349a083b26f23322",
        workflowName: "basic-call-flow"
      },
      contactDirection: {
        type: "INBOUND"
      },
      currentVTeam: "AXCZ0riRefBr7nI0lIHo",
      interactionId: "842ba17b-9902-4420-8607-ea89a13ab332",
      isFcManaged: true,
      isTerminated: true,
      media: {
        "842ba17b-9902-4420-8607-ea89a13ab332": {
          holdTimestamp: null,
          isHold: false,
          mType: "mainCall",
          mediaMgr: "vmm",
          mediaResourceId: "842ba17b-9902-4420-8607-ea89a13ab332",
          mediaType: "telephony",
          participants: ["+12157702012", "f9dfc80e-bc9f-4793-8714-055a8e0ec715"]
        }
      },
      mediaChannel: "broadcloud",
      mediaType: "telephony",
      orgId: "f222e3af-1a53-42ef-9deb-7520034b8a10",
      outboundType: null,
      owner: "f9dfc80e-bc9f-4793-8714-055a8e0ec715",
      participants: {
        "+12157702012": {
          id: "+12157702012",
          pType: "Customer",
          type: "Customer"
        },
        "f9dfc80e-bc9f-4793-8714-055a8e0ec715": {
          channelId: "8a979027-9f74-4e14-b2c2-db8ea0261275",
          consultState: null,
          consultTimestamp: null,
          dn: "+19997770103",
          hasJoined: true,
          id: "f9dfc80e-bc9f-4793-8714-055a8e0ec715",
          isConsulted: false,
          isWrapUp: true,
          joinTimestamp: 1634646818059,
          lastUpdated: 1634646838590,
          name: "Archana R",
          pType: "Agent",
          queueId: "AXCZ0riRefBr7nI0lIHo",
          queueMgrId: "aqm",
          sessionId: "98ba1262-1f77-4d74-a8f8-d36d670983eb",
          siteId: "473",
          skillId: null,
          skillName: null,
          skills: [],
          teamId: "962",
          teamName: "Team X",
          type: "Agent",
          wrapUpTimestamp: 1634646838590
        }
      },
      previousVTeams: ["AXUCQa9W1OI4n5klmFgk"],
      queuedTimestamp: null,
      state: "connected",
      workflowManager: null
    },
    interactionId: "842ba17b-9902-4420-8607-ea89a13ab332",
    orgId: "f222e3af-1a53-42ef-9deb-7520034b8a10",
    queueMgr: "aqm",
    trackingId: "adb6b600-8d28-4c32-bf50-5b190baae07d",
    type: "ContactUpdated",
    updatedBy: "f9dfc80e-bc9f-4793-8714-055a8e0ec715"
  }
};
Events
eOutdialFailed

Outdial call did not succeed.

Example

Desktop.dialer.addEventListener("eOutdialFailed", (msg) => logger.info(msg));

Example Response

const eOutdialFailed = {
  agentId: "7c867aa9-ec768-341a-b767-e5hd6ae7g701",
  eventType: "RoutingMessage",
  interaction: {
    callAssociatedData: {
      dn: {
        agentEditable: false,
        displayName: "dn",
        name: "dn",
        type: "STRING",
        value: "8895579172"
      },
      ronaTimeout: {
        agentEditable: false,
        displayName: "ronaTimeout",
        name: "ronaTimeout",
        type: "STRING",
        value: "30"
      },
      virtualTeamName: {
        agentEditable: false,
        displayName: "virtualTeamName",
        name: "virtualTeamName",
        type: "STRING",
        value: "Outdial Queue-1"
      }
    },
    callAssociatedDetails: {
      dn: "8895579172",
      ronaTimeout: "30",
      virtualTeamName: "Outdial Queue-1"
    },
    callFlowParams: {
      OutdialQueue: {
        description: "(vteam, The Outdial Queue.)",
        name: "OutdialQueue",
        qualifier: "vteam",
        value: "3264",
        valueDataType: "string"
      }
    },
    callProcessingDetails: {
      QMgrName: "aqm",
      QueueId: "3264",
      dnis: "8895579172",
      outdialTransferToQueueEnabled: "false",
      ronaTimeout: "30",
      taskToBeSelfServiced: "false",
      tenantId: "133",
      virtualTeamName: "Outdial Queue-1",
      vteamId: "AXCLfZZU9S1oTdqE1OFZ"
    },
    contactDirection: {
      type: "OUTBOUND"
    },
    currentVTeam: "3264",
    interactionId: "d87dac90-4f81-486c-8deb-b94bbcd21e92",
    isFcManaged: false,
    isTerminated: true,
    media: {
      "d87dac90-4f81-486c-8deb-b94bbcd21e92": {
        holdTimestamp: null,
        isHold: false,
        mType: "mainCall",
        mediaMgr: "vmm",
        mediaResourceId: "d87dac90-4f81-486c-8deb-b94bbcd21e92",
        mediaType: "telephony",
        participants: []
      }
    },
    mediaChannel: "dialer",
    mediaType: "telephony",
    orgId: "f111e3af-1a45-42ef-9erf-4562354b8a25",
    outboundType: "OUTDIAL",
    owner: "7c867aa9-ec768-341a-b767-e5hd6ae7g701",
    participants: {
      "7c867aa9-ec768-341a-b767-e5hd6ae7g701": {
        channelId: "0717a2ce-76cd-4ba4-9053-71f2c78168b8",
        consultState: null,
        consultTimestamp: null,
        dn: "8895579172",
        hasJoined: false,
        id: "7c867aa9-ec768-341a-b767-e5hd6ae7g701",
        isConsulted: false,
        isWrapUp: false,
        joinTimestamp: null,
        lastUpdated: 1612346591051,
        name: "John Doe",
        pType: "Agent",
        queueId: "3264",
        queueMgrId: "aqm",
        sessionId: "3d017488-527a-4e89-9313-5d4eb353c789",
        siteId: "472",
        teamId: "960",
        teamName: "Email_Team",
        type: "Agent",
        wrapUpTimestamp: null
      }
    },
    previousVTeams: [],
    state: "new",
    workflowManager: null
  },
  interactionId: "d87dac90-4f81-486c-8deb-b94bbcd21e92",
  mediaType: "telephony",
  orgId: "f111e3af-1a45-42ef-9erf-4562354b8a25",
  queueId: "3264",
  queueMgr: "aqm",
  reason: "CUSTOMER_UNAVAILABLE",
  reasonCode: 500,
  trackingId: "09f0d9fd-6cad-48a4-a906-be1b09a8fdc0",
  type: "AgentOutboundFailed"
};
Screen Pop Module

The Desktop.screenpop module makes requests and listens to notification events related to the screen pop entity.

Example

Desktop.screenpop.addEventListener("eScreenPop", (msg) => logger.info(msg));

To remove an event subscription in order to avoid memory leaks, you have the following options:

// Module supports removing added listeners like:
const listener = (msg) => logger.info(msg);
Desktop.screenpop.addEventListener("eScreenPop", listener);
Desktop.screenpop.removeEventListener("eScreenPop", listener);

// Module supports one-time added listeners like:
Desktop.screenpop.addOnceEventListener("eScreenPop", listener);
Desktop.screenpop.removeOnceEventListener("eScreenPop", listener);

// Module supports removing all listeners like:
Desktop.screenpop.removeAllEventListeners();
Events
eScreenPop

Listens to an event that displays the screen pop.

Example

Desktop.screenpop.addEventListener("eScreenPop", listener);

Example Response

const eScreenPop = {
  data: {
    agentId: "1736827c-10ef-4b2a-90e0-7d2a3743ded3",
    interactionId: "4745472e-cfa2-47f3-9fc1-16359516d648",
    queryParameters: null,
    screenPopUrl: "https://youtube.com",
    target: "insideDesktop",
    type: "ScreenPop"
  },
  orgId: "f111e3af-1a45-42ef-9erf-4562354b8a25",
  trackingId: "notifs_90a4bf42-ba95-47a6-b8cb-c1ed105ff5ea",
  type: "RoutingMessage"
};
Shortcut Key Module

The Desktop.shortcutKey module intends to register and call the shortcut key actions from widgets. You must know the list of existing shortcut keys in Desktop to avoid conflicts. For more information, see the Access Keyboard Shortcuts section in the Introduction chapter of the Cisco Webex Contact Center Agent Desktop User Guide.

Example

import {
    Desktop
} from "@wxcc-desktop/sdk";

console.log(Desktop.shortcutKey.DEFAULT_SHORTCUT_KEYS); //=> logs default shortcut keys

console.log(Desktop.shortcutKey.MODIFIERS); //=> logs keys modifiers

console.log(Desktop.shortcutKey.REGISTERED_KEYS); //=> logs registered keys without modifiers

console.log(Desktop.shortcutKey.getRegisteredKeys()); //=> logs service registered keys with modifiers (full information)

Desktop.shortcutKey.listenKeyPress((event) => {
    ...
}); //=> listen shortcuts key press

Desktop.shortcutKey.listenKeyConflict((event) => {
    ...
}); //=> listen shortcuts key conflict

Desktop.shortcutKey.listenConflictResolved(() => {}); //=> listen to shortcut key conflict resolved status

Desktop.shortcutKey.register([{
    ...
}, {
    ...
}, ...]); //=> registering shortcut keys actions

Desktop.shortcutKey.unregisterKeys('widget-one-example'); //=> used to unregister on unmount, widgetElement used for register should be provided
Methods
register()

Registers the shortcut key actions.

Example

Desktop.shortcutKey.register([
  {
    componentName: "Sample Comp",
    actionName: "login",
    modifierKeys: "ctrlKey_altKey",
    key: "r",
    callback: (data: Service.shortcut.EKeyInfo) => {}
  }
]);

The following table lists the payload details:

NameTypeDescriptionRequired
componentNameStringThe name of the functionality, component, or the widget.Yes
actionNameStringName of the action or operation performed by the assigned shortcut keys.Yes
modifierKeysStringThe modifier key is used commonly in keyboard shortcuts on the host platform. The keyboard modifier key combinations are:
- Ctrl + Shift
- Alt + Shift
- Ctrl + Alt
- Shift
- Ctrl
- Alt
Yes
keyStringThe main key to be combined with modifier keys. For example, Ctrl + Shift + e where Ctrl and Shift are the modifier keys, and e is the main key.Yes
callbackFunctionClient code can add the callback function while registering the shortcut key. When the shortcut key framework finds the matching keys from the registered keys list on the keyboard keyup event, then the shortcut framework invokes the callback method. The keyup event is invoked when a key is released.Yes

Returns

{Array} The array of objects.

Example Response

const register = {
    [{
            "widgetElement": "agentx-wc-navigation",
            "group": "Navigation",
            "action": "Open Home Page",
            "modifierKeys": "ctrlKey_altKey",
            "key": "1"
        },
        // widgetElement is the name of the web component
        // group is the name of the functionality, component, or the widget.
        {
            "widgetElement": "agentx-wc-navigation",
            "group": "Navigation",
            "action": "Open Agent Performance Statistics Page",
            "modifierKeys": "ctrlKey_altKey",
            "key": "2"
        },
        {
            "widgetElement": "agentx-wc-navigation",
            "group": "Navigation",
            "action": "Open Widget Using JS API Page",
            "modifierKeys": "ctrlKey_altKey",
            "key": "3"
        }
    ]
}
getRegisteredKeys()

Retrieves the registered shortcut keys with the modifiers.

Example

console.log(Desktop.shortcutKey.getRegisteredKeys());

Returns{Array} The array of objects.

Example Response

const getRegisteredKeys = [
  [
    "Go to Available StatectrlKey_altKeyr",
    {
      widgetElement: "agentx-react-state-selector",
      group: "Agent State",
      action: "Go to Available State",
      modifierKeys: "ctrlKey_altKey",
      key: "r"
    }
  ],
  [
    "Go to Idle StatectrlKey_altKeyn",
    {
      widgetElement: "agentx-react-state-selector",
      group: "Agent State",
      action: "Go to Idle State",
      modifierKeys: "ctrlKey_altKey",
      key: "n"
    }
  ],
  [
    "Send EmailctrlKey_altKeys",
    {
      widgetElement: "agentx-react-email-composer",
      group: "Email Handling",
      action: "Send Email",
      modifierKeys: "ctrlKey_altKey",
      key: "s"
    }
  ],
  [
    "ReplyctrlKey_shiftKey6",
    {
      widgetElement: "agentx-react-email-composer",
      group: "Email Handling",
      action: "Reply",
      modifierKeys: "ctrlKey_shiftKey",
      key: "6"
    }
  ],
  [
    "Reply AllctrlKey_shiftKey5",
    {
      widgetElement: "agentx-react-email-composer",
      group: "Email Handling",
      action: "Reply All",
      modifierKeys: "ctrlKey_shiftKey",
      key: "5"
    }
  ],
  [
    "Open Outbound callctrlKey_altKeyo",
    {
      widgetElement: "agentx-react-out-dial",
      group: "Outbound",
      action: "Open Outbound call",
      modifierKeys: "ctrlKey_altKey",
      key: "o"
    }
  ],
  [
    "Open Notification CenterctrlKey_altKeyi",
    {
      widgetElement: "wagentx-wc-menu-notification",
      group: "Notification",
      action: "Open Notification Center",
      modifierKeys: "ctrlKey_altKey",
      key: "i"
    }
  ],
  [
    "Enable Silent NotificationsctrlKey_altKeyd",
    {
      widgetElement: "wagentx-wc-menu-notification",
      group: "Notification",
      action: "Enable Silent Notifications",
      modifierKeys: "ctrlKey_altKey",
      key: "d"
    }
  ],
  [
    "Accept Chat/Email/SocialctrlKey_altKeya",
    {
      widgetElement: "agentx-react-interaction-control",
      group: "Application",
      action: "Accept Chat/Email/Social",
      modifierKeys: "ctrlKey_altKey",
      key: "a"
    }
  ],
  [
    "Switch between PopoversctrlKey_altKeyp",
    {
      widgetElement: "agentx-react-interaction-control",
      group: "Application",
      action: "Switch between Popovers",
      modifierKeys: "ctrlKey_altKey",
      key: "p"
    }
  ],
  [
    "Expand/Collapse the PopoverctrlKey_shiftKey9",
    {
      widgetElement: "agentx-react-interaction-control",
      group: "Application",
      action: "Expand/Collapse the Popover",
      modifierKeys: "ctrlKey_shiftKey",
      key: "9"
    }
  ],
  [
    "Accept all (visible) PopoversctrlKey_shiftKey4",
    {
      widgetElement: "agentx-react-interaction-control",
      group: "Application",
      action: "Accept all (visible) Popovers",
      modifierKeys: "ctrlKey_shiftKey",
      key: "4"
    }
  ],
  [
    "Hold/Resume CallctrlKey_altKeyv",
    {
      widgetElement: "agentx-react-interaction-control",
      group: "Interaction Control",
      action: "Hold/Resume Call",
      modifierKeys: "ctrlKey_altKey",
      key: "v"
    }
  ],
  [
    "Pause/Resume RecordingctrlKey_shiftKeyz",
    {
      widgetElement: "agentx-react-interaction-control",
      group: "Interaction Control",
      action: "Pause/Resume Recording",
      modifierKeys: "ctrlKey_shiftKey",
      key: "z"
    }
  ],
  [
    "Conference Request for Call/ChatctrlKey_altKeyh",
    {
      widgetElement: "agentx-react-interaction-control",
      group: "Interaction Control",
      action: "Conference Request for Call/Chat",
      modifierKeys: "ctrlKey_altKey",
      key: "h"
    }
  ],
  [
    "Consult Request for CallctrlKey_altKeyc",
    {
      widgetElement: "agentx-react-interaction-control",
      group: "Interaction Control",
      action: "Consult Request for Call",
      modifierKeys: "ctrlKey_altKey",
      key: "c"
    }
  ],
  [
    "End for All ChannelsctrlKey_altKeye",
    {
      widgetElement: "agentx-react-interaction-control",
      group: "Interaction Control",
      action: "End for All Channels",
      modifierKeys: "ctrlKey_altKey",
      key: "e"
    }
  ],
  [
    "Transfer Request for All ChannelsctrlKey_altKeyx",
    {
      widgetElement: "agentx-react-interaction-control",
      group: "Interaction Control",
      action: "Transfer Request for All Channels",
      modifierKeys: "ctrlKey_altKey",
      key: "x"
    }
  ],
  [
    "Save Edited CAD Variable ValuesctrlKey_altKeym",
    {
      widgetElement: "agentx-react-interaction-control",
      group: "Interaction Control",
      action: "Save Edited CAD Variable Values",
      modifierKeys: "ctrlKey_altKey",
      key: "m"
    }
  ],
  [
    "Revert Edited CAD Variable ValuesctrlKey_altKeyz",
    {
      widgetElement: "agentx-react-interaction-control",
      group: "Interaction Control",
      action: "Revert Edited CAD Variable Values",
      modifierKeys: "ctrlKey_altKey",
      key: "z"
    }
  ],
  [
    "Expand/CollapsectrlKey_shiftKeyy",
    {
      widgetElement: "agentx-react-interaction-control",
      group: "Interaction Control",
      action: "Expand/Collapse",
      modifierKeys: "ctrlKey_shiftKey",
      key: "y"
    }
  ],
  [
    "Wrap Up ReasonctrlKey_altKeyw",
    {
      widgetElement: "agentx-react-interaction-control",
      group: "Interaction Control",
      action: "Wrap Up Reason",
      modifierKeys: "ctrlKey_altKey",
      key: "w"
    }
  ],
  [
    "Open User ProfilectrlKey_altKeyu",
    {
      widgetElement: "agentx-react-agent-profile",
      group: "User Profile",
      action: "Open User Profile",
      modifierKeys: "ctrlKey_altKey",
      key: "u"
    }
  ],
  [
    "Sign OutctrlKey_altKeyl",
    {
      widgetElement: "agentx-react-agent-profile",
      group: "User Profile",
      action: "Sign Out",
      modifierKeys: "ctrlKey_altKey",
      key: "l"
    }
  ],
  [
    "Open Keyboard Shortcuts ListctrlKey_altKeyf",
    {
      widgetElement: "agentx-react-agent-profile",
      group: "User Profile",
      action: "Open Keyboard Shortcuts List",
      modifierKeys: "ctrlKey_altKey",
      key: "f"
    }
  ],
  [
    "Download Error ReportctrlKey_shiftKey2",
    {
      widgetElement: "agentx-react-agent-profile",
      group: "User Profile",
      action: "Download Error Report",
      modifierKeys: "ctrlKey_shiftKey",
      key: "2"
    }
  ],
  [
    "Switch between active tasksctrlKey_shiftKey8",
    {
      widgetElement: "agentx-wc-task-list",
      group: "Task List",
      action: "Switch between active tasks",
      modifierKeys: "ctrlKey_shiftKey",
      key: "8"
    }
  ],
  [
    "Expand/Collapse the Task PanelctrlKey_shiftKey7",
    {
      widgetElement: "agentx-wc-task-list",
      group: "Task List",
      action: "Expand/Collapse the Task Panel",
      modifierKeys: "ctrlKey_shiftKey",
      key: "7"
    }
  ],
  [
    "Open Navigation TabctrlKey_altKeyt",
    {
      widgetElement: "agentx-wc-connector",
      group: "Connector View",
      action: "Open Navigation Tab",
      modifierKeys: "ctrlKey_altKey",
      key: "t"
    }
  ],
  [
    "RefreshctrlKey_altKeyb",
    {
      widgetElement: "agentx-wc-connector",
      group: "Connector View",
      action: "Refresh",
      modifierKeys: "ctrlKey_altKey",
      key: "b"
    }
  ],
  [
    "Open HomectrlKey_altKey1",
    {
      widgetElement: "agentx-wc-navigation",
      group: "Navigation",
      action: "Open Home",
      modifierKeys: "ctrlKey_altKey",
      key: "1"
    }
  ],
  [
    "Open Agent Performance StatisticsctrlKey_altKey2",
    {
      widgetElement: "agentx-wc-navigation",
      group: "Navigation",
      action: "Open Agent Performance Statistics",
      modifierKeys: "ctrlKey_altKey",
      key: "2"
    }
  ],
  [
    "Open Webex Experience Manager MetricsctrlKey_altKey3",
    {
      widgetElement: "agentx-wc-navigation",
      group: "Navigation",
      action: "Open Webex Experience Manager Metrics",
      modifierKeys: "ctrlKey_altKey",
      key: "3"
    }
  ]
];
Default Shortcut Keys

Logs the default shortcut keys.

Example

console.log(Desktop.shortcutKey.DEFAULT_SHORTCUT_KEYS);

Returns{Array} The array of objects.

Example Response

const DEFAULT_SHORTCUT_KEYS = {
  agentState: [
    {
      widgetElement: "agentx-react-state-selector",
      group: "Agent State",
      action: "Go to Available State",
      modifierKeys: "ctrlKey_altKey",
      key: "r"
    },
    {
      widgetElement: "agentx-react-state-selector",
      group: "Agent State",
      action: "Go to Idle State",
      modifierKeys: "ctrlKey_altKey",
      key: "n"
    }
  ],
  emailComposer: [
    {
      widgetElement: "agentx-react-email-composer",
      group: "Email Handling",
      action: "Send Email",
      modifierKeys: "ctrlKey_altKey",
      key: "s"
    },
    {
      widgetElement: "agentx-react-email-composer",
      group: "Email Handling",
      action: "Reply",
      modifierKeys: "ctrlKey_shiftKey",
      key: "6"
    },
    {
      widgetElement: "agentx-react-email-composer",
      group: "Email Handling",
      action: "Reply All",
      modifierKeys: "ctrlKey_shiftKey",
      key: "5"
    }
  ],
  outDial: [
    {
      widgetElement: "agentx-react-out-dial",
      group: "Outbound",
      action: "Open Outbound call",
      modifierKeys: "ctrlKey_altKey",
      key: "o"
    }
  ],
  notification: [
    {
      widgetElement: "wagentx-wc-menu-notification",
      group: "Notification",
      action: "Open Notification Center",
      modifierKeys: "ctrlKey_altKey",
      key: "i"
    },
    {
      widgetElement: "wagentx-wc-menu-notification",
      group: "Notification",
      action: "Enable Silent Notifications",
      modifierKeys: "ctrlKey_altKey",
      key: "d"
    }
  ],
  interactionPopover: [
    {
      widgetElement: "agentx-react-interaction-control",
      group: "Application",
      action: "Accept Chat/Email/Social",
      modifierKeys: "ctrlKey_altKey",
      key: "a"
    },
    {
      widgetElement: "agentx-react-interaction-control",
      group: "Application",
      action: "Switch between Popovers",
      modifierKeys: "ctrlKey_altKey",
      key: "p"
    },
    {
      widgetElement: "agentx-react-interaction-control",
      group: "Application",
      action: "Expand/Collapse the Popover",
      modifierKeys: "ctrlKey_shiftKey",
      key: "9"
    },
    {
      widgetElement: "agentx-react-interaction-control",
      group: "Application",
      action: "Accept all (visible) Popovers",
      modifierKeys: "ctrlKey_shiftKey",
      key: "4"
    }
  ],
  interactionControl: [
    {
      widgetElement: "agentx-react-interaction-control",
      group: "Interaction Control",
      action: "Hold/Resume Call",
      modifierKeys: "ctrlKey_altKey",
      key: "v"
    },
    {
      widgetElement: "agentx-react-interaction-control",
      group: "Interaction Control",
      action: "Pause/Resume Recording",
      modifierKeys: "ctrlKey_shiftKey",
      key: "z"
    },
    {
      widgetElement: "agentx-react-interaction-control",
      group: "Interaction Control",
      action: "Conference Request for Call/Chat",
      modifierKeys: "ctrlKey_altKey",
      key: "h"
    },
    {
      widgetElement: "agentx-react-interaction-control",
      group: "Interaction Control",
      action: "Consult Request for Call",
      modifierKeys: "ctrlKey_altKey",
      key: "c"
    },
    {
      widgetElement: "agentx-react-interaction-control",
      group: "Interaction Control",
      action: "End for All Channels",
      modifierKeys: "ctrlKey_altKey",
      key: "e"
    },
    {
      widgetElement: "agentx-react-interaction-control",
      group: "Interaction Control",
      action: "Transfer Request for All Channels",
      modifierKeys: "ctrlKey_altKey",
      key: "x"
    },
    {
      widgetElement: "agentx-react-interaction-control",
      group: "Interaction Control",
      action: "Save Edited CAD Variable Values",
      modifierKeys: "ctrlKey_altKey",
      key: "m"
    },
    {
      widgetElement: "agentx-react-interaction-control",
      group: "Interaction Control",
      action: "Revert Edited CAD Variable Values",
      modifierKeys: "ctrlKey_altKey",
      key: "z"
    },
    {
      widgetElement: "agentx-react-interaction-control",
      group: "Interaction Control",
      action: "Expand/Collapse",
      modifierKeys: "ctrlKey_shiftKey",
      key: "y"
    },
    {
      widgetElement: "agentx-react-interaction-control",
      group: "Interaction Control",
      action: "Wrap Up Reason",
      modifierKeys: "ctrlKey_altKey",
      key: "w"
    }
  ],
  userProfile: [
    {
      widgetElement: "agentx-react-agent-profile",
      group: "User Profile",
      action: "Open User Profile",
      modifierKeys: "ctrlKey_altKey",
      key: "u"
    },
    {
      widgetElement: "agentx-react-agent-profile",
      group: "User Profile",
      action: "Sign Out",
      modifierKeys: "ctrlKey_altKey",
      key: "l"
    },
    {
      widgetElement: "agentx-react-agent-profile",
      group: "User Profile",
      action: "Open Keyboard Shortcuts List",
      modifierKeys: "ctrlKey_altKey",
      key: "f"
    },
    {
      widgetElement: "agentx-react-agent-profile",
      group: "User Profile",
      action: "Download Error Report",
      modifierKeys: "ctrlKey_shiftKey",
      key: "2"
    }
  ],
  taskList: [
    {
      widgetElement: "agentx-wc-task-list",
      group: "Task List",
      action: "Switch between active tasks",
      modifierKeys: "ctrlKey_shiftKey",
      key: "8"
    },
    {
      widgetElement: "agentx-wc-task-list",
      group: "Task List",
      action: "Expand/Collapse the Task Panel",
      modifierKeys: "ctrlKey_shiftKey",
      key: "7"
    }
  ],
  connectorView: [
    {
      widgetElement: "agentx-wc-connector",
      group: "Connector View",
      action: "Open Navigation Tab",
      modifierKeys: "ctrlKey_altKey",
      key: "t"
    },
    {
      widgetElement: "agentx-wc-connector",
      group: "Connector View",
      action: "Refresh",
      modifierKeys: "ctrlKey_altKey",
      key: "b"
    }
  ]
};
Modifiers

Logs the shortcut key modifier. A modifier shortcut key is Shift, Ctrl, Alt, or a combination of these keys.

Example

console.log(Desktop.shortcutKey.MODIFIERS);

Returns{Object} The object response.

Example Response

const MODIFIERS = {
  CTRL_SHIFT: "ctrlKey_shiftKey",
  ALT_SHIFT: "altKey_shiftKey",
  CTRL_ALT: "ctrlKey_altKey",
  SHIFT: "shiftKey",
  CTRL: "ctrlKey",
  ALT: "altKey"
};
Registered Keys

Logs registered shortcut keys without the modifiers.

Example

console.log(Desktop.shortcutKey.REGISTERED_KEYS);

Returns{Object} The object response.

Example Response

const REGISTERED_KEYS = {
  EXPAND_COLLAPSE_INTERACTION_PANEL_KEY: "y",
  SAVE_EDITED_CAD_KEY: "m",
  REVERT_EDITED_CAD_KEY: "z",
  HOLD_RESUME_CALL_KEY: "v",
  TRANSFER_KEY: "x",
  CONSULT_KEY: "c",
  END_KEY: "e",
  CONFERENCE_KEY: "h",
  PAUSE_RESUME_RECORDING_KEY: "z",
  GO_TO_AVAILABLE_KEY: "r",
  OPEN_STATE_SELECTOR_KEY: "n",
  SEND_EMAIL_KEY: "s",
  REPLY_EMAIL_KEY: "6",
  REPLY_ALL_EMAIL_KEY: "5",
  OPEN_USER_PROFILE_KEY: "u",
  ENABLE_SILENT_NOTIFICATION_KEY: "d",
  OPEN_SHORTCUT_KEY_MODAL_KEY: "f",
  DOWNLOAD_ERROR_REPORT_KEY: "2",
  SIGNOUT_KEY: "l",
  ACCEPT_TASK_KEY: "a",
  SWITCH_POPOVER_KEY: "p",
  EXPAND_COLLAPSE_POPOVER_KEY: "9",
  OPEN_OUTDIAL_KEY: "o",
  OPEN_WRAP_UP_KEY: "w",
  EXPAND_COLLAPSE_TASK_LIST_PANEL_KEY: "7",
  OPEN_NOTIFICATION_CENTER_KEY: "i",
  OPEN_NAVIGATION_TAB_KEY: "t",
  REFRESH_KEY: "b",
  SWITCH_TASK_KEY: "8",
  ACCEPT_ALL_TASK_KEY: "4"
};
unregisterKeys()

Unregisters the shortcut keys.

Example

Desktop.shortcutKey.unregisterKeys([
  {
    widgetElement: "custom-element",
    group: "custom widget",
    action: "login",
    modifierKeys: "ctrlKey_altKey",
    key: "r"
  },
  {
    widgetElement: "custom-element",
    group: "custom widget",
    action: "logout",
    modifierKeys: "ctrlKey_altKey",
    key: "n"
  }
]);
listenKeyPress(event)

Listens to shortcut key press.

Example

Desktop.shortcutKey.listenKeyPress((event) => {
  console.log("JSSDK ShortcutKey listenKeyPress: ", event);
});

Parameters

NameTypeDescriptionRequired
eventObjectThe event occurs when a keyboard key is released.Yes

Returns{Object} The object response.

Example Response

{
  "type": "execute",
  "data": {
    "widgetElement": "agentx-react-agent-profile",
    "group": "User Profile",
    "action": "Open Keyboard Shortcuts List",
    "modifierKeys": "ctrlKey_altKey",
    "key": "f",
    "keyCombination": "Ctrl + Alt + F"
  },
  "keyboardEvent": {
    "isTrusted": true
  }
}
listenKeyConflict(event)

Listens to shortcut key conflicts.

Example

Desktop.shortcutKey.listenKeyConflict((event => {
            console.log("JSSDK ShortcutKey listenKeyPress: ", event);
        });

Parameters

NameTypeDescriptionRequired
eventObjectThe event occurs when a keyboard key is released.Yes

Returns{Object} The object response.

Example Response

{
    "type": "conflict",
    "data": {
        "widgetElement": "agentx-react-agent-profile",
        "group": "User Profile",
        "action": "Open Keyboard Shortcuts List",
        "modifierKeys": "ctrlKey_altKey",
        "key": "f",
        "isConflict": true
    }
}
listenConflictResolved()

Listens to shortcut key conflict resolved status.

Example

Desktop.shortcutKey.listenConflictResolved(() => {});
Call Monitoring Module

Call monitoring enables supervisors to monitor agents who are engaged in active calls with customers.

Start Monitoring

The Desktop.monitoring.startMonitoring request monitors the calls received by an agent.

Example

  Desktop.monitoring.startMonitoring({
      id: "62e5ffa9-7d80-40d7-bfbc-94cab8d5f67b", // 16 DIGIT unique id
      monitorType: String, // adhoc, continuous, midcall
      trackingId: "62e5ffa9-7d80-40d7-bfbc-94cab8d5f67b", // string
      taskId: "d6583397-d7ab-4dcb-b761-6cc925ad11d4" // string – nothing but interaction id
    });

Parameters

NameTypeDescriptionRequired
IdStringUnique identifier for the monitoring request.Yes
monitorTypeStringIndicates the monitoring type-

Adhoc, Continuous, or Midcall. | Yes | | taskId | String | Unique identifier for the task. | Yes | | trackingId | String | Unique identifier for the monitoring request that maps success and failure events. | Yes |

Start Monitoring Success

After initiating the startMonitoring request, the listener listens to the eMonitoringOffered event when the call monitoring is successful.

Example

  Desktop.monitoring.addEventListener("eMonitoringOffered", (msg: any) =>
      console.log("Monitoring eMonitoringOffered: ", msg)
);

Example Response

{
  "data": {
    "orgId": "f2ed32bd-19aa-4da0-8bee-e413d1799f4c",
    "id": "faedfcc8-035a-41e3-ad53-ee9fad4ca286",
    "monitorType": "adhoc",
    "supervisorId": "ae3dfcc8-035a-41e3-ad53-ee9fad4ca286",
    "queueId": "AXk4lbZds49yBk2m_M0b",
    "queueName": "Some Queue",
    "supervisorDN": "+14085550001",
    "taskId": "eeed32bd-19aa-4da0-8bee-e413d1799f4c",
    "task":{
       "callAssociatedData":{
          "DispositionCode":{
             "agentEditable":true,
             "displayName":"Disposition Code",
             "name":"DispositionCode",
             "type":"STRING",
             "value":"Please Enter Disposition"
          },
          "Some_Site":{
             "agentEditable":false,
             "displayName":"Location Called",
             "name":"Some_Site",
             "type":"STRING",
             "value":"Some Services"
          },
          "ani":{
             "agentEditable":false,
             "displayName":"ani",
                    "name":"ani",
             "type":"STRING",
             "value":"**********"
          },
          "dn":{
             "agentEditable":false,
             "displayName":"dn",
             "name":"dn",
             "type":"STRING",
             "value":"**********"
          },
          "ronaTimeout":{
             "agentEditable":false,
             "displayName":"ronaTimeout",
             "name":"ronaTimeout",
             "type":"STRING",
             "value":"18"
          },
          "virtualTeamName":{
             "agentEditable":false,
             "displayName":"virtualTeamName",
             "name":"virtualTeamName",
             "type":"STRING",
             "value":"Sample Marketing LAA"
          }
       },
       "callAssociatedDetails":{
          "ani":"+191****1028",
          "dn":"+191****2118",
          "ronaTimeout":"18",
          "virtualTeamName":"Some Marketing"
       },
       "callFlowParams":{

       },
       "callProcessingDetails":{
          "CONTINUE_RECORDING_ON_TRANSFER":"true",
          "EP_ID":"AXjrWErNWmiYcFh7QDSQ",
          "QMgrName":"aqm",
          "QueueId":"AXk4lbZds49y881m_M0b",
          "ani":"+191****1028",
          "dnis":"+191****2118",
          "fceRegisteredEvents":"",
          "isParked":"false",
          "mohFileName":"defaultmusic_on_hold.wav",
          "pauseDuration":"0",
          "pauseResumeEnabled":"false",
          "priority":"10",
          "recordInProgress":"true",
          "recordingStarted":"true",
          "ronaTimeout":"18",
          "routingStrategyId":"AXjv16JJJ3z7afsera2j",
          "taskToBeSelfServiced":"false",
          "tenantId":"285",
          "virtualTeamName":"Some Marketing",
          "vteamId":"AXk4lbZds49y771m_M0b",
          "workflowId":"607eee3242312e179b59e02b",
          "workflowName":"Sample work flow"
       },
       "contactDirection":{
          "type":"INBOUND"
       },
       "currentVTeam":"AXk4lbZds49yBk2m_M0b",
       "interactionId":"761c2d42-5b40-4dd4-a888-ae7c82f9ae94",
       "isFcManaged":true,
       "isTerminated":false,
       "media":{
          "761c2d42-5b40-4fd4-a888-aeff82f9ae94":{
             "holdTimestamp":null,
             "isHold":false,
             "mType":"mainCall",
             "mediaMgr":"vmm",
             "mediaResourceId":"761c2ff2-5b40-4fd4-a888-ae7c82f9ae94",
             "mediaType":"telephony",
             "participants":[
                "**********",
                "17eb03c9-2eae-4ce0-822b-cfff4b30239a"
             ]
          }
       },
       "mediaChannel":"broadcloud",
       "mediaType":"telephony",
       "orgId":"5b02f5ac-b2a3-4219-8a66-ca1cff83bd17",
       "outboundType":null,
       "owner":"17eb03c9-2eae-4ce0-822b-cfd1ff30239a",
       "participants":{
          "**********":{
             "id":"**********",
             "pType":"Customer",
             "type":"Customer"
          },
          "17eb03c9-2eae-4ce0-822b-cfd14bff239a":{
             "channelId":"fd8d3fee-0b75-4fff-b1c3-eceb2f1d9f98",
             "consultState":null,
             "consultTimestamp":null,
             "dn":"916***8420",
             "hasJoined":true,
             "id":"17eff3c9-2eae-4ce0-822b-cfd14b30239a",
             "isConsulted":false,
             "isWrapUp":false,
             "joinTimestamp":1238879263354,
             "lastUpdated":1624379263354,
             "name":"First Last Name",
             "pType":"Agent",
             "queueId":"AXk4lbZds4ddBk1m_M0b",
             "queueMgrId":"aqm",
             "sessionId":"d2d52b14-dd1e-4796-befc-288003425977",
             "siteId":"526",
             "teamId":"9336",
             "teamName":"Marketing",
             "type":"Agent",
             "wrapUpTimestamp":null
          }
       },
       "previousVTeams":[
          "AXjrWErNWmiYcDh7QQCQ"
       ],
       "queuedTimestamp":null,
       "state":"connected",
       "workflowManager":null
    },
    "trackingId": "46187830-fdd4-11eb-af48-410293f4b9ad",
    "type": "MonitoringOffered",
    "eventType": "SupervisorDesktopMessage"
  },
  "orgId": "f2ed32bd-19aa-4da0-8bee-e413d1799f4c",
  "trackingId": "notifs_e221605d-7806-4530-9e02-999cd5aae06a",
  "type": "MonitoringRequest"
}
Start Monitoring Create Failed

If the start monitoring request fails, the listener listens to the eMonitoringRequestCreateFailed event.

Example

  Desktop.monitoring.addEventListener("eMonitoringRequestCreateFailed", (msg: any) =>
      console.log("Monitoring eMonitoringRequestCreateFailed: ", msg)
    );

Example Response

{
  "data": {
    "orgId": "f2ed32bd-19aa-4da0-8bee-e413d1799f4c",
    "id": "faedfcc8-035a-41e3-ad53-ee9fad4ca286",
    "monitorType": "adhoc",
    "supervisorId": "ae3dfcc8-035a-41e3-ad53-ee9fad4ca286",
    "queueId": ["AXk4lbZds49yBk2m_M0b", "AXk4lbZ23449yBk2m_M0b"],
    "teams": ["All"],
    "sites": ["All"],
    "agents": ["All"],
    "isActive": true,
    "taskId": null,
    "reason": "Supervisor already have a matching monitoring request",
    "reasonCode": 12345,
    "trackingId": "46187830-fdd4-11eb-af48-410293f4b9ad",
    "type": "MonitoringRequestCreateFailed",
    "eventType": "SupervisorDesktopMessage"
  },
  "orgId": "f2ed32bd-19aa-4da0-8bee-e413d1799f4c",
  "trackingId": "notifs_e221605d-7806-4530-9e02-999cd5aae06a",
  "type": "MonitoringRequest"
}
Start Monitoring Call Offer Event to Supervisor

If the supervisor accepts a call on a physical device, the listener listens to the eMonitoringStarted event.

Example

  Desktop.monitoring.addEventListener("eMonitoringStarted", (msg: any) =>
      console.log("Monitoring eMonitoringStarted: ", msg)
    );

Example Response

{
  "data": {
    "orgId": "f2ed32bd-19aa-4da0-8bee-e413d1799f4c",
    "id": "faedfcc8-035a-41e3-ad53-ee9fad4ca286",
    "monitorType": "midcall",
    "supervisorId": "ae3dfcc8-035a-41e3-ad53-ee9fad4ca286",
    "queueId": "AXk4lbZds49yBk2m_M0b",
    "queueName": "Some Queue",
    "supervisorDN": "+14085550001",
    "taskId": "eeed32bd-19aa-4da0-8bee-e413d1799f4c",
    "task":{
       "callAssociatedData":{
          "DispositionCode":{
             "agentEditable":true,
             "displayName":"Disposition Code",
             "name":"DispositionCode",
             "type":"STRING",
             "value":"Please Enter Disposition"
          },
          "Some_Site":{
             "agentEditable":false,
             "displayName":"Location Called",
             "name":"Some_Site",
             "type":"STRING",
             "value":"Some Services"
          },
          "ani":{
             "agentEditable":false,
             "displayName":"ani",
             "name":"ani",
             "type":"STRING",
             "value":"**********"
          },
          "dn":{
             "agentEditable":false,
             "displayName":"dn",
             "name":"dn",
             "type":"STRING",
             "value":"**********"
          },
          "ronaTimeout":{
             "agentEditable":false,
             "displayName":"ronaTimeout",
             "name":"ronaTimeout",
             "type":"STRING",
             "value":"18"
          },
          "virtualTeamName":{
             "agentEditable":false,
             "displayName":"virtualTeamName",
             "name":"virtualTeamName",
             "type":"STRING",
             "value":"Sample Marketing LAA"
          }
       },
       "callAssociatedDetails":{
          "ani":"+191****1028",
          "dn":"+191****2118",
          "ronaTimeout":"18",
          "virtualTeamName":"Some Marketing"
       },
       "callFlowParams":{

       },
       "callProcessingDetails":{
          "CONTINUE_RECORDING_ON_TRANSFER":"true",
          "EP_ID":"AXjrWErNWmiYcFh7QDSQ",
          "QMgrName":"aqm",
          "QueueId":"AXk4lbZds49y881m_M0b",
          "ani":"+191****1028",
          "dnis":"+191****2118",
          "fceRegisteredEvents":"",
          "isParked":"false",
          "mohFileName":"defaultmusic_on_hold.wav",
          "pauseDuration":"0",
          "pauseResumeEnabled":"false",
          "priority":"10",
          "recordInProgress":"true",
          "recordingStarted":"true",
          "ronaTimeout":"18",
          "routingStrategyId":"AXjv16JJJ3z7afsera2j",
          "taskToBeSelfServiced":"false",
          "tenantId":"285",
          "virtualTeamName":"Some Marketing",
          "vteamId":"AXk4lbZds49y771m_M0b",
          "workflowId":"607eee3242312e179b59e02b",
          "workflowName":"Sample work flow"
       },
       "contactDirection":{
          "type":"INBOUND"
       },
       "currentVTeam":"AXk4lbZds49yBk2m_M0b",
       "interactionId":"761c2d42-5b40-4dd4-a888-ae7c82f9ae94",
       "isFcManaged":true,
       "isTerminated":false,
       "media":{
          "761c2d42-5b40-4fd4-a888-aeff82f9ae94":{
             "holdTimestamp":null,
             "isHold":false,
             "mType":"mainCall",
             "mediaMgr":"vmm",
             "mediaResourceId":"761c2ff2-5b40-4fd4-a888-ae7c82f9ae94",
             "mediaType":"telephony",
             "participants":[
                "**********",
                "17eb03c9-2eae-4ce0-822b-cfff4b30239a"
             ]
          }
       },
       "mediaChannel":"broadcloud",
       "mediaType":"telephony",
       "orgId":"5b02f5ac-b2a3-4219-8a66-ca1cff83bd17",
       "outboundType":null,
       "owner":"17eb03c9-2eae-4ce0-822b-cfd1ff30239a",
       "participants":{
          "**********":{
             "id":"**********",
             "pType":"Customer",
             "type":"Customer"
          },
          "17eb03c9-2eae-4ce0-822b-cfd14bff239a":{
             "channelId":"fd8d3fee-0b75-4fff-b1c3-eceb2f1d9f98",
             "consultState":null,
             "consultTimestamp":null,
             "dn":"916***8420",
             "hasJoined":true,
             "id":"17eff3c9-2eae-4ce0-822b-cfd14b30239a",
             "isConsulted":false,
             "isWrapUp":false,
             "joinTimestamp":1238879263354,
             "lastUpdated":1624379263354,
             "name":"First Last Name",
             "pType":"Agent",
             "queueId":"AXk4lbZds4ddBk1m_M0b",
             "queueMgrId":"aqm",
             "sessionId":"d2d52b14-dd1e-4796-befc-288003425977",
             "siteId":"526",
             "teamId":"9336",
             "teamName":"Marketing",
             "type":"Agent",
             "wrapUpTimestamp":null
          }
       },
       "previousVTeams":[
          "AXjrWErNWmiYcDh7QQCQ"
       ],
       "queuedTimestamp":null,
       "state":"connected",
       "workflowManager":null
    },
    "trackingId": "46187830-fdd4-11eb-af48-410293f4b9ad",
    "type": "MonitoringOffered",
    "eventType": "SupervisorDesktopMessage"
  },
  "orgId": "f2ed32bd-19aa-4da0-8bee-e413d1799f4c",
  "trackingId": "notifs_e221605d-7806-4530-9e02-999cd5aae06a",
  "type": "MonitoringRequest"
}
Start Monitoring Call Failed

If call monitoring fails due to any reason, the listener listens to the eMonitoringFailed event.

Example

    Desktop.monitoring.addEventListener("eMonitoringFailed", (msg: any) =>
      console.log("Monitoring eMonitoringFailed: ", msg)
    );

Example Response

{
  "data": {
    "orgId": "f2ed32bd-19aa-4da0-8bee-e413d1799f4c",
    "id": "faedfcc8-035a-41e3-ad53-ee9fad4ca286",
    "monitorType": "midcall",
    "supervisorId": "ae3dfcc8-035a-41e3-ad53-ee9fad4ca286",
    "queueId": "AXk4lbZds49yBk2m_M0b",
    "queueName": "Some Queue",
    "supervisorDN": "+14085550001",
    "taskId": "eeed32bd-19aa-4da0-8bee-e413d1799f4c",
    "reason": "Supervisor (```Supervisor full name```) device is unresponsive",
    "reasonCode": 987562,
    "trackingId": "46187830-fdd4-11eb-af48-410293f4b9ad",
    "type": "MonitoringFailed",
    "eventType": "SupervisorDesktopMessage"
  },
  "orgId": "f2ed32bd-19aa-4da0-8bee-e413d1799f4c",
  "trackingId": "notifs_e221605d-7806-4530-9e02-999cd5aae06a",
  "type": "MonitoringRequest"
}
Pause Monitoring

The Desktop.monitoring.holdMonitoring request pauses the call monitoring requests.

Example

await Desktop.monitoring.holdMonitoring({ interactionId: "d6583397-d7ab-4dcb-b761-6cc925ad11d4" });

Parameters

NameTypeDescriptionRequired
interactionIdStringUnique identifier of the interaction.Yes
Pause Monitoring Success Event

After initiating the pause monitoring request to Asynchronous Queue Manager(AQM), the listener listens to the eMonitoringHeld events.

Example

  Desktop.monitoring.addEventListener("eMonitoringHeld", (msg: any) =>
      console.log("Monitoring eMonitoringHeld: ", msg)
    );

Example Response

{
"data": {
"orgId": "f2ed32bd-19aa-4da0-8bee-e413d1799f4c",
 "id": "faedfcc8-035a-41e3-ad53-ee9fad4ca286",
 "monitorType": "midcall",
 "supervisorId": "ae3dfcc8-035a-41e3-ad53-ee9fad4ca286",
 "taskId": "eeed32bd-19aa-4da0-8bee-e413d1799f4c",
 "agentId": "ffddfcc8-035a-41e3-ad53-ee9fad4ca286",
 "trackingId": "46187830-fdd4-11eb-af48-410293f4b9ad",
 "type": "MonitoringHold",
 "eventType": "SupervisorDesktopMessage"
 },
 "orgId": "f2ed32bd-19aa-4da0-8bee-e413d1799f4c",
 "trackingId": "notifs_e221605d-7806-4530-9e02-999cd5aae06a",
 "type": "MonitoringRequest"
}
Pause Monitoring Failed Event

If the system fails to create the Contact Monitoring Hold request, the eMonitoringHoldFailed payload is delivered asynchronously.

Example

  Desktop.monitoring.addEventListener("eMonitoringHoldFailed", (msg: any) =>
      console.log("Monitoring eMonitoringHoldFailed: ", msg)
    );

Example Response

{
"data": {
"orgId": "f2ed32bd-19aa-4da0-8bee-e413d1799f4c",
 "id": "faedfcc8-035a-41e3-ad53-ee9fad4ca286",
 "monitorType": "midcall",
 "supervisorId": "ae3dfcc8-035a-41e3-ad53-ee9fad4ca286",
 "taskId": "eeed32bd-19aa-4da0-8bee-e413d1799f4c",
 "agentId": "ffddfcc8-035a-41e3-ad53-ee9fad4ca286",
 "reason": "Media leg failure",
 "reasonCode": 95367,
 "trackingId": "46187830-fdd4-11eb-af48-410293f4b9ad",
 "type": "MonitoringHoldFailed",
 "eventType": "SupervisorDesktopMessage"
 },
 "orgId": "f2ed32bd-19aa-4da0-8bee-e413d1799f4c",
 "trackingId": "notifs_e221605d-7806-4530-9e02-999cd5aae06a",
 "type": "MonitoringRequest"
}
Resume Monitoring

The Desktop.monitoring.unHoldMonitoring request resumes call monitoring that was paused earlier.

Example

await Desktop.monitoring.unHoldMonitoring ({ interactionId: "d6583397-d7ab-4dcb-b761-6cc925ad11d4" });

Parameters

NameTypeDescriptionRequired
interactionIdStringUnique identifier of the interaction.Yes
Resume Monitoring Success Event

After initiating the pause monitoring request to AQM, the listener listens to the eMonitoringUnHeld events.

Example

Desktop.monitoring.addEventListener("eMonitoringUnHeld", (msg: any) =>
      console.log("Monitoring eMonitoringUnHeld: ", msg)
    );

Example Response

{
"data": {
"orgId": "f2ed32bd-19aa-4da0-8bee-e413d1799f4c",
 "id": "faedfcc8-035a-41e3-ad53-ee9fad4ca286",
 "monitorType": "midcall",
 "supervisorId": "ae3dfcc8-035a-41e3-ad53-ee9fad4ca286",
 "taskId": "eeed32bd-19aa-4da0-8bee-e413d1799f4c",
 "agentId": "ffddfcc8-035a-41e3-ad53-ee9fad4ca286",
 "trackingId": "46187830-fdd4-11eb-af48-410293f4b9ad",
 "type": "MonitoringHold",
 "eventType": "SupervisorDesktopMessage"
 },
 "orgId": "f2ed32bd-19aa-4da0-8bee-e413d1799f4c",
 "trackingId": "notifs_e221605d-7806-4530-9e02-999cd5aae06a",
 "type": "MonitoringRequest"
}
Resume Monitoring Failed Event

If the system fails to create the Contact Monitoring Hold request, the eMonitoringUnHoldFailed payload is delivered asynchronously.

Example

  Desktop.monitoring.addEventListener("eMonitoringUnHoldFailed", (msg: any) =>
      console.log("Monitoring eMonitoringUnHoldFailed: ", msg)
    );

Example Response

{
"data": {
"orgId": "f2ed32bd-19aa-4da0-8bee-e413d1799f4c",
 "id": "faedfcc8-035a-41e3-ad53-ee9fad4ca286",
 "monitorType": "midcall",
 "supervisorId": "ae3dfcc8-035a-41e3-ad53-ee9fad4ca286",
 "taskId": "eeed32bd-19aa-4da0-8bee-e413d1799f4c",
 "agentId": "ffddfcc8-035a-41e3-ad53-ee9fad4ca286",
 "reason": "Media leg failure",
 "reasonCode": 95367,
 "trackingId": "46187830-fdd4-11eb-af48-410293f4b9ad",
 "type": "MonitoringHoldFailed",
 "eventType": "SupervisorDesktopMessage"
 },
 "orgId": "f2ed32bd-19aa-4da0-8bee-e413d1799f4c",
 "trackingId": "notifs_e221605d-7806-4530-9e02-999cd5aae06a",
 "type": "MonitoringRequest"
}
End Monitoring

The Desktop.monitoring.endMonitoring request ends active call monitoring requests.

Example

await Desktop.monitoring.endMonitoring ({ interactionId: "d6583397-d7ab-4dcb-b761-6cc925ad11d4" });

Parameters

NameTypeDescriptionRequired
interactionIdStringUnique identifier of the interaction.Yes
End Monitoring Success Event

After initiating the pause monitoring request to AQM, the listener listens to the eMonitoringEnded event.

Example

  Desktop.monitoring.addEventListener("eMonitoringEnded ", (msg: any) =>
      console.log("Monitoring eMonitoringEnded: ", msg)
    );

Example Response

{
  "data": {
    "orgId": "f2ed32bd-19aa-4da0-8bee-e413d1799f4c",
    "id": "faedfcc8-035a-41e3-ad53-ee9fad4ca286",
    "monitorType": "midcall",
    "supervisorId": "ae3dfcc8-035a-41e3-ad53-ee9fad4ca286",
    "taskId": "eeed32bd-19aa-4da0-8bee-e413d1799f4c",
    "agentId": "ffddfcc8-035a-41e3-ad53-ee9fad4ca286",
    "trackingId": "46187830-fdd4-11eb-af48-410293f4b9ad",
    "type": "MonitoringEnded",
    "eventType": "SupervisorDesktopMessage"
  },
  "orgId": "f2ed32bd-19aa-4da0-8bee-e413d1799f4c",
  "trackingId": "notifs_e221605d-7806-4530-9e02-999cd5aae06a",
  "type": "MonitoringRequest"
}
End Monitoring Failed Event

If End Monitoring fails, the eMonitoringEndFailed payload is delivered asynchronously.

Example

  Desktop.monitoring.addEventListener("eMonitoringEndFailed ", (msg: any) =>
      console.log("Monitoring eMonitoringEndFailed: ", msg)
    );

Example Response

{
  "data": {
    "orgId": "f2ed32bd-19aa-4da0-8bee-e413d1799f4c",
    "id": "faedfcc8-035a-41e3-ad53-ee9fad4ca286",
    "monitorType": "midcall",
    "supervisorId": "ae3dfcc8-035a-41e3-ad53-ee9fad4ca286",
    "taskId": "eeed32bd-19aa-4da0-8bee-e413d1799f4c",
    "agentId": "ffddfcc8-035a-41e3-ad53-ee9fad4ca286",
    "reason": "Media leg failure",
    "reasonCode": 95367,
    "trackingId": "46187830-fdd4-11eb-af48-410293f4b9ad",
    "type": "MonitoringEndFailed",
    "eventType": "SupervisorDesktopMessage"
  },
  "orgId": "f2ed32bd-19aa-4da0-8bee-e413d1799f4c",
  "trackingId": "notifs_e221605d-7806-4530-9e02-999cd5aae06a",
  "type": "MonitoringRequest"
}
Barge In

The Desktop.monitoring.bargeIn request allows a supervisor to barge into an ongoing call between an agent and a customer, that is already being monitored.

Example

await Desktop.monitoring.bargeIn ({ interactionId: "d6583397-d7ab-4dcb-b761-6cc925ad11d4" });

Parameters

NameTypeDescriptionRequired
interactionIdStringUnique identifier of the interaction.Yes
Barge In Success Event

After initiating the barge in request to AQM, the listener listens to the eAgentMonitorStateChanged event.

Example

  Desktop.monitoring.addEventListener("eAgentMonitorStateChanged ", (msg: any) =>
      console.log("Monitoring eMonitoringEnded: ", msg)
    );

Example Response

{
    "data": {
        "agentId": "6fc77132-5886-467f-b977-5b147770a7a7",
        "eventTime": 1693216938773,
        "eventType": "SupervisorDesktopMessage",
        "interactionId": "47ee78e5-a46c-446b-b607-8345d3f6c38d",
        "interaction":{},
        "monitoringState": {
            "type": "BargeIn"
        },
        "orgId": "c1040014-0ee0-4e9e-aaaf-e2bd54174760",
        "supervisorId": "075031e0-8013-4ae6-b59b-399a1b6ed19d",
        "supervisorName": "Intg Supervisor1",
        "trackingId": "f0d51000-17e1-4a38-a571-59e3b95ffa7e",
        "type": "AgentMonitorStateChanged"
    },
    "orgId": "c1040014-0ee0-4e9e-aaaf-e2bd54174760",
    "trackingId": "notifs_12a93135-7b69-4dd2-891c-df3096a5c437",
    "type": "AgentMonitorStateChanged"
}
Barge In Failed Event

If Barge In fails, the eAgentMonitorStateChangeFailed payload is delivered asynchronously.

Example

  Desktop.monitoring.addEventListener("eAgentMonitorStateChangeFailed ", (msg: any) =>
      console.log("Monitoring eAgentMonitorStateChangeFailed: ", msg)
    );

Example Response

{
  "data": {
        "agentId": "6fc77132-5886-467f-b977-5b147770a7a7",
        "eventTime": 1693216938773,
        "eventType": "SupervisorDesktopMessage",
        "interactionId": "47ee78e5-a46c-446b-b607-8345d3f6c38d",
        "monitoringState": {
            "type": "BargeIn"
        },
        "orgId": "c1040014-0ee0-4e9e-aaaf-e2bd54174760",
        "supervisorId": "075031e0-8013-4ae6-b59b-399a1b6ed19d",
        "reason": "Media leg failure",
        "reasonCode": 95367,
        "trackingId": "46187830-fdd4-11eb-af48-410293f4b9ad",
        "type": "AgentMonitorStateChangeFailed",
  },
  "orgId": "f2ed32bd-19aa-4da0-8bee-e413d1799f4c",
  "trackingId": "notifs_e221605d-7806-4530-9e02-999cd5aae06a",
  "type": "MonitoringRequest"
}
Webex Metrics Module

The Webex Metrics module is an internal module that is responsible for monitoring and measuring performance, usage, and behavioral data from widgets.

Methods
trackBehavioralEvent
Desktop.webexMetricsInternal.trackBehavioralEvent("Call Consult Clicked",  {
          Status: "Success",
          interactionId: "49bcf26b-ec75-4351-89fa-55d54682c20c",
          media_type: "telephony",
          Reason: "AgentConsultEnded"
        });

Parameters

NameTypeDescriptionRequired
namestringName of the event to be trackedYes
optionsEventPayloadAdditional data included in the event payloadNo

The trackBehavioralEvent function is used to log and track user interactions and behavioral events within widgits. It takes an event name and an optional options object as parameters.

anchorFinesse Gadget Migration

anchor
Migrate Finesse Embedded Web Application Gadgets

You can migrate a Finesse embedded web application gadget into a Webex Contact Center Desktop iFrame based widget.

Note: Conversion of a Finesse gadget depends on the web application configuration-whether it could be loaded in an iFrame or not.

Finesse—Embedded Web Application Sample Gadget

The embedded web application sample gadget displays a web page in an iFrame within the gadget. It is intended to serve as an example of placing an external web application in the Finesse gadget.

For more information on the embedded web application sample gadget, see https://github.com/CiscoDevNet/finesse-sample-code/tree/master/EmbeddedWebAppSampleGadget.

Webex Contact Center Desktop—agentx-wc-iframe

Desktop has the inbuilt functionality (Web Component) to load web applications in an iFrame. Using the component agentx-wc-iframe within the desktop layout, you can load web applications in the horizontal header, navigation bar, and auxiliary information pane.

For more information on Webex Contact Center Desktop widgets, see https://github.com/CiscoDevNet/webex-contact-center-widget-starter/tree/master/Examples.

The following are the Finesse embedded gadget files:

  • EmbeddedWebApp.css
  • EmbeddedWebApp.js
  • EmbeddedWebApp.xml

The EmbeddedWebApp.xml is the main file that contains the URL of the web application.

Before you begin

Understand the script type details from the Finesse embedded gadget file EmbeddedWebApp.xml.

<script type="text/javascript">
    // initialize the gadget running the init handler defined in EmbeddedWebApp.js
    gadgets.HubSettings.onConnect = function () {
        finesse.modules.EmbeddedWebAppGadget.init("https://www.bing.com");
    };
</script>

Understand the JSON layout format. For more information on JSON layout, see the Desktop Layout section in the Provisioning chapter of the Cisco Webex Contact Center Setup and Administration Guide.

Procedure

Step 1: Access the JSON layout file from the Webex Contact Center Management Portal.

Step 2: In the comp property tag, enter the component value as agentx-wc-iframe.

{
    "comp": "agentx-wc-iframe"
},

Step 3: In the src attributes property tag, enter the URL of the web application.

{
    "comp": "agentx-wc-iframe",
    "attributes": {
        "src": "https://www.bing.com"
},

Step 4: In the wrapper property tag, enter the title and the maximize area name.

{
    "comp": "agentx-wc-iframe",
    "attributes": {
        "src": "https://www.bing.com"
    },
    "wrapper": {
        "title": "AgentX iFrame",
        "maximizeAreaName": "app-maximize-area"
    },

Step 5: Use the style property tag to resize the iFrame.

Note: The iFrame within the Desktop supports native iFrame properties.

{
    "comp": "agentx-wc-iframe",
    "attributes": {
        "src": "https://www.bing.com"
    },
    "wrapper": {
        "title": "AgentX iFrame",
        "maximizeAreaName": "app-maximize-area"
    },
    "style": {
        "height": 504 px,
        "width": 520 px,
        "display": "inline-block",
        "align-items": "center"
    },

Step 6: Use the attributes property tag to add iFrame attributes.

{
    "comp": "agentx-wc-iframe",
    "attributes": {
        "src": "https://www.bing.com"
        "sandbox": "allow-scripts allow popups"
    },
    "wrapper": {
        "title": "AgentX iFrame",
        "maximizeAreaName": "app-maximize-area"
    },
    "style": {
        "height": 504 px,
        "width": 520 px,
        "display": "inline-block",
        "align-items": "center"
    },
Migrate JavaScript Based Finesse Gadgets

There is no straightforward migration from a Shindig based gadget to a wxcc-desktop based widget. As the Shindig gadget and the wxcc-desktop widget leverage technologies, you can refactor the existing source code to develop wxcc-desktop based widgets. Finesse gadgets are based on the Apache Shindig gadget specification. For more information on Apache Shindig, see https://shindig.apache.org/. You can use any JavaScript library, framework, or our vanilla JavaScript to build a UI based gadget. The final content must be embedded within the gadget XML or HTML.

Finesse Gadgets

Static Resources—Finesse gadgets consist of building blocks such as XML, HTML, CSS, JavaScript, and images. The gadgets are deployed in the Finesse 3rdpartygadget web application.

Elements—The following are the important elements of a gadget:

  • The <Module> tag indicates that the XML file contains a gadget which is a root level element.
  • The <ModulePrefs> tag contains information about the gadget. The tag includes the title, description, author, other optional features, and configuration related to the gadget from the Finesse desktop container.
  • The <Content type="html"> header tag indicates that the gadget's content type is HTML. The tag includes all markup content (HTML) and static resources that are embedded within the content element.

Example: Sample Gadget

<Module>
    <ModulePrefs title="X-Counter" description="X-Counter Example"></ModulePrefs>
    <Content type="html">
        <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"/>
        <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.29.1/moment.min.js"></script>
        <![CDATA[
    <style>
        button, p {
          display: inline-block;
        }
    </style><button aria-label="decrement">-</button><p>0</p><button aria-label="increment">+</button><script>
        var valueElement = document.querySelector('p');
        function increment() {
            const value = valueElement.innerText;
            valueElement.innerText = parseInt(value) + 1;
        }
        function decrement() {
            const value = valueElement.innerText;
            valueElement.innerText = parseInt(value) - 1;
        }
        var incrementButton = document.querySelectorAll('button')[1];
        var decrementButton = document.querySelectorAll('button')[0];

        incrementButton.addEventListener('click', e => increment);

        decrementButton.addEventListener('click', e => decrement);
    </script>
    ]]>
    </Content>
</Module>

For more information on Cisco Finesse gadgets, see https://developer.cisco.com/docs/finesse/#!finesse-overview/cisco-finesse-gadgets-finesse-javascript-library-api.

Webex Contact Center Desktop Widgets

Desktop widget is based on the micro-frontend approach that leverages the browser's native Web Component module.

Static Resources—Custom widgets must bundle all their static resources (CSS, JavaScript, markup, and images) in a single JavaScript file using a bundle library (for example, Webpack, Rollup, Parcel). The bundle must be hosted in a Content Delivery Network (CDN). Custom widgets can use any JavaScript framework to develop Web Components.

Shared Data from Desktop (for example, ModulePrefs)—Custom widgets can have shared data or configuration from Desktop as a Web Component property or attributes.

Note: Desktop shared data or configuration is different from Finesse gadget shared data or configuration. The developer must understand the relevant shared data or configuration that are available inwxcc-desktop. For more information, see Data Provider—Widget Properties and Attributes.

The JavaScript bundle must have the root element as Web Component, and the element name must be mentioned within the desktop layout configuration. Custom widgets can be developed using any web-based library or framework, for example, React, Angular, or Web Component. Custom widgets can also load additional static resources such as CSS, JavaScript, Markup, and images internally using Ajax or markup tags (script, link, img, and so on).

The following is an example of the sample Hello World widget without any bundling library (helloworld.js) and build using vanilla JavaScript. The widget name is <x-counter>.

Example: Sample Widget Without Any Bundling Library

const template = document.createElement("template");
template.innerHTML = `
  <style>
    button, p {
      display: inline-block;
    }
  </style>
  <button aria-label="decrement">-</button>
    <p>0</p>
  <button aria-label="increment">+</button>
`;

class XCounter extends HTMLElement {
  increment() {
    const value = this.valueElement.innerText;
    this.valueElement.innerText = parseInt(value) + 1;
  }
  decrement() {
    const value = valueElement.innerText;
    valueElement.innerText = parseInt(value) - 1;
  }
  constructor() {
    super();

    this.attachShadow({
      mode: "open"
    });
    this.shadowRoot.appendChild(template.content.cloneNode(true));

    this.valueElement = this.shadowRoot.querySelector("p");
    this.incrementButton = this.shadowRoot.querySelectorAll("button")[1];
    this.decrementButton = this.shadowRoot.querySelectorAll("button")[0];

    this.incrementButton.addEventListener("click", (e) => this.increment);

    this.decrementButton.addEventListener("click", (e) => this.decrement);
  }
}

customElements.define("x-counter", XCounter);
In This Article
  • Widgets and Activities
  • JavaScript SDK and Modules
  • Finesse Gadget Migration

Connect

Support

Developer Community

Developer Events

Contact Sales

Handy Links

Webex Ambassadors

Webex App Hub

Resources

Open Source Bot Starter Kits

Download Webex

DevNet Learning Labs

Terms of Service

Privacy Policy

Cookie Policy

Trademarks

© 2025 Cisco and/or its affiliates. All rights reserved.