Skip to content

Connect EasyEcom to ChatGPT: Sync Inventory, Orders & B2B Workflows

Learn how to connect EasyEcom to ChatGPT using Truto's managed MCP servers. Automate B2B orders, sync inventory, and orchestrate warehouse workflows.

Uday Gajavalli Uday Gajavalli · · 10 min read
Connect EasyEcom to ChatGPT: Sync Inventory, Orders & B2B Workflows

If you need to connect EasyEcom to ChatGPT to automate warehouse workflows, sync multi-channel inventory, or manage B2B and B2C purchase orders, you need a Model Context Protocol (MCP) server. This server acts as the translation layer between ChatGPT's function-calling agent and EasyEcom's REST APIs. You can either spend weeks building, hosting, and maintaining a custom MCP server, 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 EasyEcom to Claude or explore our broader architectural overview on connecting EasyEcom to AI Agents.

Giving a Large Language Model (LLM) read and write access to an omnichannel inventory system like EasyEcom is an engineering challenge. You have to handle complex token rotation tied to specific warehouse locations, map dynamic polymorphic order payloads, and standardize pagination across dozens of endpoints. Every time the API changes, your custom server code must be updated and redeployed.

This guide breaks down exactly how to use Truto to generate a secure, managed MCP server for EasyEcom, connect it natively to ChatGPT, and execute complex logistics and B2B workflows using natural language.

The Engineering Reality of the EasyEcom API

A custom MCP server is a self-hosted integration layer. While the open MCP standard provides a predictable JSON-RPC interface for LLMs to discover tools, implementing it against EasyEcom's highly specific API architecture is exceptionally painful for engineering teams.

If you decide to build a custom MCP server for EasyEcom, you own the entire API lifecycle. Here are the specific integration challenges that break standard CRUD assumptions when working with EasyEcom:

Location-Bound JWT Authentication

Unlike modern SaaS platforms that use a straightforward OAuth 2.0 flow or static Bearer tokens, EasyEcom requires a localized authentication strategy. To get an active session, you must call the authentication endpoint with an email, password, and a specific location_key. The resulting JWT is valid for 90 days but is tied strictly to that warehouse location. If your LLM needs to check inventory across multiple locations, your custom MCP server must store, rotate, and manage multiple JWTs concurrently, refreshing them proactively before they expire.

Polymorphic Order Endpoints

Standard REST APIs usually separate resources by type (e.g., /api/b2b-orders and /api/b2c-orders). EasyEcom consolidates multiple order modalities into single endpoints. For instance, creating an order relies on the orderType flag (B2C, B2B, or Stock Transfer Node/STN). This forces your MCP server to maintain incredibly complex JSON schemas for the LLM. If the LLM generates a B2B payload but passes the orderType as B2C, the request fails. Writing dynamic JSON Schema definitions that accurately guide an LLM through these conditional requirements requires significant custom code.

Divergent Asynchronous Inventory Patterns

Updating inventory in EasyEcom differs entirely based on the customer's account plan. If a user is on a Non-WMS plan, bulk inventory updates happen via an asynchronous batch endpoint (create_a_easy_ecom_batch_inventory_update) requiring batch codes and expiry dates. If they are on a WMS plan, the workflows change entirely. A custom MCP server must query the account state and conditionally expose different tools to ChatGPT based on the account's feature flags, otherwise the LLM will hallucinate unsupported operations.

How to Generate an EasyEcom MCP Server with Truto

Truto abstracts away the JWT rotation, schema mapping, and endpoint documentation. It auto-generates MCP tools dynamically based on EasyEcom's API definitions. You can create an MCP server scoped to a specific EasyEcom account in two ways: via the Truto UI or programmatically via the REST API.

Method 1: Generating the Server via the Truto UI

