Skip to content

Connect Wayfair to ChatGPT: Sync Catalog, Orders, and Inventory

Learn how to connect Wayfair to ChatGPT using a managed MCP server. Automate dropship orders, inventory feeds, and CastleGate WSAs using AI agents.

Riya Sethi Riya Sethi · · 9 min read
Connect Wayfair to ChatGPT: Sync Catalog, Orders, and Inventory

If you need to connect Wayfair to ChatGPT to automate multi-channel fulfillment workflows, sync inventory feeds, or generate Advanced Shipment Notifications (ASNs), you need a Model Context Protocol (MCP) server. This server acts as the translation layer between ChatGPT's tool calls and Wayfair's complex mix of GraphQL and REST APIs. You can either build, host, 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 Claude, check out our guide on connecting Wayfair to Claude or explore our broader architectural overview on connecting Wayfair to AI Agents.

Giving a Large Language Model (LLM) read and write access to an enterprise supplier portal like Wayfair is a massive engineering challenge. You have to handle rigid inventory feed structures, map dynamic product additions, and cleanly separate Dropship operations from CastleGate fulfillment logic. Every time Wayfair updates a mutation schema or alters their shipping advice parameters, your custom server code must be updated, redeployed, and tested.

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

Stop writing boilerplate API integration code. Let Truto generate secure, managed MCP servers for your AI agents in seconds. :::

The Engineering Reality of the Wayfair 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, implementing it against Wayfair's supplier API is exceptionally painful.

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

The GraphQL and REST Schism

Wayfair's API surface is divided into two distinct architectural paradigms. Supplier operations like purchase orders and ASNs typically run on standard REST endpoints, while catalog management, inventory feeds, and product additions are handled via complex GraphQL mutations. An LLM cannot natively guess which paradigm to use. Your custom MCP server must abstract this entirely, defining independent JSON-RPC tools for REST endpoints (e.g., list_all_wayfair_dropship_purchase_orders) and GraphQL operations (e.g., wayfair_inventory_save). You have to unwrap GraphQL envelope errors manually before returning them to the LLM, otherwise, the agent will interpret a 200 OK HTTP status as a success even if the mutation failed internally.

Dropship vs CastleGate Partitioning

Wayfair fundamentally isolates its fulfillment networks. Dropship operations (where the supplier ships directly to the customer) use entirely different resources, ID structures, and lifecycles than CastleGate operations (where Wayfair manages the warehouse). If a ChatGPT agent tries to acknowledge a CastleGate PO using a Dropship endpoint, the API will reject it. Creating an intelligent MCP server means generating distinct tools for wayfair_dropship_purchase_orders_accept versus wayfair_castlegate_purchase_orders_acknowledge and enforcing strict input schemas so the LLM doesn't hallucinate cross-network commands.

Strict Inventory Feed Semantics

Wayfair does not allow simple item-by-item inventory updates. Instead, you must submit inventory feeds via the SaveInventory GraphQL mutation. These feeds must be declared as either TRUE_UP (a full reconciliation) or DIFFERENTIAL (partial updates). Wayfair requires a TRUE_UP feed at least every 24 hours, and limits the sandbox environment to TRUE_UP only with a strict 500-item maximum limit. Expecting an LLM to remember these stateful feed semantics is a recipe for failure; your integration layer must handle the feed assembly.

Rate Limiting and Backoff Strictness

Wayfair enforces aggressive rate limits on critical operations. For example, acknowledging CastleGate purchase orders is strictly limited to 1 request per 3 seconds.

Note on Truto's architecture: Truto does not retry, throttle, or apply backoff on rate limit errors automatically. When Wayfair returns an HTTP 429, 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 caller (in this case, your AI agent framework or ChatGPT client) is entirely responsible for interpreting these headers and executing the appropriate retry/backoff logic.

Wayfair to ChatGPT Quickstart Guide

If you want the fastest path from a fresh Truto account to ChatGPT successfully calling the Wayfair API, follow these steps.

What you need:

  • A Truto account with API access.
  • Wayfair supplier credentials (client ID and secret) for the OAuth flow.
  • A ChatGPT Pro, Plus, Business, Enterprise, or Education seat with Developer mode enabled.

Step 1: Connect Wayfair to Truto

In the Truto dashboard, navigate to Integrated Accounts -> New Integrated Account, select Wayfair, and execute the OAuth flow. Truto securely manages the token lifecycle, so ChatGPT never encounters an expired bearer credential.

Step 2: Generate the Wayfair MCP Server

You can generate the MCP endpoint through the UI or the API.

Method A: Via the Truto UI

  1. Navigate to the integrated account page for your Wayfair connection.
  2. Click the MCP Servers tab.
  3. Click Create MCP Server.
  4. Select your desired configuration (e.g., allow read and write methods, restrict to specific tags).
  5. Copy the generated MCP server URL.

