Connect Cin7 Core to ChatGPT: Automate Orders, Stocks, and Invoices
A step-by-step engineering guide to connecting Cin7 Core to ChatGPT. Learn how to generate a managed MCP server to automate inventory and complex B2B sales workflows.
If you need to connect Cin7 Core to ChatGPT to automate complex supply chain operations, manage B2B sales orders, or orchestrate warehouse stock transfers, you need a Model Context Protocol (MCP) server. This server acts as a translation layer, interpreting the LLM's tool calls and executing them against Cin7 Core's REST APIs. You can either build and maintain this infrastructure yourself, or use a managed integration platform like Truto to dynamically generate a secure, authenticated MCP server URL in seconds.
If your team uses Claude, check out our guide on connecting Cin7 Core to Claude or explore our broader architectural overview on connecting Cin7 Core to AI Agents.
Giving a Large Language Model (LLM) read and write access to an enterprise ERP and inventory management system like Cin7 Core presents immediate engineering challenges. You must handle heavily nested order payloads, navigate strict state machines (like DRAFT vs AUTHORISED), and manage complex task-based workflows where operations are split across multiple sequential API calls. Every time a developer adds a new requirement or the API shifts, custom MCP code has to be refactored, redeployed, and tested.
This guide breaks down exactly how to use Truto to generate a secure, managed MCP server for Cin7 Core, connect it natively to ChatGPT, and execute complex supply chain workflows using natural language.
The Engineering Reality of the Cin7 Core API
A custom MCP server is essentially a self-hosted API gateway. While the open MCP standard provides a predictable way for ChatGPT to discover tools, implementing those tools against Cin7 Core's highly specific API architecture requires deep domain knowledge.
If you decide to build a custom MCP server for Cin7 Core, you own the entire integration lifecycle. Here are the specific integration challenges you will encounter:
Task-Based Lifecycle Management
Unlike simpler SaaS platforms where creating an order is a single POST request, Cin7 Core handles operations like Advanced Purchases, Sales, and Disassembly via a Task-based state machine. A sale is not just an "order" record. It is a parent SaleID that dictates a sequence of child tasks: Quote, Order, Pick, Pack, Ship, and Invoice.
If ChatGPT wants to complete an order, your MCP server must expose tools that allow the LLM to fetch the TaskID, authorize the order line items, initiate a fulfillment pack, and finally trigger the shipment. The LLM needs strict schema validation to understand that it must pass a TaskID rather than a standard record ID to downstream endpoints.
Strict Status Validation and Endpoint Deprecation
Cin7 Core enforces rigid state transitions. When POSTing an invoice or a stock received entry, the API only accepts DRAFT or AUTHORISED. If your LLM attempts to pass a status like COMPLETED during creation, the API throws a validation error. Furthermore, Cin7 Core has heavily deprecated "Simple Purchases" in favor of "Advanced Purchases." A custom MCP server requires you to manually prune deprecated endpoints so the LLM does not hallucinate outdated schemas.
Factual Note on Rate Limits and 429 Handling
When exposing ERP APIs to highly concurrent LLM agents, rate limits are an immediate bottleneck. It is critical to understand that Truto does not retry, throttle, or apply backoff on rate limit errors automatically. When the upstream Cin7 Core API returns an HTTP 429 Too Many Requests, Truto passes that error directly back to the caller.
Truto normalizes the upstream rate limit information into standardized headers (ratelimit-limit, ratelimit-remaining, ratelimit-reset) per the IETF specification. The LLM client (or your orchestration framework) is strictly responsible for interpreting these headers and executing retry or backoff logic. Do not build agents assuming the MCP server will absorb rate limit pressure.
Generating a Cin7 Core MCP Server
Truto dynamically derives MCP tool definitions from Cin7 Core's documentation and resource schemas. This means the MCP server is always aligned with the vendor's API surface, complete with JSON Schemas for both query parameters and request bodies.
You can generate an MCP server scoped to a specific Cin7 Core integrated account using either the Truto UI or the API.
Method 1: Via the Truto UI
- Navigate to the Integrated Accounts page in your Truto dashboard.
- Select your connected Cin7 Core integration.
- Click the MCP Servers tab.
- Click Create MCP Server.
- Select your desired configuration (e.g., restrict to
readmethods or specific tags likeinventoryandsales). - Copy the generated MCP server URL (formatted as
https://api.truto.one/mcp/<token>).
Method 2: Via the Truto API
You can programmatically generate an MCP server by sending a POST request to the Truto API. This is ideal for provisioning agent access on the fly within multi-tenant SaaS applications.
curl -X POST https://api.truto.one/integrated-account/<INTEGRATED_ACCOUNT_ID>/mcp \
-H "Authorization: Bearer <TRUTO_API_TOKEN>" \
-H "Content-Type: application/json" \
-d '{
"name": "Cin7 Core Supply Chain Agent",
"config": {
"methods": ["read", "write"],
"tags": ["sales", "products", "advanced_purchases"]
}
}'The API returns a securely hashed token URL. Treat this URL as a secret, as it contains the routing logic and authentication context required to execute calls against the connected Cin7 Core instance.
{
"id": "mcp_abc123",
"name": "Cin7 Core Supply Chain Agent",
"config": {
"methods": ["read", "write"],
"tags": ["sales", "products", "advanced_purchases"]
},
"expires_at": null,
"url": "https://api.truto.one/mcp/a1b2c3d4e5f6..."
}Connecting the MCP Server to ChatGPT
Once you have the Truto MCP URL, providing ChatGPT with access to Cin7 Core requires zero additional backend code. You can connect it directly via the ChatGPT UI or use a manual configuration file for local development frameworks.
Method A: Via the ChatGPT UI
For users on ChatGPT Pro, Plus, Business, Enterprise, or Education tiers:
- Open ChatGPT and navigate to Settings -> Apps -> Advanced settings.
- Toggle Developer mode to the ON position.
- Under the MCP servers / Custom connectors section, click to add a new server.
- Provide a recognizable name (e.g., "Cin7 Core ERP").
- Paste your Truto MCP URL into the Server URL field.
- Click Save.
ChatGPT will immediately perform a handshake with the Truto MCP endpoint, pull down the approved tool schemas, and make them available for natural language queries.
Method B: Via Manual Config File (Local Agents)
If you are running local agents, Claude Desktop, Cursor, or building custom orchestration with @modelcontextprotocol/server-sse, you can connect to the Truto MCP server using standard SSE configurations.
{
"mcpServers": {
"cin7_core_truto": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-sse",
"--url",
"https://api.truto.one/mcp/a1b2c3d4e5f6..."
]
}
}
}Cin7 Core Hero Tools for ChatGPT
When you connect Cin7 Core via Truto's MCP server, the integration's native operations are flattened into descriptive, snake_case tools. Truto automatically injects id, limit, and next_cursor logic where applicable to ensure LLMs can manage pagination flawlessly.
Here are the hero tools most commonly used by supply chain and inventory agents.
1. list_all_cin_7_core_products
This tool allows the LLM to query the core product catalog. It exposes optional filters for SKU, name, or modification dates, and allows the LLM to selectively expand nested arrays like Suppliers, ReorderLevels, and BillOfMaterials.
"Check the Cin7 Core product catalog for SKU 'WIDGET-001'. Include the supplier details and current reorder levels in your lookup."
2. create_a_cin_7_core_sale_order
This is the critical entry point for B2B and B2C sales automation. It initiates a new Sale Order attached to a SaleID. The LLM must supply the SaleID, a valid status (DRAFT or AUTHORISED), and the array of line items with quantities and pricing.
"We just got a wholesale request. Draft a new sale order in Cin7 Core for SaleID 'abc-123'. Add 50 units of 'WIDGET-001' at 15.00 each, and set the status to AUTHORISED."
3. list_all_cin_7_core_stock_transfers
Warehouse orchestration requires moving stock between locations. This tool lists existing stock transfer tasks, allowing the LLM to query the From and To locations, transfer statuses, and specific completion dates.
"List all recent stock transfers moving inventory from the 'East Coast Warehouse' to the 'Retail Storefront'."
4. create_a_cin_7_core_advanced_purchase
Advanced Purchases handle complex supply chain restocks. This tool creates the root purchase record, defining the supplier, tax rules, approaches, and billing/shipping addresses. Once created, the LLM uses the resulting PurchaseID to drive child tasks (put-aways, invoices).
"Create a new Advanced Purchase in Cin7 Core for SupplierID 'sup-999'. Set the shipping address to our main warehouse and use the default tax calculation rule."
5. list_all_cin_7_core_customers
Before creating sales or adjusting credit limits, the agent must look up customer records. This tool fetches customer metadata, including credit limits, child customer relationships, and default currency settings.
"Look up the customer record for 'Acme Corp' in Cin7 Core. What is their current credit limit and default billing currency?"
6. cin_7_core_stockadjustments_bulk_update
When physical counts drift from system records, inventory write-offs and stock adjustments are required. This tool updates an existing stock adjustment task (via TaskID), allowing the agent to finalize new stock lines or push the status to COMPLETED.
"Update the stock adjustment task ID 'adj-555'. Set the status to COMPLETED and apply the new stock lines confirming we wrote off 5 damaged units of SKU 'BOX-02'."
To view the complete schema details, query parameters, and full inventory of available endpoints, visit the Cin7 Core integration page.
Workflows in Action
AI agents excel at orchestrating multi-step workflows. By stringing MCP tools together, ChatGPT can act as a fully autonomous supply chain assistant. Here are two concrete, persona-driven workflows demonstrating Truto's MCP architecture in action.
Workflow 1: Order Generation & Inventory Check
Persona: Sales Representative
"A customer, Acme Corp, wants to order 100 units of the 'Pro Router' (SKU: PR-001). Check if we have enough stock. If we do, create the sale order and authorize it."
Execution Steps:
list_all_cin_7_core_products: The agent searches for SKU "PR-001" and includes stock level parameters to verify if 100 units are available in the primary location.list_all_cin_7_core_customers: The agent queries for "Acme Corp" to retrieve their specificCustomerID, default billing details, and active tax rules.create_a_cin_7_core_sale: The agent generates the root sale record using theCustomerID, obtaining a newSaleID.create_a_cin_7_core_sale_order: Using the newSaleID, the agent attaches the line item (100 units of PR-001) and sets the order status strictly toAUTHORISED.
Result: The LLM replies to the user confirming the order is placed, authorized, and provides the new order number, eliminating four manual steps in the Cin7 UI.
sequenceDiagram
autonumber
participant User as User
participant ChatGPT as ChatGPT
participant Truto as Truto MCP
participant Cin7 as Cin7 Core API
User->>ChatGPT: "Create order for Acme Corp..."
ChatGPT->>Truto: Call list_all_cin_7_core_products (SKU: PR-001)
Truto->>Cin7: GET /Products?SKU=PR-001
Cin7-->>Truto: Product and Stock Data
Truto-->>ChatGPT: Returns schema
ChatGPT->>Truto: Call create_a_cin_7_core_sale
Truto->>Cin7: POST /Sale
Cin7-->>Truto: SaleID: 888-abc
Truto-->>ChatGPT: Returns SaleID
ChatGPT->>Truto: Call create_a_cin_7_core_sale_order (SaleID, Lines)
Truto->>Cin7: POST /Sale/Order
Cin7-->>Truto: Order Authorised
Truto-->>ChatGPT: Success Confirmation
ChatGPT-->>User: "Order authorized successfully!"Workflow 2: Warehouse Restock & Advanced Purchase
Persona: Procurement Manager
"We are critically low on packaging supplies. Initiate an advanced purchase order from 'Global Pack' for 5,000 units of custom boxes. Leave it in draft status for my review."
Execution Steps:
list_all_cin_7_core_suppliers: The agent searches for the vendor "Global Pack" to retrieve theirSupplierIDand default payment terms.create_a_cin_7_core_advanced_purchase: The agent creates the root advanced purchase record using theSupplierID, establishing the framework for the complex purchase.create_a_cin_7_core_advanced_purchase_order(assuming mapped via LLM context): The agent attaches the line items (5,000 boxes) to thePurchaseIDand leaves the status asDRAFT.
Result: The LLM confirms the advanced purchase has been staged. The procurement manager can simply log into Cin7 Core, review the draft, and approve it.
Security and Access Control
Exposing a powerful ERP to an AI agent demands rigorous security guardrails. Truto's MCP token architecture ensures you retain absolute control over what the LLM can execute.
- Method Filtering: You can restrict an MCP server to strictly read-only operations by passing
"methods": ["read"]. This allows the LLM to query inventory and order status without the ability to create or mutate records. - Tag Filtering: By passing
"tags": ["inventory", "reports"], you force the MCP server to drop all tools unrelated to those domains. The LLM won't even know that financial or CRM endpoints exist. - Time-to-Live (TTL): You can enforce automatic access revocation by defining an
expires_atISO datetime during server creation. Once the timestamp passes, the token is automatically wiped from Truto's edge KV storage. - Secondary Authentication (
require_api_token_auth): For enterprise deployments, you can mandate that the MCP client passes a valid Truto API token in theAuthorizationheader. This guarantees that possession of the MCP URL alone is insufficient to access the Cin7 Core environment.
Rethinking ERP Automation
The sheer complexity of ERP APIs has historically kept them siloed from modern automation frameworks. Mapping nested TaskIDs, strict state machine validations, and volatile rate limits into LLM-friendly schemas is a massive engineering drain.
By leveraging Truto to instantly generate documentation-driven MCP servers, you eliminate the need to write and maintain point-to-point connector code. Your AI agents get dynamic, authenticated access to Cin7 Core's native endpoints, complete with robust schema definitions—allowing your engineering team to focus on building features, not integration boilerplate.
FAQ
- Does Truto automatically handle Cin7 Core API rate limits for ChatGPT?
- No. Truto normalizes upstream rate limit info into standardized IETF headers (ratelimit-limit, ratelimit-remaining, ratelimit-reset) and passes HTTP 429 errors directly to the caller. The LLM client or agent framework is responsible for implementing retry and backoff logic.
- How do I filter which Cin7 Core operations ChatGPT can access?
- When generating the MCP server via Truto, you can pass a configuration object with 'methods' (e.g., 'read', 'write') and 'tags' (e.g., 'products', 'sales'). This guarantees the LLM only sees the endpoints you explicitly allow.
- Can ChatGPT create Advanced Purchases in Cin7 Core?
- Yes. The Truto MCP server exposes endpoints like 'create_a_cin_7_core_advanced_purchase'. ChatGPT can dynamically format the required supplier, tax rule, and nested line items to generate valid purchases.
- Do I need to maintain custom API wrappers when Cin7 Core changes its schema?
- No. Truto dynamically derives the MCP tool definitions (JSON-RPC schemas) directly from Cin7 Core's API documentation and endpoint definitions. When the underlying API updates, the tools adapt automatically.