For ad-hoc agent building, the Truto dashboard provides a visual interface for generating MCP URLs.

  1. Log into your Truto dashboard and navigate to the Integrated Accounts section.
  2. Select your connected EasyEcom account (or connect a new one using the respective credentials and location key).
  3. Click the MCP Servers tab on the integrated account detail page.
  4. Click Create MCP Server.
  5. Select your desired configuration. You can filter the server to only allow read methods or restrict it to specific tags like inventory or orders.
  6. Click Save and copy the generated MCP server URL (e.g., https://api.truto.one/mcp/<secure-token>).

This URL is your self-contained integration layer. It handles the JSON-RPC routing and maps LLM arguments to the underlying EasyEcom API.

Method 2: Generating the Server via the API

For production workflows, you will likely want to provision MCP servers programmatically. This allows you to generate short-lived, highly scoped MCP servers on the fly for your users.

Endpoint: POST https://api.truto.one/integrated-account/:integrated_account_id/mcp

Headers:

  • Authorization: Bearer <YOUR_TRUTO_API_TOKEN>
  • Content-Type: application/json

Request Body:

{
  "name": "ChatGPT Inventory Ops Manager",
  "config": {
    "methods": ["read", "write"],
    "tags": ["inventory", "orders", "purchase_orders"]
  },
  "expires_at": "2026-12-31T23:59:59Z"
}

The API validates that the requested tags and methods actually yield valid tools. If successful, it stores a hashed representation of the token in distributed key-value storage and returns the endpoint:

{
  "id": "mcp_srv_98765xyz",
  "name": "ChatGPT Inventory Ops Manager",
  "url": "https://api.truto.one/mcp/a1b2c3d4e5f6..."
}

Treat this URL like a secret. It carries the routing logic and authentication required to execute actions against the specified EasyEcom account.

Connecting the MCP Server to ChatGPT

Once you have your Truto MCP URL, connecting it to ChatGPT takes only a few steps. You can configure this directly in the ChatGPT UI or use a manual configuration file for local development.

Method 1: Via the ChatGPT UI (Custom Connectors)

If you have a ChatGPT Pro, Plus, Business, Enterprise, or Education account, you can add custom connectors directly in the interface.

  1. Open ChatGPT and click your profile picture in the bottom left.
  2. Go to Settings -> Apps -> Advanced settings.
  3. Toggle on Developer mode (MCP features are actively managed under this section).
  4. Under the MCP servers or Custom Connectors section, click Add.
  5. Enter a recognizable name (e.g., "EasyEcom Truto Connector").
  6. Paste your generated Truto MCP URL into the Server URL field.
  7. Save your settings. ChatGPT will instantly perform a handshake with the endpoint, fetch the available EasyEcom tools, and make them available to your agent.

Method 2: Via Manual Config File (SSE Client)

If you are running a local instance of an MCP client, LangChain wrapper, or testing via the CLI, you can connect using the Server-Sent Events (SSE) transport layer. Truto supports the open @modelcontextprotocol/server-sse package.

Create an mcp-config.json file:

{
  "mcpServers": {
    "easyecom_truto": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-sse",
        "--url",
        "https://api.truto.one/mcp/<YOUR_SECURE_TOKEN>"
      ]
    }
  }
}

Run your client referencing this config file. The client will negotiate capabilities with the Truto router and automatically mount the EasyEcom endpoints as callable functions.

EasyEcom Hero Tools for ChatGPT

Truto exposes the entirety of the EasyEcom API, but here are the highest-leverage tools for automating warehouse and order operations via LLM.

list_all_easy_ecom_orders

Retrieves a comprehensive list of all B2B, B2C, and STN orders. Truto handles the pagination automatically, resolving nextUrl parameters behind the scenes. This is critical for building agents that need to audit daily order volumes or find specific transactions based on date ranges.

"Fetch all pending orders created in the last 24 hours. Summarize the total value of B2B vs B2C orders."

create_a_easy_ecom_business_order

This single endpoint acts as the polymorphic engine for creating multiple order types in EasyEcom. By defining the orderType argument, ChatGPT can insert wholesale bulk orders or manual retail orders. The LLM processes the flat input namespace and correctly maps parameters like marketplace_id and shippingMethod.

