Skip to content

fix(cc-task): align consult/transfer tabs and lists with agent desktop (CAI-8354) - #733

Open
akulakum wants to merge 1 commit into
webex:nextfrom
akulakum:fix/cai-8354-missing-queue-transfer-epic-cti
Open

fix(cc-task): align consult/transfer tabs and lists with agent desktop (CAI-8354)#733
akulakum wants to merge 1 commit into
webex:nextfrom
akulakum:fix/cai-8354-missing-queue-transfer-epic-cti

Conversation

@akulakum

@akulakum akulakum commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

COMPLETES CAI-8354

This pull request addresses

In Epic CTI (embedded cc-widgets), the Consult/Transfer popover did not match Agent Desktop:

  • Queues tab missing for some profiles (e.g. AVERA inbound Transfer when consultToQueue is off but accessQueue is SPECIFIC).
  • Entry Point / Agents tabs not gated by desktop profile collaboration flags (accessEntryPoint, accessBuddyTeam).
  • Queue and entry-point list APIs were not scoped with desktopProfileFilter, so results could include items outside the agent's desktop profile.

Root cause: widgets did not consume SDK profile collaboration access flags or pass desktopProfileFilter on list fetches.

Depends on SDK: webex/webex-js-sdk#5157 (profile flags + EntryPointSearchParams.desktopProfileFilter).

by making the following changes

Store (@webex/cc-store)

  • Persist accessQueue, accessEntryPoint, and accessBuddyTeam from agent profile on the MobX store.
  • Pass desktopProfileFilter: true in getQueues() and getEntryPoints() SDK calls.
  • Expose new flags via storeEventsWrapper for widgets.

cc-components

  • Add consult-transfer-tab.utils.ts with Agent Desktop–aligned tab visibility rules:
    • Agents tab: accessBuddyTeam !== NONE
    • Queues tab: accessQueue !== NONE + direction/consultToQueue/outdialTransferToQueueEnabled gating for voice
    • Entry Point tab: existing showEntryPointTab + voice + accessEntryPoint !== NONE
  • Wire flags through CallControlConsultTransferPopover.
  • Unit tests for tab utils and updated popover tests/snapshots (including AVERA Transfer inbound case).

Task widgets (@webex/cc-task)

  • Pass profile access flags and interaction context into CallControl and CallControlCAD.

Docs

  • Update store-spec.md and task-spec.md (spec-currency).

Out of scope (deferred)

  • List sort order vs Agent Desktop — deferred pending team decision on CMS/BFF sort param parity (sortBy/sortOrder vs sort=name,ASC). No client-side sort added in this PR.

Change Type

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Tooling change
  • Internal code refactor

The following scenarios were tested

  • The testing is done with the amplify link
  • yarn workspace @webex/cc-components test:unit — consult-transfer tab utils, popover unit/snapshot tests
  • yarn workspace @webex/cc-store test:unit --testPathPattern=storeEventsWrapper — profile flags, desktopProfileFilter on queue/EP fetches
  • yarn workspace @webex/cc-task test:unit (CallControl paths)
  • yarn test:styles — eslint/prettier pass on touched packages
  • Manual: Consult/Transfer popover in Epic CTI — Queues tab visible for AVERA inbound Transfer; tabs respect profile access flags

The GAI Coding Policy And Copyright Annotation Best Practices

  • GAI was not used (or, no additional notation is required)
  • Code was generated entirely by GAI
  • GAI was used to create a draft that was subsequently customized or modified
  • Coder created a draft manually that was non-substantively modified by GAI (e.g., refactoring was performed by GAI on manually written code)
  • Tool used for AI assistance (GitHub Copilot / Other - specify)
    • Github Copilot
    • Other - Please Specify
  • This PR is related to
    • Feature
    • Defect fix
    • Tech Debt
    • Automation

Checklist before merging

  • I have not skipped any automated checks
  • All existing and new tests passed
  • I have updated the testing document
  • I have tested the functionality with amplify link (manual Epic CTI validation; amplify link N/A for this host embed)

Make sure to have followed the contributing guidelines before submitting.

@akulakum
akulakum requested a review from a team as a code owner August 9, 2026 17:33

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4b92884739

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

{CATEGORY_AGENTS}
</Button>
{allowConsultToQueue && (
{isAgentsTabVisibleFlag && (

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Select a visible category when Agents is hidden

When accessBuddyTeam is NONE, this removes the Agents button but the hook still initializes selectedCategory to Agents and the list rendering at line 254 is not gated by isAgentsTabVisibleFlag. The popover therefore opens with no visible active tab and can still display/select any preloaded buddy agents despite the profile restriction; initialize the selection to the first permitted category and gate the Agents content as well.

Useful? React with 👍 / 👎.

import {CallControlProps} from '../task.types';
import {CallControlComponent} from '@webex/cc-components';
import {isUnacceptedCampaignPreview} from '../Utils/task-util';
import {ITask} from '@webex/contact-center';

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Route the new task type through the store

Both CallControl widget shells now import ITask directly from @webex/contact-center, bypassing the store boundary and coupling the widget layer to the SDK. Use the ITask type already exported by @webex/cc-store, or derive this context in the store/hook, so SDK changes remain isolated.

AGENTS.md reference: AGENTS.md:L61-L62

Useful? React with 👍 / 👎.

Comment on lines +1110 to +1113
const response = await this.store.cc.getQueues({
...(params ?? {}),
desktopProfileFilter: true,
} as ContactServiceQueueSearchParams);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Use a typed SDK contract for desktopProfileFilter

The new queue and entry-point calls force desktopProfileFilter through assertions to SDK parameter types that do not declare it, suppressing the contract check for both endpoints. If the pinned SDK does not support or serialize this flag, the requested profile filtering is silently ineffective; update and verify the SDK surface or add a verified typed adapter instead of asserting the objects.

AGENTS.md reference: AGENTS.md:L56-L57

Useful? React with 👍 / 👎.

Comment on lines +471 to +478
/** Desktop Profile collaboration access for queues */
accessQueue?: string;

/** Desktop Profile collaboration access for entry points */
accessEntryPoint?: string;

/** Desktop Profile collaboration access for buddy teams */
accessBuddyTeam?: string;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Update the owning cc-components spec

This adds collaboration-access props and changes Consult/Transfer tab behavior in cc-components, but the commit updates only the store and task specs; packages/contact-center/cc-components/ai-docs/cc-components-spec.md remains unchanged. Document the new props, visibility rules, and access behavior in the owning module spec in this change.

AGENTS.md reference: AGENTS.md:L68-L68

Useful? React with 👍 / 👎.

@aws-amplify-us-east-2

Copy link
Copy Markdown

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-733.d1b38q61t1z947.amplifyapp.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant