> ## Documentation Index
> Fetch the complete documentation index at: https://docs.consile.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Ordrestyring

> Cases with status, customer, fitter, quote amount and financials, plus time registrations, material cost and sales invoices per case, directly from Ordrestyring. Read-only, connected with an API key from Ordrestyring's support.

*[Læs siden på dansk](https://docs.consile.ai/connectors/ordrestyring.md)*

The Ordrestyring connector gives your AI **read-only** access to your cases in
Ordrestyring (ordrestyring.dk), the case management system for tradespeople. It can read
status, case type, customer, responsible fitter, quote amount and the case's financials:
expected contribution margin, revenue, and hours and materials at cost and sales price.
For the individual case it can also fetch time registrations and sales invoices in a period
as well as the case's total material cost. You connect with an API key that
Ordrestyring's support issues. There is no login redirect, and your AI never sees
the key itself.

> **Access**
>
> Read-only

> **Authentication**
>
> API key from Ordrestyring's support

> **Hosting**
>
> Hosted in the EU · Frankfurt

* **Price:** 299 DKK/month excl. VAT. Ordrestyring
  is only billed in DKK. No lock-in, cancel at any time. The price covers 1
  user and 1 agreement (one connected Ordrestyring agreement). Each extra user and
  each extra agreement costs 149.50 DKK/month excl. VAT. See [Pricing](https://docs.consile.ai/en/portal/pricing.md).
  Ordrestyring is also included in [the Consile Studio membership](https://docs.consile.ai/en/portal/membership.md) and
  [the free edition](https://docs.consile.ai/en/portal/free-edition.md).
* **Users:** whoever buys Ordrestyring automatically gets the included access.
  If more colleagues need Ordrestyring in their AI, an administrator gives them
  access under **Team** in the portal (choose **All tools** next to Ordrestyring on
  the person's page). An extra user is billed pro rata from the day
  access is given. A colleague without access can still see the tools in their AI, but
  every lookup is refused with a message to ask an administrator for access. One
  access covers all your Ordrestyring agreements. If you have
  [the Consile Studio membership](https://docs.consile.ai/en/portal/membership.md), an administrator
  instead gives one membership licence per person, and it also covers Ordrestyring. See
  [Team](https://docs.consile.ai/en/portal/team.md).
* **Multiple agreements:** an API key belongs to exactly one Ordrestyring agreement (one
  company). If you have several agreements, an administrator adds them on the connector's
  page in the portal: the **Connections** card → **Add agreement**. Each extra agreement
  gets its own address, for example `https://mcp.consile.ai/ordrestyring-2/mcp`, and is connected
  with that agreement's own key. Add each address as its own connector in your AI.
  See [Connect Ordrestyring](https://docs.consile.ai/en/connect/connect-ordrestyring.md#multiple-agreements).
* **Endpoint:** `https://mcp.consile.ai/ordrestyring/mcp` (your own named connector in your AI).

## Prerequisites

**1. Subscription**

The connector must be bought in the [portal](https://app.consile.ai). See
[Buy a connector](https://docs.consile.ai/en/portal/buy-a-connector.md).

**2. Your AI connected**

See [Connect Claude](https://docs.consile.ai/en/connect/connect-claude.md) or
[Connect ChatGPT](https://docs.consile.ai/en/connect/connect-chatgpt.md).

**3. Ordrestyring connected**

Ask Ordrestyring's support for your API key, and paste it in the portal. See
[Connect Ordrestyring](https://docs.consile.ai/en/connect/connect-ordrestyring.md).

## What can it do? (tools)

You do not need to know the tool names. You ask in natural language, and your AI
picks the right one itself. The connector provides **9 read-only tools**,
grouped here by what they answer:

**Cases**

| Tool | What it does |
| - | - |
| `list_cases` | Cases with status, case type, customer, fitter, quote amount and financial overview, most recently updated first. One page per call (default 50, at most 200 cases), and your AI can keep paging, one page at a time |
| `find_cases` | Finds cases where the case number, description or customer name contains a text. Searches the most recently updated cases (600 by default, at most 1,000) |
| `get_case` | One case by its id, with status, customer, fitter, quote amount, main case, sub-cases and financial overview |

**Financials per case**

| Tool | What it does |
| - | - |
| `get_case_work_summary` | Overview of one case in one call. For a period: number of time registrations and their total cost price, as well as number of sales invoices and their sum. Also the case's total material cost |
| `list_case_hours` | Time registrations on a case in a period, with count and total cost price |
| `list_case_sales_invoices` | Sales invoices on a case in a period, with id, amount, count and total sum |

**Advanced**

| Tool | What it does |
| - | - |
| `graphql_query` | A free-form read query against Ordrestyring's API for what the fixed tools do not cover. Write queries are refused |
| `introspect_schema` | Overview of the queries Ordrestyring's API offers |
| `describe_type` | Fields, arguments and values for one data type in the API |

The tools are called `ordrestyring__<tool>` (for example
`ordrestyring__get_case_work_summary`) when your AI calls them. You only need to
ask the question in natural language.

> [!NOTE]
>
> **Case number and case id are two different numbers.** The tools for one case
> (`get_case`, `get_case_work_summary`, `list_case_hours` and
> `list_case_sales_invoices`) use Ordrestyring's internal case id, not the
> case number you see in Ordrestyring. If you ask about "case 4711", your AI can find
> the case with `find_cases` and use its id.

> [!NOTE]
>
> **Amounts are passed on unchanged.** The connector does not convert the amounts, but passes
> them on exactly as Ordrestyring returns them. The response to your AI contains
> a note about this.

> **[Building on top yourself? See the API reference](https://docs.consile.ai/developers/tools/ordrestyring.md)**
>
> Full reference with all 9 tools, arguments, pagination, date ranges and
> return values.

## Try asking

> **Cases & status**
>
> > *"Show the 20 most recently updated cases with status, customer and quote amount."*
>
> > *"What is the expected contribution margin on our 50 most recently updated cases?"*

> **Financials per case**
>
> > *"What did the time registrations on case 4711 cost in August, and what did we invoice in the same period?"*
>
> > *"What is the total material cost on case 4711?"*
>
> > *"Show the sales invoices on case 4711 this year with amounts and total sum."*

> **Find a case**
>
> > *"Find the cases for the customer \<company name> and show status and quote amount."*

> [!TIP]
>
> Dates are interpreted as Danish calendar days, and an end date counts the whole day.
> If you do not mention a period, the tools for hours and invoices include everything from 1
> January 2000 until today.

## Limitations

* **Read-only:** the connector can only read. Write queries are refused before they
  are sent to Ordrestyring. This also applies to `graphql_query`.
* **The key is only available via Ordrestyring's support:** there is no self-service in
  Ordrestyring. The key does not expire. If it needs to be replaced or blocked, you contact
  Ordrestyring's support.
* **Check the key when you connect:** a wrong key only shows up at the first
  lookup. Then your AI is told that Ordrestyring has refused the key, and that
  the connection must be set up again from the portal.
* **Time registrations only show the cost price:** `list_case_hours` and
  `get_case_work_summary` give the number of registrations and their total cost price. They
  do not give the number of hours, employee, hour type or sales price. The case's
  financial overview (`list_cases` and `get_case`) does, however, contain hours and materials at
  cost and sales price for the whole case. If you need more details, your AI can
  try to fetch them with `graphql_query`.
* **Material cost applies to the whole case:** in `get_case_work_summary`, hours and
  invoices are limited by the period, but the material cost is always the case's total figure.
* **The search is limited:** `find_cases` only searches the most recently updated cases
  (600 by default, at most 1,000). A case that has not been changed for a long time is not found
  that way. Use the case's id instead, or page through the cases with
  `list_cases`.
* **Large extracts are limited:** the tools for hours and invoices return at most
  2,000 rows per call (default 500) and mark the response if there are more.
* **Ordrestyring limits the number of calls:** if a lookup hits Ordrestyring's
  limit, your AI is told to wait a moment.
* **Some errors are general:** for example a refused write query, a response that is too large
  from the advanced tools and a start date after the end date only give the
  general error "Tool invocation failed." The same happens if Ordrestyring does not
  answer in time. The explanatory error messages are in
  [Connect Ordrestyring](https://docs.consile.ai/en/connect/connect-ordrestyring.md#if-a-lookup-fails).

Is something not working as expected? See [Troubleshooting](https://docs.consile.ai/en/troubleshooting.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.