"Draft a new B2B business order for our wholesale partner 'Acme Corp'. The order includes 50 units of SKU 'WIDGET-X1' at a unit price of $12.50."

list_all_easy_ecom_inventory

Retrieves stock levels across the entire system. Truto injects query schema descriptions that guide ChatGPT to use parameters like includeLocations so the model knows exactly how to ask for multi-warehouse breakdowns.

"Check the current inventory levels for SKU 'DESK-CHAIR-BLU'. Make sure to include the breakdown by warehouse location."

create_a_easy_ecom_purchase_order

Generates a Purchase Order for external vendors. By default, EasyEcom sets the status to "Waiting for Approval". The LLM can easily map vendor IDs, SKUs, EANs, and expected quantities into the required array structure.

"We are running low on shipping boxes. Create a purchase order for Vendor ID 982 for 500 units of SKU 'BOX-MED'."

create_a_easy_ecom_tracking_status

Updates the tracking and shipment status of a B2B order (AWB). This is highly useful for autonomous customer support agents that need to mark packages as shipped based on incoming carrier webhooks or external triggers.

"Update the tracking status for AWB number '1Z9999999999999999' to 'Shipped' using status ID 4."

list_all_easy_ecom_returns

Fetches all return order data. Truto standardizes the date-range querying so the LLM defaults to fetching the last 7 days of returned data if no specific parameters are provided, preventing heavy, unconstrained database queries.

"Pull the list of all returns processed this week and categorize them by return reason."

For the complete list of available EasyEcom operations and their exact JSON schema requirements, visit the EasyEcom integration page.

Workflows in Action

Connecting a single tool is useful, but true agentic automation happens when ChatGPT strings multiple API calls together to resolve complex intents. Here are two real-world workflows demonstrating how ChatGPT navigates the EasyEcom API via Truto.

Workflow 1: Automated Restocking and PO Generation

An E-commerce Operations Manager wants to ensure they never run out of their best-selling product. They instruct the agent to monitor stock and draft a PO if necessary.

"Check our inventory for SKU 'LAPTOP-STAND-01'. If the available quantity is below 100 across all locations, draft a purchase order for 300 units from Vendor ID 44."

How the agent executes this:

  1. list_all_easy_ecom_inventory: ChatGPT invokes this tool, passing sku: "LAPTOP-STAND-01" and includeLocations: true.
  2. Analyze Data: The agent processes the returned JSON payload, summing the available stock across the locations. It calculates that only 65 units remain.
  3. create_a_easy_ecom_purchase_order: Because the condition was met, the agent calls this tool, passing vendorId: 44, sku: "LAPTOP-STAND-01", and quantity: 300.
  4. Final Response: ChatGPT responds to the user, confirming the stock was at 65 units and that PO #10492 has been successfully drafted and is awaiting approval.
sequenceDiagram
    participant User as User
    participant ChatGPT as "ChatGPT Agent"
    participant MCP as "Truto MCP Server"
    participant EasyEcom as "EasyEcom API"
    User->>ChatGPT: "Check inventory for SKU..."
    ChatGPT->>MCP: Call list_all_easy_ecom_inventory
    MCP->>EasyEcom: GET /inventory?sku=...
    EasyEcom-->>MCP: Returns inventory data
    MCP-->>ChatGPT: Returns parsed JSON schema
    ChatGPT->>MCP: Call create_a_easy_ecom_purchase_order
    MCP->>EasyEcom: POST /purchase-order
    EasyEcom-->>MCP: Returns PO ID
    MCP-->>ChatGPT: Returns success payload
    ChatGPT-->>User: "PO drafted successfully."

Workflow 2: Investigating B2B Order Status

A Wholesale Account Executive needs to update a major client on an order that seems stuck in processing.

"Find the details for B2B order reference 'ACME-Q3-BULK'. Check its current tracking status and let me know if it has been assigned a carrier."

