Cannot set OrderCreateOptionsInput.inventoryBehaviour in orderCreate mutation

Topic summary

A developer is encountering an error when attempting to use the inventoryBehavior field within OrderCreateOptionsInput for the orderCreate GraphQL mutation (API version 2025-01).

The Issue:

  • When setting inventoryBehavior: "DECREMENT_OBEYING_POLICY" in the options variable, the API returns an error stating the field “is not defined on OrderCreateOptionsInput”
  • Other fields in OrderCreateOptionsInput (like sendReceipt) work correctly, suggesting this is specific to inventoryBehavior

Current Status:

  • The developer suspects a syntax error but is confused by the error message, which appears contradictory—claiming both that the field doesn’t exist and that the value is invalid
  • No resolution has been provided yet; the issue remains open and unanswered
Summarized with AI on October 31. AI used: claude-sonnet-4-5-20250929.

We are attempting to create orders using the orderCreate mutation on GraphQL version 2025-01.

Sample query:

mutation OrderCreate($order: OrderCreateOrderInput!, $options: OrderCreateOptionsInput) {
  orderCreate(order: $order, options: $options) {
    userErrors {
      field
      message
    }
    order {
      id
      displayFinancialStatus
      customer {
        email
        firstName
        lastName
      }
    }
  }
}

If I set the variables with the following data:

{
    "order":{
       ... # ommited for brevity
    },
    "options":{
        "inventoryBehavior":"DECREMENT_OBEYING_POLICY"
    }
}

I get back the following response:

{
    "errors": [
        {
            "message": "Variable $options of type OrderCreateOptionsInput was provided invalid value for inventoryBehavior (Field is not defined on OrderCreateOptionsInput)",
            "locations": [
                {
                    "line": 1,
                    "column": 54
                }
            ],
            "extensions": {
                "value": {
                    "inventoryBehavior": "DECREMENT_OBEYING_POLICY"
                },
                "problems": [
                    {
                        "path": [
                            "inventoryBehavior"
                        ],
                        "explanation": "Field is not defined on OrderCreateOptionsInput"
                    }
                ]
            }
        }
    ]
}

Other options fields (such as OrderCreateOptionsInput.sendReceipt) don’t exhibit this behavior, so I’m assuming I’m making a basic syntactical error of some sort. The actual error is confusing, as it appears to say both that the field inventoryBehavior does not exist (is not defined) and the value is invalid.