Skip to content

feat(contact-center): expose collaboration flags and desktopProfileFilter (CAI-8354) - #5157

Open
akulakum wants to merge 2 commits into
webex:nextfrom
akulakum:fix/cai-8354-expose-desktop-profile-collaboration-flags
Open

feat(contact-center): expose collaboration flags and desktopProfileFilter (CAI-8354)#5157
akulakum wants to merge 2 commits into
webex:nextfrom
akulakum:fix/cai-8354-expose-desktop-profile-collaboration-flags

Conversation

@akulakum

@akulakum akulakum commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

COMPLETES CAI-8354

This pull request addresses

Epic CTI / embedded widget consumers cannot align Consult/Transfer behavior with Agent Desktop because the Contact Center SDK did not expose desktop-profile collaboration access flags on the agent Profile, and getEntryPoints() did not support the desktopProfileFilter query parameter used by CMS v2 list APIs.

Without these surfaces, host apps and @webex/cc-widgets cannot gate Queues / Entry Point / Agents tabs or scope list results to the agent's desktop profile.

by making the following changes

  • Profile parsing (config/Util.ts): Map accessQueue, accessEntryPoint, and accessBuddyTeam from agent profile config into the SDK Profile type (ALL | SPECIFIC | NONE).
  • Types: Extend Profile / config types and export desktopProfileFilter on EntryPointSearchParams.
  • Entry Point API (EntryPoint.ts): Forward optional desktopProfileFilter on getEntryPoints() list requests (existing sortBy / sortOrder behavior unchanged).
  • Docs: Update config-spec.md for the new profile fields.
  • Tests: Add Util unit coverage for collaboration flag parsing; extend EntryPoint tests for desktopProfileFilter query param.

Companion change: widgets repo PR (CAI-8354) consumes these SDK fields to gate Consult/Transfer tabs and passes desktopProfileFilter: true from the store for queue/entry-point fetches.

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

  • yarn workspace @webex/contact-center test:unit --testPathPattern="services/config/Util|services/EntryPoint"
  • parseAgentConfigs maps accessQueue, accessEntryPoint, and accessBuddyTeam for ALL / SPECIFIC / NONE profile values
  • getEntryPoints({ desktopProfileFilter: true }) appends desktopProfileFilter=true to the v2 entry-point URL alongside existing pagination/sort params
  • Manual validation in Epic CTI (pending widgets SDK dependency bump)

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

I certified that

  • I have read and followed contributing guidelines
  • I discussed changes with code owners prior to submitting this pull request
  • I have not skipped any automated checks
  • All existing and new tests passed
  • I have updated the documentation accordingly

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:23

@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: 84383fa63e

ℹ️ 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".

attributes,
sortBy,
sortOrder = 'asc',
desktopProfileFilter,

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 Bypass the cache for desktop-profile filtering

When the same organization/page is requested both with and without desktopProfileFilter within the five-minute TTL, the cache checks at the start and end of getEntryPoints() ignore this new parameter and use the same orgId:page:pageSize key. An unfiltered cached page can therefore satisfy a filtered request, or a filtered response can contaminate a later unfiltered request; include this filter in cache eligibility or the cache key.

AGENTS.md reference: packages/@webex/contact-center/AGENTS.md:L73-L79

Useful? React with 👍 / 👎.

export type EntryPointListResponse = PaginatedResponse<EntryPointRecord>;
export type EntryPointSearchParams = BaseSearchParams;
export interface EntryPointSearchParams extends BaseSearchParams {
desktopProfileFilter?: boolean;

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 public contract metadata

EntryPointSearchParams is exported from the package root, so adding this option changes the public Services contract, but the commit does not update src/services/ai-docs/services-spec.md, ai-docs/CONTRACTS.md, or .sdd/manifest.json. Record the new parameter in those owning contract artifacts so the canonical SDD and exported TypeScript surface remain synchronized.

AGENTS.md reference: packages/@webex/contact-center/AGENTS.md:L66-L70

Useful? React with 👍 / 👎.


await entryPointAPI.getEntryPoints({desktopProfileFilter: true});

expect(mockWebex.request).toHaveBeenCalledWith({

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 the required assertion helper in new tests

The newly added EntryPoint and config Util cases use Jest expect assertions instead of assert from @webex/test-helper-chai, contrary to the repository's explicit test convention. Convert the new assertions to the mandated helper, using assert.calledOnceWithExactly for the request assertion.

AGENTS.md reference: AGENTS.md:L43-L47

Useful? React with 👍 / 👎.

@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: 78d9b379db

ℹ️ 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".

*/
public async getConsultTransferQueues(
params: ConsultTransferQueueSearchParams = {}
): Promise<ContactServiceQueuesResponse> {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Return projection types from specialized list methods

Both specialized methods request only id,name,dbId, but this method declares ContactServiceQueuesResponse and its entry-point counterpart declares EntryPointListResponse. Those record types promise required fields that the projection omits—for example, queues require queueType, channelType, and active, while entry points require type, isActive, and orgId—and neither includes dbId. Consumers can therefore compile accesses that produce undefined; define and return dedicated projected record/response types for these APIs.

AGENTS.md reference: packages/@webex/contact-center/AGENTS.md:L83-L86

Useful? React with 👍 / 👎.

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.

2 participants