Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion docs/samples/contact-center/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -700,6 +700,16 @@ async function initiateConsultTransfer() {
}
}

function toggleTransferOptions() {
const transferOptions = document.getElementById('transfer-options');
if (transferOptions.style.display === 'none') {
transferOptions.style.display = 'block';
onTransferTypeSelectionChanged(); // To load the default destination type view
} else {
transferOptions.style.display = 'none';
}
}

// Function to end consult
async function endConsult() {
const taskId = currentTask.data?.interactionId;
Expand Down Expand Up @@ -2306,4 +2316,3 @@ updateLoginOptionElm.addEventListener('change', updateApplyButtonState);
updateDialNumberElm.addEventListener('input', updateApplyButtonState);

updateApplyButtonState();

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@
"standard-version": "^9.1.1",
"terser-webpack-plugin": "^4.2.3",
"ts-jest": "^29.0.3",
"typescript": "^4.7.4",
"typescript": "^5.4.5",
"uuid": "^3.3.2",
"wd": "^1.14.0",
"wdio-chromedriver-service": "^7.3.2",
Expand Down
7 changes: 5 additions & 2 deletions packages/@webex/contact-center/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@
"@webex/plugin-logger": "workspace:*",
"@webex/webex-core": "workspace:*",
"jest-html-reporters": "3.0.11",
"lodash": "^4.17.21"
"lodash": "^4.17.21",
"uuid": "^3.3.2",
"xstate": "5.24.0"
},
"devDependencies": {
"@babel/core": "^7.22.11",
Expand All @@ -66,6 +68,7 @@
"@webex/jest-config-legacy": "workspace:*",
"@webex/legacy-tools": "workspace:*",
"@webex/test-helper-mock-webex": "workspace:*",
"@xstate/inspect": "^0.8.0",
"eslint": "^8.24.0",
"eslint-config-airbnb-base": "15.0.0",
"eslint-config-prettier": "8.3.0",
Expand All @@ -78,6 +81,6 @@
"jest-junit": "13.0.0",
"prettier": "2.5.1",
"typedoc": "^0.25.0",
"typescript": "4.9.5"
"typescript": "5.4.5"
}
}
8 changes: 4 additions & 4 deletions packages/@webex/contact-center/src/cc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ import {ITask, TASK_EVENTS, TaskResponse, DialerPayload} from './services/task/t
import MetricsManager from './metrics/MetricsManager';
import {METRIC_EVENT_NAMES} from './metrics/constants';
import {Failure} from './services/core/GlobalTypes';
import EntryPoint from './services/EntryPoint';
import AddressBook from './services/AddressBook';
import Queue from './services/Queue';
import {EntryPoint} from './services/EntryPoint';
import {AddressBook} from './services/AddressBook';
import {Queue} from './services/Queue';
import type {
EntryPointListResponse,
EntryPointSearchParams,
Expand Down Expand Up @@ -693,7 +693,7 @@ export default class ContactCenter extends WebexPlugin implements IContactCenter
const orgId = this.$webex.credentials.getOrgId();
this.agentConfig = await this.services.config.getAgentConfig(orgId, agentId);
const configFlags: ConfigFlags = {
isEndCallEnabled: this.agentConfig.isEndCallEnabled,
isEndTaskEnabled: this.agentConfig.isEndTaskEnabled,
isEndConsultEnabled: this.agentConfig.isEndConsultEnabled,
webRtcEnabled: this.agentConfig.webRtcEnabled,
autoWrapup: this.agentConfig.wrapUpData?.wrapUpProps?.autoWrapup ?? false,
Expand Down
11 changes: 11 additions & 0 deletions packages/@webex/contact-center/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,15 @@ export const METHODS = {
HANDLE_INCOMING_TASK: 'handleIncomingTask',
HANDLE_TASK_HYDRATE: 'handleTaskHydrate',
INCOMING_TASK_LISTENER: 'incomingTaskListener',
ACCEPT: 'accept',
REJECT: 'decline',
HOLD: 'hold',
RESUME: 'resume',
HOLD_RESUME: 'holdResume',
TRANSFER_CALL: 'transfer',
CONSULT_TRANSFER: 'consultTransfer',
CONSULT_CONFERENCE: 'consultConference',
EXIT_CONFERENCE: 'exitConference',
TRANSFER_CONFERENCE: 'transferConference',
TOGGLE_MUTE: 'toggleMute',
};
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ function parseAgentConfigs(profileData: {
isAgentAvailableAfterOutdial: agentProfileData.agentAvailableAfterOutdial,
outDialEp: agentProfileData.outdialEntryPointId,
isCampaignManagementEnabled: orgSettingsData.campaignManagerEnabled,
isEndCallEnabled: tenantData.endCallEnabled,
isEndTaskEnabled: tenantData.endCallEnabled,
isEndConsultEnabled: tenantData.endConsultEnabled,
callVariablesSuppressed: tenantData.callVariablesSuppressed,
agentDbId: userData.dbId,
Expand Down
112 changes: 102 additions & 10 deletions packages/@webex/contact-center/src/services/config/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ export const CC_TASK_EVENTS = {
AGENT_CONSULT_TRANSFER_FAILED: 'AgentConsultTransferFailed',
/** Event emitted when contact recording is paused */
CONTACT_RECORDING_PAUSED: 'ContactRecordingPaused',
/** Event emitted when contact recording is started */
CONTACT_RECORDING_STARTED: 'ContactRecordingStarted',
/** Event emitted when pausing contact recording fails */
CONTACT_RECORDING_PAUSE_FAILED: 'ContactRecordingPauseFailed',
/** Event emitted when contact recording is resumed */
Expand Down Expand Up @@ -177,6 +179,15 @@ export type WelcomeEvent = {
agentId: string;
};

/**
* Available login options for voice channel access
* 'AGENT_DN' - Login using agent's DN
* 'EXTENSION' - Login using extension number
* 'BROWSER' - Login using browser-based WebRTC
* @public
*/
export type LoginOption = 'AGENT_DN' | 'EXTENSION' | 'BROWSER';

/**
* Response type for welcome events which can be either success or error
* @public
Expand Down Expand Up @@ -275,6 +286,31 @@ export type AgentResponse = {
* Represents the response from getDesktopProfileById method.
*/
export type DesktopProfileResponse = {
/**
* Unique identifier of the agent profile configuration.
*/
id: string;

/**
* Display name for the agent profile.
*/
name: string;

/**
* Description of the agent profile.
*/
description: string;

/**
* Parent entity type for the profile (for example ORGANIZATION).
*/
parentType: string;

/**
* Indicates whether screen pop is enabled.
*/
screenPopup: boolean;

/**
* Represents the voice options of an agent.
*/
Expand Down Expand Up @@ -315,6 +351,11 @@ export type DesktopProfileResponse = {
*/
autoWrapUp: boolean;

/**
* Whether the agent personal greeting is enabled.
*/
agentPersonalGreeting: boolean;

/**
* Auto answer allowed.
*/
Expand All @@ -335,6 +376,36 @@ export type DesktopProfileResponse = {
*/
allowAutoWrapUpExtension: boolean;

/**
* Access control for queues assigned to the agent (ALL or SPECIFIC).
*/
accessQueue: string;

/**
* Queue identifiers available to the agent when access is SPECIFIC.
*/
queues: string[];

/**
* Access control for entry points assigned to the agent.
*/
accessEntryPoint: string;

/**
* Entry point identifiers available to the agent when access is SPECIFIC.
*/
entryPoints: string[];

/**
* Access control for buddy teams assigned to the agent.
*/
accessBuddyTeam: string;

/**
* Buddy team identifiers available to the agent when access is SPECIFIC.
*/
buddyTeams: string[];

/**
* Outdial enabled for the agent.
*/
Expand Down Expand Up @@ -378,6 +449,11 @@ export type DesktopProfileResponse = {
*/
agentDNValidation: string;

/**
* Additional DN validation criteria configured for the agent.
*/
agentDNValidationCriterions: string[];

/**
* Dial plans of the agent.
*/
Expand Down Expand Up @@ -412,6 +488,31 @@ export type DesktopProfileResponse = {
* State synchronization in Webex enabled or not.
*/
stateSynchronizationWebex: boolean;

/**
* Threshold rules configured for the agent profile.
*/
thresholdRules: Array<Record<string, string | number>>;

/**
* Whether the agent profile is currently active.
*/
active: boolean;

/**
* Whether this profile is the system default.
*/
systemDefault: boolean;

/**
* Timestamp when the profile was created.
*/
createdTime: number;

/**
* Timestamp when the profile was last updated.
*/
lastUpdatedTime: number;
};

/**
Expand Down Expand Up @@ -856,15 +957,6 @@ export type WrapupData = {
};
};

/**
* Available login options for voice channel access
* 'AGENT_DN' - Login using agent's DN
* 'EXTENSION' - Login using extension number
* 'BROWSER' - Login using browser-based WebRTC
* @public
*/
export type LoginOption = 'AGENT_DN' | 'EXTENSION' | 'BROWSER';

/**
* Team configuration information
* @public
Expand Down Expand Up @@ -984,7 +1076,7 @@ export type Profile = {
/** Outbound entry point */
outDialEp: string;
/** Whether ending calls is enabled */
isEndCallEnabled: boolean;
isEndTaskEnabled: boolean;
/** Whether ending consultations is enabled */
isEndConsultEnabled: boolean;
/** Optional lifecycle manager URL */
Expand Down
Loading
Loading