CTRL K
Description
Customer-data connectors let a signed-in end user ask about their own records, such as orders, plan status, tickets, or billing information. Kommander exposes connector operations as tools only after server-generated identity verification succeeds, preventing the assistant or the user from spoofing ownership through prompt text.
Prerequisites
- Widget identity verification enabled with a server-held HMAC secret.
- A backend that can sign the current end user’s identity payload.
- A customer-data connection created in Kommander.
- For generic connectors, an OpenAPI 3.x document with identity binding rules.
- Upstream API credentials for the data source.
Setup
- Enable identity verification and copy the secret to your server.
- Register a customer-data connection in Kommander.
- Upload or reference the OpenAPI document for the upstream API.
- Configure identity binding, for example injecting
verifiedUser.emailas a header, query parameter, path parameter, or request body field. - Enable only the operations the assistant may call.
- Initialize the widget with the server-signed identity payload and test as a known end user.
Architecture Diagram
Configuration
| Setting | Required | Notes |
|---|---|---|
| Identity secret | Yes | Kept on the integrator server and used for HMAC signatures. |
| Connector type | Yes | Planned types include openapi, shopify, stripe, hubspot, zendesk, and mcp-remote. |
| Upstream credentials | Yes | API key, bearer token, OAuth credential, or compatible auth mode. |
| Identity binding | Yes | Defines where verified user identity is injected into upstream requests. |
| Enabled tools | Yes | Restrict to safe read operations for v1. |
Integration Patterns
| Pattern | Use when | Configuration guidance |
|---|---|---|
| OpenAPI read connector | The customer already exposes REST endpoints. | Upload an OpenAPI 3.x document, enable only safe operations, and bind verified identity into path, query, header, or body fields. |
| Prebuilt SaaS connector | The data lives in a supported system such as Stripe, HubSpot, or Zendesk. | Store provider credentials server-side and map Kommander identity fields to the provider’s customer identifier. |
| Remote MCP connector | The customer owns a tool server with richer business logic. | Require authenticated transport, strict tool allowlists, and server-side identity verification before each tool call. |
| Event-fed cache | The upstream system cannot serve low-latency reads. | Sync customer records into a scoped store and expose read tools that still require verified identity. |
OpenAPI Tool Example
Identity-bound parameters should not be exposed to the model as free-form inputs. In this example, the assistant may choose include_orders, but Kommander injects the verified email into X-Verified-Email.
openapi: 3.0.3
info:
title: Customer Profile API
version: 1.0.0
paths:
/me:
get:
operationId: getVerifiedCustomerProfile
summary: Get the verified customer's profile
parameters:
- name: X-Verified-Email
in: header
required: true
schema:
type: string
x-kommander-template: "{{verifiedUser.email}}"
- name: include_orders
in: query
required: false
schema:
type: boolean
responses:
"200":
description: Customer profileTool Handler Example
type VerifiedUser = { email: string; externalId?: string };
async function callCustomerApi(args: { include_orders?: boolean }, verifiedUser: VerifiedUser) {
if (!verifiedUser.email) {
throw new Error('Verified identity is required');
}
const url = new URL('https://customer.example.com/me');
if (args.include_orders !== undefined) {
url.searchParams.set('include_orders', String(args.include_orders));
}
const response = await fetch(url, {
headers: {
Authorization: `Bearer ${process.env.CUSTOMER_API_TOKEN}`,
'X-Verified-Email': verifiedUser.email,
},
});
if (!response.ok) {
throw new Error(`Customer API failed with ${response.status}`);
}
return response.json();
}Limitations
- V1 is read-only; write actions require explicit confirmation flows in a later version.
- Tools are hidden for anonymous or failed-identity conversations.
- Authorization must use verified identity from Kommander context, never LLM-supplied tool arguments.
- OpenAPI support depends on valid operation IDs and schemas.
Troubleshooting
- If no customer-data tools are available, verify the widget request includes a valid signed identity payload.
- If signatures fail, compare timestamp, payload canonicalization, and HMAC secret.
- If upstream calls return another user’s data, stop rollout and fix the identity binding before production.
- If an OpenAPI upload fails, validate the document as OpenAPI 3.x and resolve
$referrors.