Create instance of CXoneAuth
@example
const copilotService = new CopilotService();
Used to put copilot redux slice data into indexdb
payload
Cancels the Decision Tree session for a given contact.
This is typically called when the agent decides to exit the Decision Tree without submitting it.
The task session unique ID.
Contact/Interaction ID.
ID of the Decision Tree to be closed.
Promise resolving server confirmation payload.
Cancels an active workflow session.
The contact/case ID associated with the active interaction.
The task session UID of the workflow being cancelled.
Promise that resolves when the cancellation is acknowledged.
Closes the checklist without submitting.
This is called when the agent decides to close/cancel the checklist.
Checklist session ID.
Contact/Interaction ID.
Checklist definition ID.
Promise resolving to the cancellation confirmation.
Completes and submits the checklist.
This is called when the agent clicks the complete/submit button on the checklist.
Checklist session ID.
Contact/Interaction ID.
Checklist definition ID.
Promise resolving to the completion confirmation.
Used to fetch the agentic WebSocket URL for the second worker connection
Used to get the copilot adaptive card schema by cardType(all by default) and UI version
branch name indicating UI version
type of adaptive card
copilotService.fetchCopilotAdaptiveCardSchemasFromBucket('24.4.2', 'all');
Used to get all copilot adaptive card schemas
Used to fetch the generated final summary
Used to get the draft email by contactId and uniqueEmailId
contact Id
unique email Id
list of topics
Used to get the copilot info by search text
Used to get AAH config for the contactId
contact Id
if the value fetched is object or not
Used to get first name of agent logged in
additional payload
basic http request for ACP backend
base url for ACP backend
Fetches the Cognigy AI Copilot access token secret from the backend. Used by both standalone and context-based Copilot grid connections.
Promise resolving to an object containing the accessTokenSecret
Used to get copilot data by the agentId into indexdb
Fetches custom adaptive card schema with caching support. Checks localStorage cache first, then fetches from Profile Hub API if needed. Automatically parses and caches the schema.
Unique identifier of the custom adaptive card element
Promise resolving to parsed schema object
Used to get the draft email by contactId and uniqueEmailId
contact Id
unique email Id
Fetches an element configuration (Decision Tree or Custom Adaptive Card) for a given element ID.
Unique ID of the element (Decision Tree or Custom Adaptive Card).
Promise resolving to either a DecisionTreeElement or CustomAdaptiveCardElement.
Use to get journey summary data
contact history of the contact
contactId/caseId
agent assist configuration
customer name
Used to get the last generated list of topics for the contact id
contact Id
Used to get local storage data by the agentId
Fetches active pre-filled slot data for Task Assist based on the provided input slot.
This API sends the slot name and value to the backend and retrieves the corresponding pre-filled data for the active Task Assist form.
Key/value pair representing the slot to be resolved.
Example: { accountNumber: "12345" }
Unique contact identifier associated with the active interaction.
Task Assist session identifier (taskSessionUid).
Promise resolving to the pre-filled data returned by the backend.
Used to get task assist form pre-filled data based on the intentName
intent config
contact Id
objectId
Used to get task assist form schema based on the intentName
intent name
contact Id
Used to get task response based on the intentName for a given contactId
contact Id
intent config
form capture data captured from adaptive card slots
task session unique id, preserved across follow-up calls in the same workflow session
optional free-text query forwarded to task-assist (e.g. search-bar input for an ongoing workflow); included in the request body whenever it is defined, including the empty string
Searches for workflow suggestions using semantic search. Called when no local workflow matches the agent's '/' query.
The search query from agent (text after '/')
The active contact ID
Promise with suggested workflows
Used to get the copilot health
contact Id of current active contact
Posts a Decision Tree section-change event to the backend.
This is triggered when the agent switches to another section in the UI. Used for analytics, tracking, and server-side decision logic.
Unique ID for the task session.
Contact/Interaction ID associated with the tree.
Decision Tree session/element ID.
The newly selected active section ID.
Promise resolving the raw API response.
Use to process an editor command to get the Simplified/Rephrased/Expanded text in reponse
email action
editor text
selected text from editor
contactId/caseId
Refreshes authentication tokens for the current agent session.
The current ID token to refresh.
The current access token to refresh.
A promise that resolves with the refreshed idToken and accessToken.
Used to remove caseId record from copilot indexdb data
Ensures the Agent Assist configuration for the given contactId is available in memory. If the configuration is not already cached (in the in-memory store or localStorage), it will be retrieved from the backend API and then returned.
Unlike storeAgentAssistConfig, this method only attempts a backend retrieval when no cached configuration exists; it does not validate agentAssistId/mediaType changes.
The contact (case) identifier whose Agent Assist configuration is required.
The loaded CopilotProfileConfig if available after cache check / retrieval; otherwise undefined if retrieval failed silently.
Used to get AAH config for the contactId
contact Id
Saves the edited summary for a given channel and contact number.
The communication channel.
The contact number.
The edited summary text.
A promise that resolves with the response data.
Used to get the copilot info by search text
Agent search query
contactId/caseId
Used to store the overall subcard feedback
contactFeedbackCard data given by the agent
Used to store the comprehensive feedback
list of all feedbacks given by the agent
Used to set AAH config of contactId in localStorage
contact Id for which AAH config needs to be stored
AAH config for contactId
Used to put copilot data by the agentId into indexdb
Skips a decision tree question for a given contact and question.
The task session unique ID.
The contact ID.
The decision tree ID.
The question ID to be skipped.
The section ID containing the question.
A promise that resolves with the response data.
Used to store AAH config for the contactId in browser memory by pulling from redis cache, if not already available
contact Id
media type for the contact
agent assist ID
Submits the fully completed Decision Tree to the backend.
After submission, the backend may trigger follow-up workflows, notifications, or task-assist events.
Contact/Interaction ID.
ID of the Decision Tree being submitted.
Promise resolving server confirmation payload.
Updates a checklist item's completion status.
This is called when checklist item gets checked or unchecked.
Object containing sessionId, contactId, checklistId, itemId, isCompleted, and completionType.
Promise resolving to the updated checklist data.
Use to update copilot filters/ tag lists
tags for filters
contactId/caseId
Updates the answer for a single Decision Tree question.
This is called when the user edits a field and clicks the ✓ save icon.
Promise resolving API response containing update summary.
Generated using TypeDoc
Class for copilot base service