How the agent executes this:

  1. list_all_easy_ecom_order_details: The agent calls this tool, passing reference_code: "ACME-Q3-BULK" to extract the internal invoice ID and basic order payload.
  2. list_all_easy_ecom_tracking_details: The agent takes the retrieved AWB number or reference code from the previous step and passes it to the tracking tool.
  3. Final Response: ChatGPT formats a natural language response detailing exactly where the order is, which carrier was assigned, and the estimated delivery date based on the raw logistics data.

Security and Access Control

Exposing an enterprise resource planning and warehouse system to an AI agent requires strict security boundaries. Truto provides multiple layers of access control built directly into the MCP token architecture:

  • Method Filtering: Limit the server to specific operations. Setting config.methods = ["read"] ensures the LLM can only execute get and list operations, making it impossible for the agent to accidentally overwrite inventory or cancel orders.
  • Tag Filtering: Restrict access to specific API domains. Setting config.tags = ["inventory"] prevents the LLM from accessing customer PII or financial tools.
  • API Token Authentication: By setting require_api_token_auth: true, possession of the MCP URL is no longer enough to execute actions. The client must also provide a valid Truto session or API token, ensuring only authenticated personnel can utilize the LLM tools.
  • Time-to-Live Expirations: Use the expires_at field to grant temporary access. Distributed alarms automatically clean up the database records and edge storage entries the second the TTL expires, leaving zero stale credentials.

Handling Rate Limits and Reliability

When deploying AI agents in production, handling API rate limits is critical. LLMs can easily trigger rate limit errors (HTTP 429) if they decide to loop rapidly over pagination or bulk record fetching.

It is important to note that Truto does not retry, throttle, or apply backoff on rate limit errors.

When the upstream EasyEcom API returns an HTTP 429 Too Many Requests error, Truto passes that error directly back to the caller. However, Truto normalizes the upstream rate limit information into standardized headers (ratelimit-limit, ratelimit-remaining, ratelimit-reset) per the IETF specification.

The caller - or your LLM orchestration framework - is responsible for implementing retry logic and backoff delays based on these standardized headers. This architectural choice prevents silent timeouts and gives your engineering team full control over the execution loop of the agent.

Moving Beyond Brittle Automations

Connecting EasyEcom to ChatGPT transforms your warehouse data from a static dashboard into an interactive, agentic workflow. By utilizing Truto's MCP servers, you bypass the massive engineering overhead of building custom JWT authentication layers, documenting polymorphic payloads, and writing endless REST API mappings.

Instead of hardcoding point-to-point connections, you give your LLM a secure, curated, and standardized set of tools. Your operations team can now query stock, draft purchase orders, and investigate logistics using plain English, backed by enterprise-grade security and dynamic API generation.

FAQ

Can I limit ChatGPT to only read inventory data from EasyEcom?
Yes. When generating the MCP server via Truto, you can use method filtering (e.g., methods: ["read"]) and tag filtering (e.g., tags: ["inventory"]) to strictly prevent the LLM from writing data or accessing unauthorized endpoints.
How does Truto handle EasyEcom's location-based JWT authentication?
Truto fully abstracts the authentication layer. You connect the EasyEcom account once via the Truto dashboard using the location key, and Truto automatically manages and rotates the 90-day JWTs behind the scenes.
Does Truto automatically retry when EasyEcom hits a rate limit?
No. Truto does not retry, throttle, or apply backoff on rate limit errors. It passes the HTTP 429 directly to the caller while normalizing the rate limit data into standard IETF headers (ratelimit-limit, ratelimit-remaining, ratelimit-reset). Your client must handle the retry logic.
How do I connect the MCP server to ChatGPT?
You can connect via the ChatGPT UI by navigating to Settings > Apps > Advanced settings > Developer mode, and adding a Custom Connector with your Truto URL. Alternatively, use the @modelcontextprotocol/server-sse package for manual configuration.

More from our Blog