Method B: Via the API Alternatively, generate the server programmatically. This is useful when provisioning AI access dynamically:

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": "Wayfair Supplier Ops MCP",
    "config": {
      "methods": ["read", "write"],
      "tags": ["purchase_orders", "inventory", "catalog"]
    }
  }'

The API returns a secure URL like https://api.truto.one/mcp/<token>. This single URL handles both routing and authentication—treat it as a highly sensitive secret.

Step 3: Connect the MCP Server to ChatGPT

You can plug this URL into ChatGPT natively or use an SSE transport config.

Method A: Via the ChatGPT UI (Custom Connector)

  1. Open ChatGPT and navigate to Settings -> Apps -> Advanced settings.
  2. Enable Developer mode.
  3. Under MCP servers / Custom connectors, click add.
  4. Name the connector (e.g., "Wayfair Ops via Truto").
  5. Paste the Truto MCP URL into the Server URL field and save.

ChatGPT will immediately ping the endpoint, execute an MCP handshake, and discover the allowed Wayfair tools.

Method B: Via manual config file (SSE Transport) If you are testing via an MCP client that requires a standard configuration file, you can map the remote SSE endpoint using the official MCP SSE transport package:

{
  "mcpServers": {
    "wayfair-ops": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-sse",
        "--url",
        "https://api.truto.one/mcp/<your-secure-token>"
      ]
    }
  }
}

Hero Tools for Wayfair Operations

When you connect this MCP server, ChatGPT gains access to a normalized interface for the Wayfair API. Here are the highest-leverage operations your agents can execute.

List Dropship Purchase Orders

Tool: list_all_wayfair_dropship_purchase_orders

This tool retrieves open dropship purchase orders. It returns critical logistical data including the poNumber, supplier addresses, customer shipping details, warehouse assignments, and product arrays. By passing has_response=false, you restrict the query to POs that have not yet been acknowledged, saving context window space.

"Find all open Wayfair dropship purchase orders that haven't been responded to yet. Give me a summary table with the PO number, order date, and the SKUs requested."

Ship Dropship Purchase Orders (ASN)

Tool: wayfair_dropship_purchase_orders_ship

Generating an Advanced Shipment Notification (ASN) is how you confirm items have been picked, packed, and shipped. This tool handles the ASN creation, updating customer tracking information on Wayfair's side. You can submit up to 10 line items per request.

"Generate an ASN for purchase order PO-55421. Mark line item SKU 'CHAIR-01' as shipped with a quantity of 2, using FedEx tracking number 1Z9999999999."

Save Inventory Feed

Tool: wayfair_inventory_save

This tool submits an inventory feed via the Wayfair GraphQL API. You can specify a TRUE_UP full sync or a DIFFERENTIAL update. It returns a transaction handle and status to monitor the asynchronous ingestion of the data.

"We just received a new shipment of inventory. Submit a differential inventory feed to Wayfair indicating that SKU 'DESK-05' now has 45 units available in the Dallas warehouse."

List CastleGate Shipping Advices

Tool: list_all_wayfair_castlegate_shipping_advices

CastleGate operations rely on Warehouse Shipping Advices (WSAs) instead of standard dropship ASNs. This tool pulls WSAs, exposing the wsaId, shipDate, carrierCode, and the ordered vs. shipped quantities.

"Pull the latest CastleGate shipping advices for our account. I need to know which WSAs from yesterday have a carrier code of UPS and how many units they shipped."

Create Multi-Channel Fulfillment Order

Tool: create_a_wayfair_fulfillment_order

Wayfair allows suppliers to use the CastleGate network to fulfill off-platform orders (e.g., from your own Shopify store). This tool creates a multi-channel fulfillment request, handling customer routing, item selection, and shipping velocity specifications.

"Create a new Wayfair fulfillment order for a Shopify customer. Ship one unit of 'LAMP-09' to John Doe at 123 Main St, Austin TX, using standard shipping speed."

Update Catalog Item

Tool: update_a_wayfair_catalog_item_by_id

This tool allows the agent to modify live catalog data (like item names and taxonomy attributes) for specific market contexts via the GraphQL API. It supports batching up to 500 catalog entities per request.

"Update the catalog item for supplier part number 'RUG-8x10-BLUE'. Change the item name to 'Ocean Blue Geometric Area Rug - 8x10' for the US market context."

To view the complete inventory of available Wayfair endpoints, schemas, and required parameters, visit the Wayfair integration page.

Workflows in Action

With MCP, ChatGPT can chain these tools together to execute multi-step operations without requiring human intervention. Here are two real-world scenarios.

Scenario 1: Dropship Triage and Fulfillment

Supply chain managers often need to bulk-process pending dropship orders at the start of a shift.

"Check for any open dropship purchase orders that haven't been acknowledged yet. For any orders containing the SKU 'SOFA-BLK', accept the line items and immediately generate a shipping notice using tracking numbers from the FedEx file I just uploaded."

