Skip to content

Connect Unleashed to Claude: Handle Sales, Shipments and Returns

A complete engineering guide to connecting Unleashed to Claude using a managed MCP server. Automate sales orders, inventory tracking, and supplier returns.

Uday Gajavalli Uday Gajavalli · · 9 min read

If your team needs to connect Unleashed to Claude to automate inventory tracking, streamline sales orders, or orchestrate complex supplier returns, you need a Model Context Protocol (MCP) server. This server acts as the translation layer between Claude's LLM tool calls and Unleashed's deeply nested REST API. 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. If your team uses ChatGPT, check out our guide on connecting Unleashed to ChatGPT or explore our broader architectural overview on connecting Unleashed to AI Agents.

Giving a Large Language Model read and write access to an inventory management system like Unleashed is a high-stakes engineering challenge. You must handle complex state machines, strict data validation rules, and non-standard JSON payload structures. Every time an LLM attempts to push data, it must navigate Unleashed's specific validation constraints.

This guide breaks down exactly how to use Truto to generate a secure, managed MCP server for Unleashed, connect it natively to Claude, and execute complex supply chain workflows using natural language.

The Engineering Reality of the Unleashed API

A custom MCP server is a self-hosted integration layer. While the open MCP standard provides a predictable way for models to discover tools, the reality of implementing it against specialized B2B APIs is painful. Unleashed is built to manage complex warehousing, manufacturing assemblies, and international supply chains. Its API explicitly reflects that complexity.

If you decide to build a custom Unleashed MCP server, you own the entire integration lifecycle. Here are the specific challenges you will face:

The /Date(ms)/ Format Anomaly Unlike modern APIs that accept standard ISO 8601 datetimes, Unleashed natively returns dates in a legacy Microsoft format: /Date(ms)/. Worse, it explicitly rejects ISO 8601 strings on input payloads. If an LLM tries to send "2024-11-05T14:30:00Z" to create an assembly, the request fails. Truto's managed MCP server abstracts this completely. The auto-generated MCP schemas instruct Claude to send standard ISO formats, and Truto's proxy handles the translation to the /Date(ms)/ format under the hood before hitting the vendor API.

Strict Subtotal and Tax Validations When creating a sales order or purchase order, you cannot just pass a list of line items and let the system calculate the totals. Unleashed enforces strict consistency checks. The payload must include SubTotal, TaxTotal, and Total fields at the root level, and these must mathematically match the exact sum of the nested SalesOrderLines. Furthermore, the Tax object must map to an exact tax code that exists in the account settings. This requires precise schema definitions and instructional descriptions in the MCP tools to ensure the LLM calculates and populates these aggregate fields correctly.

State Machine Endpoints Unleashed heavily utilizes state machines. You cannot simply use a PATCH request to change a Sales Order or Purchase Order status from Parked to Completed. Unleashed requires a specific, separate RPC-style endpoint to transition entity states. A managed MCP server exposes distinct tools like unleashed_sales_orders_complete to handle this state transition, rather than letting the LLM incorrectly guess a RESTful PATCH structure.

Step 1: Generating the Unleashed MCP Server

Truto creates MCP servers dynamically based on your connected Unleashed account. The server derives its tool list directly from Truto's unified integration definitions, meaning you never have to manually map Unleashed's API to JSON-RPC schemas.

You can generate an MCP server via the Truto dashboard or programmatically via the API.

Method A: Via the Truto UI

For administrators setting up an integration for a specific internal workflow:

  1. Log in to your Truto dashboard.
  2. Navigate to the Integrated Accounts page and select your connected Unleashed account.
  3. Click the MCP Servers tab.
  4. Click Create MCP Server.
  5. Select your desired configuration (e.g., name the server "Unleashed Supply Chain", restrict methods to read and write, and apply specific resource tags).
  6. Click Generate and securely copy the resulting MCP server URL.

Method B: Via the Truto API

For developers building AI products that require programmatic provisioning, you can generate MCP servers on the fly using Truto's REST API.

curl -X POST https://api.truto.one/integrated-account/{integrated_account_id}/mcp \
  -H "Authorization: Bearer YOUR_TRUTO_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Unleashed Order Fulfillment Bot",
    "config": {
      "methods": ["read", "write", "custom"]
    }
  }'

The API returns a secure, authenticated URL backed by Truto's infrastructure. Truto handles the hashing, storage, and lifecycle of the underlying token.

{
  "id": "ab12-cd34-ef56",
  "name": "Unleashed Order Fulfillment Bot",
  "config": { "methods": ["read", "write", "custom"] },
  "expires_at": null,
  "url": "https://api.truto.one/mcp/a1b2c3d4e5f6g7h8..."
}

