All articles

Integrations

Connect your own system

Let the AI answer signed-in customers from your own system — in chat and in widget voice calls — without handing your customer data to OrderInChat.

Overview

Channels & integrations → Own system (/en/integrations/own-system) is for stores that keep customer accounts in their own system (for example a logistics portal) and do not want to copy that data into OrderInChat.

  • You embed the OrderInChat widget on your logged-in pages.
  • Your server signs a short-lived token for the logged-in user and gives it to the widget.
  • When that customer asks about their own account (for example "Where is my shipment?"), the AI calls your own read-only MCP tools with that user's token, in the text chat and in voice calls started from the widget.
  • OrderInChat only checks your signature. It never creates identities, never reads your database, and does not store what your tools return.

Available on paid plans (Starter, Pro, Ultra). Visitors without a valid token are anonymous: the AI answers from your knowledge base and asks them to sign in for account questions.

Let your developer's AI build it

Under Give this to your developer's AI, click Copy instructions and paste the text as it is into the AI assistant your developers use (Claude Code, Cursor, ChatGPT…). It is in English and describes exactly what to build — the token endpoint, the signed MCP server and the widget snippet — with your store ID and addresses filled in. It asks the AI to finish with a list of the values to enter on this page. Secrets are never in the text: create the signing secrets on this page and set them on your server yourself.

1. User sign-in token

Your server signs a JWT for the logged-in user:

ClaimRequiredMeaning
subyesThe user's ID in your system
expyesExpiry — at most 15 minutes ahead
name, emailnoShown to your team in the Inbox and on the customer card
iss, audnoChecked only if you fill them in on the settings page

Choose how OrderInChat verifies it:

  • JWKS URL (ES256 or RS256) — the HTTPS address of your public keys.
  • Public key (ES256 or RS256) — paste the PEM public key.
  • Shared secret (HS256) — at least 32 characters, stored encrypted.

Paste a sample token under Test a token to check it before you go live. An invalid or expired token never fails the chat — the visitor is simply treated as anonymous.

2. Your MCP server

Enter the address of your MCP server (Streamable HTTP, tools/list and tools/call). Test and Live each have their own address and signing secret; Active mode chooses which one the AI uses.

Click Create to get a signing secret. It is shown once — store it on your server. Revoke removes it at once (calls in that mode stop until you create a new one).

Every request OrderInChat sends to your server carries:

  • X-OIC-Timestamp — Unix seconds
  • X-OIC-Signature — v1= + hex HMAC-SHA256 of timestamp.body with your signing secret
  • X-OIC-User-Token — the user's token, unchanged (verify it yourself and return only that user's data)
  • X-OIC-Mode — test or live

Reject requests whose signature does not match or whose timestamp is older than 5 minutes. OrderInChat has no fixed IP address, so use the signature instead of an IP allowlist.

3. Tools

Click Discover tools to read the tools your server lists, then switch on the ones the AI may use. Allow read-only tools only. Tools that appear later start switched off until you turn them on.

  • Text chat: a tool call may take up to 8 seconds.
  • Voice calls: up to 3 seconds; the assistant says a short "let me check" first. If your server is slow, it says it could not check right now.
  • What your tools return is treated as data only, never as instructions, and is not saved in the chat history.

4. Embed the widget

<script>
  window.OrderInChatSettings = {
    userToken: "",
    getUserToken: async () => (await fetch("/your/oic-token")).text(),
  };
</script>
<script src="https://app.orderinchat.com/widget/oic-widget.js" data-tenant-id="YOUR-STORE-ID"></script>

getUserToken is called when the token is about to expire. After the script loads you can also use OrderInChat.setUserToken(token), OrderInChat.clearUserToken() (on sign-out) and OrderInChat.onTokenRefresh(fn).

With a valid token and the voice assistant on, the widget header shows a phone button. The call runs in the widget and is billed from AI credits like any website call (tool calls are included in the call). Web call audio is not recorded.

Customize opens the widget settings in a new tab. The snippet reads the widget's look from OrderInChat (by data-tenant-id) on every page load, so changes you save there apply at once — no need to paste the code again. It uses the widget profile set for your storefront (otherwise your active or first profile); no new profile is created.

5. Test the connection

Below Tools, Test the connection runs fixed checks against your Test MCP address with the test signing secret. No AI is involved and nothing is saved. It checks that:

  • the address is public https (not localhost or a private network address);
  • a correctly signed tools/list works;
  • a request with a wrong signature is rejected;
  • a correct signature with a timestamp older than 5 minutes is rejected;
  • tools/call on a switched-on tool without a user token returns an error and no data;
  • with a sample token pasted under Test a token, tools/call works — and how fast (over 2 seconds is too slow for voice calls; voice calls give up after 3 seconds).

Only tools you discovered and switched on are called, with empty arguments; the sample token is used for that one test and never stored. Each failing item shows how to fix it. Copy results for your developer copies an English report you can paste to your developer or their AI; run the test again until nothing fails.

What your team sees

  • Inbox → Web: the customer's name and email from the token, or User #ID when you send neither. Each AI reply shows which of your tools it used and whether it worked — never the data.
  • Inbox → Calls: widget calls appear under Store website and in Live while they run; the transcript shows each tool step (name and result only).
  • Customers: a customer card is created or reused for each user ID (Store user ID), so chats and calls of the same person are linked.

Need more help?

Chat with the Help assistant about OrderInChat, or open My Support Tickets while signed in (free trial included).