orderCreate mutation bugs

orderCreate Mutation Issue: Product Inventory Not Decreased

Problem Description

I’m experiencing an issue when using the orderCreate mutation in my development store:

Issue: Product Inventory Not Decreased

The inventory levels of products in the created orders are not being automatically decreased, which is causing inventory management problems.

Environment Details

  • Platform: Shopify Development Store
  • API Version: 2025-07
  • Mutation Used: orderCreate
  • Store Type: Development Store

Code Implementation

Here’s my current orderCreate implementation:

mutation orderCreate($input: OrderCreateOrderInput!) {
  orderCreate(input: $input) {
    order {
      id
      name
      fulfillmentStatus
      shippingAddress {
        address1
        city
        country
      }
      lineItems(first: 10) {
        edges {
          node {
            id
            title
            quantity
            requiresShipping
            fulfillmentService
          }
        }
      }
    }
    userErrors {
      field
      message
    }
  }
}

Input Data Structure

{
  "lineItems": [
    {
      "variantId": "gid://shopify/ProductVariant/51086846361732",
      "quantity": 1,
      "requiresShipping": true,
      "fulfillmentService": "manual"
    }
  ],
  "email": "customer@example.com",
  "phone": "080-1234-5678",
  "shippingAddress": {
    "address1": "中区本牧原22-2-106",
    "city": "横浜市",
    "countryCode": "JP",
    "firstName": "太郎",
    "lastName": "試験",
    "phone": "080-1234-5678",
    "provinceCode": "JP-14",
    "zip": "231-0821"
  },
  "shippingLines": [
    {
      "title": "送料無料(20kgまで)",
      "code": "送料無料(20kgまで)",
      "priceSet": {
        "shopMoney": {
          "amount": "0",
          "currencyCode": "JPY"
        }
      }
    }
  ],
  "currency": "JPY",
  "financialStatus": "PAID"
}

Expected vs Actual Behavior

Expected:

  • Inventory: Product inventory should automatically decrease by the ordered quantity when an order is created with financialStatus: "PAID"

Actual:

  • Inventory: No inventory adjustment occurs automatically despite proper order configuration

Troubleshooting Attempts

For Inventory Issue:

  1. :white_check_mark: Set financialStatus: "PAID"
  2. :white_check_mark: Set requiresShipping: true in line items
  3. :white_check_mark: Provided shippingLines with proper structure
  4. :cross_mark: Inventory levels remain unchanged

Questions for the Community

  1. Inventory Management: Does the orderCreate mutation automatically handle inventory adjustments, or do I need to use a separate mutation (like inventoryAdjustQuantities) after order creation?

  2. Development Store Limitations: Are there any known limitations with inventory management in development stores that might cause this behavior?

  3. Fulfillment Requirements: Are there additional fields or specific configurations required for automatic inventory adjustment when creating orders?

  4. Location Configuration: Could the issue be related to location settings or inventory tracking configuration in the development store?

Additional Context

  • The products being ordered are physical products that definitely require shipping
  • The store has proper inventory tracking enabled
  • The location ID is valid and exists in the store
  • The order creation succeeds without errors, but inventory is not adjusted

API Documentation References

Any insights or solutions would be greatly appreciated!


Tags: orderCreate, inventory, fulfillment, development-store, graphql-api

I fixed. Just follow official document to use ‘options‘ argument.