Step 2: Connecting the MCP Server to Claude

Once you have your Truto MCP URL, you can connect it directly to Claude. Because the Truto URL contains a secure cryptographic token tied specifically to your Unleashed integrated account, Claude requires no additional authentication configuration.

Method A: Via the Claude UI

If you are using Claude Desktop or Claude for Enterprise:

  1. Open Claude and navigate to Settings.
  2. Select Integrations (or Connectors in some versions) -> Add MCP Server.
  3. Provide a name (e.g., "Unleashed API").
  4. Paste the Truto MCP URL into the connection field.
  5. Click Add. Claude will immediately perform a protocol handshake, pull the available tool schemas, and make them available to your agent.

Method B: Via Manual Config File

If you are running custom agentic frameworks or utilizing Claude Desktop's local configuration, you can add the server to your claude_desktop_config.json file. Truto provides an SSE (Server-Sent Events) transport wrapper that allows local clients to connect to remote HTTP-based MCP servers.

{
  "mcpServers": {
    "unleashed": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-sse",
        "https://api.truto.one/mcp/a1b2c3d4e5f6g7h8..."
      ]
    }
  }
}

Restart Claude Desktop. The Unleashed tools will now appear in your workspace.

Unleashed Hero Tools for Claude

Truto dynamically generates highly descriptive snake_case tool names based on Unleashed's resources. Here are 6 high-leverage hero tools that transform Claude into a supply chain operative.

1. list_all_unleashed_products

Retrieves a complete list of products from your Unleashed catalog. It includes base pricing, default purchase prices, unit of measure, and associated warehouse inventory levels.

"Claude, list all active products in Unleashed. I need to know the default sell price and current stock level for product code 'WIDGET-01'."

2. list_all_unleashed_sales_orders

Fetches a paginated list of sales orders. It supports advanced filtering by customer, warehouse, date range, status, or specific order number. It returns full nested objects including line items, subtotals, and tracking metadata.

"Fetch all sales orders created this week that are still in the 'Parked' status. Summarize the total revenue held up in these parked orders."

3. create_a_unleashed_sales_order

Generates a new sales order in Unleashed. Because Truto manages date normalization, Claude can simply pass standard ISO strings. The LLM must calculate the SubTotal, TaxTotal, and Total to perfectly match the nested SalesOrderLines.

"Create a sales order for customer 'Acme Corp' (use their customer GUID). Add two units of 'WIDGET-01' at $50 each. Make sure to calculate the 10% tax rate, set the total to $110, and set the status to 'Parked'."

4. unleashed_sales_orders_complete

Triggers the specific RPC state transition to complete a sales order. This formally commits the order, adjusting inventory allocations and updating financial ledgers downstream.

"Take the sales order GUID you just created for Acme Corp and mark it as completed using the complete operation tool."

5. list_all_unleashed_sales_shipments

Retrieves shipping data mapped to specific sales orders. Returns shipment statuses, dispatch dates, assigned warehouses, tracking numbers, and delivery details.

"Check the shipping status for order number SO-99234. If it has been dispatched, give me the tracking details and the carrier name."

6. list_all_unleashed_supplier_returns

Queries the history of inventory returned to suppliers. It includes references to original purchase orders, warehouse locations, and financial adjustments.

"Pull all supplier returns filed against Purchase Order PO-5544. Tell me the total monetary value of the goods we returned."

To view the complete inventory of available Unleashed tools and their JSON schemas, visit the Unleashed integration page.

Workflows in Action

MCP servers transform LLMs from passive query engines into active system operators. Here are two real-world supply chain workflows executed entirely by Claude.

Workflow 1: The Automated Order Fulfillment Lifecycle

Persona: Sales Operations Manager

"We just received email confirmation from Globex Inc. Create a new sales order for them for 50 units of standard office chairs. Calculate standard 5% tax. Once created, immediately mark the order as completed so the warehouse can begin fulfillment."

Execution Steps:

  1. list_all_unleashed_customers: Claude searches for Globex Inc to retrieve their specific CustomerGuid and default currency.
  2. list_all_unleashed_products: Claude searches for "office chair" to retrieve the exact ProductCode and DefaultSellPrice.
  3. create_a_unleashed_sales_order: Claude structures a payload with 50 units, calculates the base subtotal, adds the 5% tax, tallies the total, assigns the order to the Parked status, and executes the creation tool.
  4. unleashed_sales_orders_complete: Claude extracts the newly created Guid from the previous response and calls the specific completion endpoint to transition the order state.