How the agent executes this:

  1. Calls list_all_wayfair_dropship_purchase_orders with has_response=false to fetch the queue.
  2. Iterates over the returned JSON, looking for the target SKU.
  3. For matching POs, calls wayfair_dropship_purchase_orders_accept to formally acknowledge the order with the required ship_speed.
  4. Reads the provided file to extract tracking numbers.
  5. Calls wayfair_dropship_purchase_orders_ship to push the ASNs to Wayfair, providing the carrier and tracking details.
sequenceDiagram
    participant User as Supply Chain Manager
    participant Agent as ChatGPT (MCP Client)
    participant Truto as Truto MCP Server
    participant Wayfair as Wayfair API

    User->>Agent: "Accept open dropship orders for SOFA-BLK..."
    Agent->>Truto: call list_all_wayfair_dropship_purchase_orders<br>(has_response=false)
    Truto->>Wayfair: GET /v1/purchaseOrders
    Wayfair-->>Truto: Return 3 open POs
    Truto-->>Agent: Forward POs
    
    Agent->>Truto: call wayfair_dropship_purchase_orders_accept<br>(po_number: "PO-123")
    Truto->>Wayfair: POST /v1/purchaseOrders/PO-123/accept
    Wayfair-->>Truto: 200 OK
    Truto-->>Agent: Acknowledgement confirmed
    
    Agent->>Truto: call wayfair_dropship_purchase_orders_ship<br>(notice data)
    Truto->>Wayfair: POST /v1/purchaseOrders/PO-123/ship
    Wayfair-->>Truto: 200 OK
    Truto-->>Agent: ASN generated
    Agent-->>User: "Orders accepted and ASNs generated successfully."

Scenario 2: CastleGate Discrepancy Auditing

Warehouse shipping advices don't always match the requested quantities. An LLM can automate discrepancy detection.

"Pull the CastleGate shipping advices from the last 7 days. Compare the 'quantityOrdered' to the 'quantityShipped' for all items. Give me a list of any WSAs where the shipped amount was less than what we requested, and draft an email to the logistics team with the affected wsaIds."

How the agent executes this:

  1. Calls list_all_wayfair_castlegate_shipping_advices passing the from_date argument.
  2. In-memory, the LLM parses the products array for every returned WSA.
  3. The agent mathematically compares quantityOrdered vs quantityShipped.
  4. If a discrepancy is found, the agent stores the wsaId.
  5. The agent formats the output and drafts the email text directly in the chat interface.

Security and Access Control

Exposing an enterprise supplier system like Wayfair to an AI agent requires strict guardrails. Truto's MCP architecture provides several layers of control built directly into the server generation payload:

  • Method Filtering (config.methods): Restrict the server to specific operation types. Setting this to ["read"] ensures the LLM can pull shipping advices or POs, but physically cannot accept orders, submit ASNs, or mutate catalog items.
  • Tag Filtering (config.tags): Filter access down to specific operational domains. You can limit an agent to only interacting with tools tagged as inventory, hiding the purchase_orders or catalog tools entirely.
  • Token Expiration (expires_at): Provide temporary access to automated agents or contractors. Once the timestamp is reached, the underlying KV store automatically expires the token and a Durable Object alarm purges the record, immediately cutting off access.
  • Secondary Authentication (require_api_token_auth): For internal tools, possessing the MCP URL isn't enough. Enabling this flag forces the MCP client to also pass a valid Truto API token in the Authorization header, enforcing identity-based access control.

Automate Multi-Channel Logistics

Building a custom integration to manage Wayfair dropship logic, GraphQL catalog mutations, and rigid inventory feeds is an exhausting infrastructure project. Maintaining that connection when an AI agent needs realtime context adds even more overhead.

By leveraging Truto's dynamically generated MCP servers, you eliminate the need to write boilerplate routing code, manage OAuth refresh cycles, or figure out how to feed complex e-commerce schemas to ChatGPT. You define the access rules, generate the URL, and let the LLM orchestrate the supply chain.

Ready to connect your AI agents to Wayfair? Let Truto generate your secure MCP servers instantly. :::

FAQ

How does Truto handle Wayfair's rate limits for AI agents?
Truto does not auto-retry or apply backoff logic to rate limited requests. If Wayfair returns an HTTP 429, Truto passes the error back to the caller and normalizes the upstream limit info into standardized headers (ratelimit-limit, ratelimit-remaining, ratelimit-reset). The MCP client is responsible for handling retries.
Can I prevent ChatGPT from modifying Wayfair catalog data?
Yes. When generating the MCP server in Truto, you can use method filtering to restrict the agent to read-only operations (e.g., config.methods: ["read"]), preventing any GraphQL mutations or REST POST requests.
Does this MCP server support both Dropship and CastleGate operations?
Yes. Truto exposes tools for both fulfillment networks, including Dropship PO acceptances, ASNs, and CastleGate warehouse shipping advices (WSAs).

More from our Blog