> ## Documentation Index
> Fetch the complete documentation index at: https://koreai-content-gov.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# CCAI integration

<Badge icon="arrow-left" color="gray">[Back to list of integrations](/agent-platform/integrations#agent-desktop-integrations)</Badge>

For secure, bidirectional communication between the AI application and contact center agents, you can integrate the AI for Service Contact Center app with an Artemis project.
The integration requires:

* **Contact Center app configuration** in AI for Service, using tenant, project, and token details from Artemis.
* **Artemis project configuration**, using tokens and IDs from the Contact Center app, set as the default Agent Transfer route.

This connection is shared infrastructure. Once it's configured, Artemis routes escalated conversations to the Contact Center app and returns its responses to the user.

This article covers the shared connection setup and digital channel (chat and email) routing. For voice channel setup, complete the steps in this article first, then go to [CCAI voice transfer](/agent-platform/integrations/ccai-voice-transfer).

## Prerequisites

* Access to AI for Service with permission to create and publish Contact Center apps - Admin/Owner permissions.
* Artemis application access with permission to open Agent Chat, Profile, Integrations, Deployments, and API Keys.
* Access to an Artemis project.
* A secure token generator or password manager to create secrets that meet the required complexity rules.
* A test agent or flow that can reach an agent-transfer path, to validate the connection after setup.
* The integration is enabled on request. To enable it, [contact Support](https://support.kore.ai/).

## Step 1: Contact Center app configuration

(Required for both digital and voice channel interactions)

1. Log in to the **AI for Service** platform.

2. Create a new app and select Contact Center as the app type.

3. Complete the onboarding journey for the new app.

4. Go to **Flows & Channels**.

5. Select **Artemis Integration**. (Note: The integration is enabled on request. If you are unable to see the page, [contact Support](https://support.kore.ai/).)

6. Enter the following fields. These fields require values to be fetched from the Artemis project.

   | **Field** | **Where to fetch the value** | **Implementation notes** |
   | - | - | - |
   | Artemis tenant ID | Artemis: Agent Chat > initiate chat > Debug > Data or Artemis Profile > Workspace ID | Use the tenant/workspace ID for the Artemis workspace being connected. |
   | Artemis project ID | Artemis: Agent Chat > initiate chat > Debug > Data | Use the project ID for the target Artemis project. |
   | Artemis webhook URL | Artemis: Project > Integrations > Kore SmartAssist > Connect > Webhook Channel Callback URL | Copy the callback URL exactly as shown. |
   | Artemis access token | Bring your own key | Create a secret that meets the [token and secret rules](/agent-platform/integrations/ccai#token-and-secret-rules). |
   | Artemis auth token | Artemis: Project > Deployments > API Keys > Create a platform key | Create a platform key and copy the generated token. The token is shown only once, so copy it immediately; it typically starts with `abl_`. Start with the least-privilege scope your design needs, such as Read Sessions for session history and transcripts. |

7. Review all Artemis Integration fields, then click **Enable Artemis Integration**. If an integration already exists for the app, click **Update Artemis Integration** instead.

8. Confirm the integration status shows **Enabled**.

9. Review and publish the Contact Center app.

<Note>
  Don't swap the **Artemis access token** and the **Artemis auth token**. The access token is a secret you generate yourself and must match the Webhook Secret you enter in Step 2. The auth token is the platform key generated in Artemis. Swapping these two values causes authentication failures.
</Note>

## Step 2: Artemis project configuration

(Required for both digital and voice channel interactions)

1. Go to **Project** > **Integrations** > **Kore SmartAssist** > **Connect**.
2. Configure the following fields:

| **Artemis connection field** | **Source** | **Notes** |
| - | - | - |
| Connection Name | Enter a unique connection name. | Use a name that identifies the environment and AI for Service app, such as AI for Service-uat-contact-center. |
| Base URL | CCAI → Flows and Channels → Artemis Integration → CCAI host URL | Use the environment root URL, not a deep `/builder`, `/app`, or `/hooks` path. Example: `https://platform.kore.ai/`. |
| CCAI App Token (optional) | CCAI → Flows and Channels → Artemis Integration → CCAI auth token | Populate this when the implementation needs Artemis to retrieve post-transfer voice transcripts. |
| XOCC Webhook Channel Token | CCAI → Flows and Channels → Artemis Integration → Web token | Copy exactly from AI for Service. |
| Webhook Secret | Bring your own key | Use the same value as the Artemis access token entered in AI for Service Artemis Integration. |
| App ID | CCAI → Flows and Channels → Artemis Integration → CCAI stream ID | Copy exactly. |
| Account ID | CCAI → Flows and Channels → Artemis Integration → Account ID | Copy exactly. |

## Step 3: Configure digital channel routing

### How routing works

* The conversation remains with the AI agent until a transfer is triggered.
* Artemis resolves the transfer configuration and selects the active **connection as per the settings**.
* Artemis sends the transfer request and conversation context to **CCAI**.
* CCAI routes the conversation to the appropriate queue or agent based on its routing configuration.
* If enabled, Artemis retrieves the conversation transcript after the transfer is complete.

When you enable the Artemis integration, CCAI creates two default flows: Artemis Voice Flow and Artemis Chat Flow. These default flows don't contain an automation node. Instead, they include nodes such as check agent availability, check business hours, and set queue.

You can customize the Start Flow to add routing behavior beyond the defaults, and link it to conditional flows for in-queue, no-agent, and out-of-office-hours scenarios. After a conversation lands in a queue, CCAI also evaluates any additional routing configuration set for that queue, such as preferred-agent or conditional routing.

<Note>
  If your implementation sets routing values in the escalate block and also customizes the Start Flow, confirm with Support which configuration takes precedence in your environment before relying on it in production.
</Note>

### Routing options customers can choose

| **Option** | **Behavior** | **When to choose it** |
| - | - | - |
| Default routing | All eligible transfers use the connection and queue configured under Agent Transfer > Default Routing. | Best starting point for one CCAI environment or one general support destination. |
| Queue-based routing | The DSL can pass a queue ID; the transfer carries or resolves a queue so CCAI can deliver to the right team. | Use for billing, technical support, claims, or other stable team destinations. |
| Skill or named-agent routing | The DSL can pass a skill ID or agent ID; the transfer specifies required skills or selected agents when the use case supports it. | Use for language, product, certification, or VIP specialization. Keep a queue fallback. |
| Priority-based routing | A numeric priority influences the relative urgency of the transfer. | Use sparingly for genuinely urgent or high-value interactions; scale being 0 to 10. 0 highest and 10 lowest. |
| Post-agent action | Return to bot keeps the session in the bot lifecycle after the live-agent leg; End session closes it. | Choose based on whether the bot should resume, collect feedback, or terminate after handoff. |

### Routing precedence

* Values assigned in the escalate block apply to that specific transfer.
* If a value is not assigned, Artemis uses the configured Agent Transfer default.
* If data is missing or an ID is invalid, routes to the configured general-support fallback in CCAI.

### Set up digital channel routing

* Go to **Project Settings** → **Agent Transfer** → **Default Routing** → **Connection** and select the **integration**.
* Review Queue, Priority, and Post-Agent Action.
* Set up a digital channel.

When an agent escalates a conversation, Artemis routes it to the Contact Center app via the configured connection. The Contact Center app's response, returned through the connection, is delivered to the user.

## Step 4: Test and verify

1. For digital channels, enter a message requesting a transfer to a live agent.
2. Verify the expected Artemis behavior: an escalation request is initiated and the conversation is transferred to CCAI.
3. Verify the expected CCAI behavior: a new chat conversation is routed to the configured queue or agent. Accept the interaction.
4. Verify the transfer details:
   * **Artemis Sessions/Trace:** Confirm that an escalation event is recorded for the transfer.
   * **Artemis Transfer Sessions:** Confirm the provider is **SmartAssist**, the channel is chat, and the transfer completes successfully.
   * **CCAI Agent Console:** Confirm the interaction is offered to the expected queue or agent, accepted successfully, and transitions to the **Connected** state.

## Example use case: dynamic customer-profile routing

You can send a customer to a different CCAI queue based on information Artemis already has about them. In this example, Premium customers who need help with Payments go to a specialist priority queue, while other customers go to the most appropriate standard queue. Use the same pattern for language, product, region, account status, or any other reliable profile value.

### 1. Choose the profile information

Use information that's available before the agent transfer and that has a clear source of truth. Keep the allowed values consistent across the customer system, Artemis, and CCAI. For example: customer tier (Premium or Standard), product or intent (Payments, Cards, General), language, or customer status (authenticated, unauthenticated, high-risk).

### 2. Define the decision rules

Evaluate rules from top to bottom. Put the most specific rule first, followed by broader rules, and always finish with a safe default.

* Premium + Payments → Payments Priority queue, Payments skill, high priority.
* Standard + Payments → Payments Support queue, Payments skill, normal priority.
* Premium + any other product → Priority Support queue, Premium skill (if supported).
* Missing or unknown profile data → General Support queue. Don't block the customer because a profile field is unavailable.

The queue names and priority labels are examples. Replace them with the actual CCAI queue names, IDs, skills, and approved priority scale for your environment.

### 3. Add queues and skills in the Artemis escalate block

Create the required queues and skills in CCAI first, then copy their IDs into the Artemis routing logic. Use the queue ID as the destination and the skill ID as the agent qualification, and keep a general-support queue as the fallback. Set these values inside the [`escalate` block](/agent-platform/abl/reference/multi-agent-and-supervisor#escalate) in the Artemis agent that invokes the live-agent transfer.

Example DSL pattern:

```yaml theme={null}
escalate {
    reason = "customer_requested_agent"

    if customer.tier == "Premium"
       and customer.product == "Payments" {
        queueId = "QID_PAYMENTS_PRIORITY"
        skillId = "SKILL_PAYMENTS"
        priority = 1
    } else if customer.product == "Payments" {
        queueId = "QID_PAYMENTS_SUPPORT"
        skillId = "SKILL_PAYMENTS"
        priority = 5
    } else if customer.tier == "Premium" {
        queueId = "QID_PRIORITY_SUPPORT"
        skillId = "SKILL_PREMIUM"
        priority = 5
    } else {
        queueId = "QID_GENERAL_SUPPORT"
        skillId = null
        priority = 5
    }

    postAgentAction = "RETURN_TO_BOT"
}
```

Replace the placeholder values with the actual CCAI IDs. The exact property names depend on the Artemis DSL version. Don't use display names when the integration requires IDs.

Field reference:

* `queueId`: the CCAI queue that should receive the interaction.
* `skillId`: the CCAI skill required for the interaction, such as Payments, Spanish, or Premium Support.
* `agentId`: an optional named-agent destination. Use it only when the business case requires direct routing.
* `priority`: the agreed numeric priority.
* `postAgentAction`: what Artemis does after the live-agent leg, such as `RETURN_TO_BOT` or End session.

### 4. Test the escalation

* Premium customer with a Payments request → Payments Priority queue plus Payments skill.
* Standard customer with a Payments request → Payments Support queue plus Payments skill.
* Premium customer with another product → Priority Support queue plus Premium skill.
* Missing or invalid profile data → General Support fallback queue.
* Selected queue has no agents or is outside business hours → CCAI in-queue or no-agent flow.

The connection configuration establishes communication between Artemis and CCAI. The escalate block determines the destination for an individual conversation. Keep changing workforce decisions, such as agent availability and queue capacity, in CCAI rather than encoding them in the bot.

## Points to note

* **Attachments**: When a user shares a file during a conversation in Artemis, the file and its associated metadata are transferred to the CCAI agent. The agent can use the attachment and its metadata as part of its reasoning and response generation. See [supported attachment types](/agent-platform/administration/security-observability-settings#attachments).
* **Transfer lifecycle events**: When a session is escalated to a human agent in the contact center, the platform captures key events in the transfer lifecycle, such as transfer initiated, transfer completed, human agent connected, and session ended, as **platform events**. These events include transfer metadata that can be consumed by downstream integrations, workflows, and analytics.

### Token and secret rules

| Requirement | Rule |
| - | - |
| Length | Use 32 to 512 characters. |
| Character mix | Use three of the four character types: uppercase letters, lowercase letters, digits, symbols. |
| Webhook Secret matching | Must match the Artemis access token configured in AI for Service. |
| Storage | Don't paste secrets into tickets, chat, emails, or SOP. Store them in the approved vault. |
| Rotation | Rotate the paired AI for Service Artemis access token and Artemis Webhook Secret together. |

### Validation checklist

| Validation item | Expected result |
| :- | :- |
| Create AI for Service app of Contact Center type | New app is visible and onboarding is complete. |
| Configure Artemis integration | Populate tenant ID, project ID, webhook URL, access token, and auth token. |
| Enable of the integration | Integration status shows enabled or active. |
| Publish AI for Service app | Publish the latest version successfully. |
| Create Artemis Kore SmartAssist connection | Connection saved with unique name, base URL, tokens, app ID, and account ID. |
| Match webhook secret | Matches the AI for Service Artemis access token exactly. |
| Initiate test interaction | You can initiate a flow without authentication errors. |
| Check debug data | Tenant ID and project ID align with the intended workspace and project. |

## Troubleshoot integration issues

| Symptom | Likely cause | Recommended action |
| - | - | - |
| 401 or 403 response | Token mismatch or expired API key | Re-copy the Artemis auth token and verify the webhook secret. |
| Webhook events aren't received | Incorrect callback URL or channel token | Verify the callback URL and CCAI Webhook Channel Token. |
| Wrong tenant or project is connected | Values copied from another workspace or project | Fetch tenant ID and project ID again from Agent Chat → Debug → Data or confirm Workspace ID in Profile. |
| Connection name rejected | Connection name isn't unique | Use a unique name. |
| Integration works before publish but not after changes | Changes saved but not published | Publish the AI for Service app again. |

***

**Related articles:**

* [CCAI voice transfer](/agent-platform/integrations/ccai-voice-transfer)
* [Know more about Contact Center](/ai-for-service/contact-center)
* [Transfer sessions](/agent-platform/transfer-sessions)