sequenceDiagram
    participant User
    participant Claude as Claude Desktop
    participant MCP as Truto MCP Server
    participant API as Unleashed API

    User->>Claude: "Create order for Globex for 50 chairs, complete it."
    Claude->>MCP: Call tool: list_all_unleashed_customers
    MCP->>API: GET /Customers?customerName=Globex
    API-->>MCP: Return CustomerGuid
    MCP-->>Claude: JSON response
    Claude->>MCP: Call tool: list_all_unleashed_products
    MCP->>API: GET /Products?productDescription=chair
    API-->>MCP: Return Product Code & Price
    MCP-->>Claude: JSON response
    Claude->>MCP: Call tool: create_a_unleashed_sales_order
    MCP->>API: POST /SalesOrders (Status: Parked, Totals calculated)
    API-->>MCP: Return OrderGuid
    MCP-->>Claude: JSON response
    Claude->>MCP: Call tool: unleashed_sales_orders_complete
    MCP->>API: POST /SalesOrders/{OrderGuid}/Complete
    API-->>MCP: 200 OK
    MCP-->>Claude: Success
    Claude-->>User: "Order SO-1025 created and completed for Globex."

Workflow 2: Investigating Stalled Returns

Persona: Warehouse Administrator

"I need an audit of all supplier returns associated with Supplier Code 'TECH-SUPPLY'. Tell me which returns are still pending, which original purchase orders they relate to, and the total value stalled in the return pipeline."

Execution Steps:

  1. list_all_unleashed_supplier_returns: Claude queries returns, filtering by the provided supplier code.
  2. Claude parses the paginated response, filtering the array in memory for returns where Status is not marked complete.
  3. Claude correlates the PurchaseOrder objects inside the return payloads and sums the Total values.
  4. Claude synthesizes the data into a readable summary report, detailing exactly which POs are tied up and the financial liability pending.

Factual Note on API Rate Limits

Unleashed enforces strict rate limits depending on your account tier. When connecting an LLM, you must understand how these limits surface.

Truto does not magically absorb, retry, throttle, or apply backoff logic to rate limit errors. If Claude rapidly triggers multiple tools and the upstream Unleashed API returns an HTTP 429 Too Many Requests, Truto passes that 429 error directly back to the caller.

However, Truto normalizes the upstream rate limit information into standardized HTTP headers per the IETF specification (ratelimit-limit, ratelimit-remaining, ratelimit-reset). The caller (your LLM application or local Claude instance) is entirely responsible for interpreting these headers and executing its own backoff and retry mechanisms.

Security and Access Control

Exposing an ERP or inventory system to an autonomous agent requires strict guardrails. Truto's MCP architecture enforces security at the token level, independent of the LLM prompt.

  • Method Filtering (config.methods): Restrict the server to specific operations. Passing ["read"] ensures Claude can only view inventory and orders, completely neutralizing the risk of accidental deletions or unauthorized order creations.
  • Tag Filtering (config.tags): Group and isolate API domains. You can configure a server to only expose resources tagged as inventory, hiding sensitive financial tools (like invoices and payroll ledgers) from the agent.
  • Extra Authentication (require_api_token_auth): By default, possessing the MCP URL grants access. Enabling this flag forces the caller to also supply a valid Truto API token in the Authorization header, securing deployments where URLs might be exposed in logs.
  • Automatic Expiration (expires_at): Provision short-lived access. Setting an expiration date automatically schedules a background cleanup alarm that destroys the token, severing the LLM's connection instantly without manual intervention.

By leveraging a managed MCP architecture, you offload the friction of OAuth lifecycles, schema mapping, and pagination logic. Truto handles the translation layer, ensuring Claude interacts with Unleashed through standardized, highly documented tools—letting your team focus on building intelligent supply chain workflows rather than wrestling with legacy API formats.

FAQ

How does Truto handle Unleashed's specific date format?
The native Unleashed API expects dates formatted as /Date(ms)/ and actively rejects ISO 8601 formats on input. Truto's proxy layer normalizes this, allowing the LLM to pass standard ISO 8601 dates (e.g., YYYY-MM-DD) which are then correctly mapped to Unleashed's required format upstream.
How are rate limits handled between Claude and Unleashed?
Truto does not retry, throttle, or apply backoff on rate limit errors. When the Unleashed API returns an HTTP 429, Truto passes that error directly to Claude. Truto normalizes upstream rate limit info into standardized headers (ratelimit-limit, ratelimit-remaining, ratelimit-reset) per the IETF spec. The caller or agent framework is responsible for implementing retry and backoff logic.
Can I limit the MCP server to only read operations?
Yes. When creating the MCP server in Truto, you can pass a config object with methods: ["read"]. This ensures the server only generates and exposes GET and LIST operations to the LLM, physically blocking any write or delete attempts.

More from our Blog