{"title":"Resolve order product quantity sync errors","slug":"resolve-order-product-quantity-sync-errors","url":"https://support.storeconnect.com/articles/resolve-order-product-quantity-sync-errors","url_markdown":"https://support.storeconnect.com/articles/resolve-order-product-quantity-sync-errors.md","subtitle":null,"summary":"Fix FIELD_INTEGRITY_EXCEPTION sync errors caused by zero or negative quantity order products by enabling the relevant setting in Salesforce Order Settings.","type":"Help_Documentation","video_url":"","keywords":"FIELD_INTEGRITY_EXCEPTION, zero quantity, negative quantity, order product, OrderItem, sync error, order settings, quantity, cancelled order line, POS return","last_modified":"2026-09-15T02:32:04+0000","body_markdown":"## Symptoms\n\nYou see a sync error in the [sync error tool](sync-error-tool) with the status code **FIELD_INTEGRITY_EXCEPTION** and a message similar to one of the following:\n\n- \"Can't save order products with quantities of zero: Quantity\"\n- \"Can't save order products with negative quantities: Quantity\"\n\nThe affected object is **Order Product** (`OrderItem`).\n\n## Cause\n\nSalesforce rejects Order Products with a quantity of zero or a negative quantity unless the matching setting is enabled in **Order Settings**. Both settings are off by default, so the first order that contains one of these lines fails to sync.\n\nBoth kinds of line come from the point of sale:\n\n- **Zero quantity**: a line cancelled on an open order. Cancelling a line sets its quantity to `0` and mirrors that to the linked Order Product, so the cancelled line stays on the order as a record of what was removed rather than disappearing. An order whose lines were all cancelled has every Order Product at quantity `0`.\n- **Negative quantity**: a return or refund line. Returns are written as negative-quantity lines that reduce the order total.\n\nThe online store cannot produce either. Zero and negative quantity items are removed from the cart before checkout.\n\n## Resolution\n\n### Step 1: Enable the relevant setting in Order Settings\n\n1. In Salesforce, go to **Setup**.\n2. In the Quick Find box, search for **Order Settings**.\n3. Open **Order Settings**.\n4. Check the setting that matches the error message:\n   - For \"quantities of zero\", check **Enable Zero Quantity**.\n   - For \"negative quantities\", check **Enable Negative Quantity**.\n5. Click **Save**.\n\n:::note\nYou can turn these settings back off later, but Salesforce then refuses to activate any order that still contains a zero or negative quantity line. Existing records stay visible and editable. Leave the settings on for as long as your registers can cancel lines or process returns.\n:::\n\n### Step 2: Re-sync the failed records\n\n1. Go to the [sync error tool](sync-error-tool) in StoreConnect.\n2. Select the checkbox next to all affected Order Product records.\n3. Click the **Re-sync** button.\n\nThe records should now sync successfully.\n\n:::tip\nSelect all records in the Sync Errors list when re-syncing, not just the first one. Related downstream errors (such as `INVALID_FIELD` on order item taxes or payment items) will also clear once the root Order Product records sync.\n:::\n\n## Verification\n\n1. Confirm the sync errors no longer appear in the [sync error tool](sync-error-tool).\n2. Open the affected order in Salesforce and confirm the Order Products are present with the expected quantities, including any cancelled lines at quantity `0`.\n\n## Prevention\n\n- **Enable both settings before you take POS orders**: a register can cancel a line or process a return at any time, so check **Enable Zero Quantity** and **Enable Negative Quantity** in **Order Settings** as part of your initial configuration.\n- **Check the sync error tool after your first cancellation or return**: a rejected Order Product also blocks the order item tax and payment item records behind it, so catching the setting early keeps one order from producing a page of errors."}