Shopify Cart Addition and Checkout Inventory Allocation Verification Results

Tadashi Shigeoka ·  Tue, April 12, 2022

We’ll introduce the verification results of Shopify’s inventory allocation logic when adding products to cart and at checkout.

Shopify | ショッピファイ

Background: Shopify's Inventory Allocation Logic

When purchasing from an EC site after adding products to cart in Shopify, we verified the inventory allocation logic to prevent issues caused by inventory being taken by other customers.

This article verifies the content from 在庫数のマイナスについて - Shopify Community.

Also, we’ve introduced similar verification results in Shopify POS で商品をカート追加時の在庫引当の検証結果, so please check it out as well.

Shopify Inventory Allocation Logic Verification - Shopify Payments Edition

Verification Procedure - Shopify Payments Edition

  1. Browser A (Chrome) Add inventory to cart -> Check inventory count
  2. Browser B (Safari) Add inventory to cart -> Check inventory count
  3. Browser A (Chrome) Checkout with Shopify Payments [Pay now] -> Check inventory count
  4. Browser B (Safari) Checkout with Shopify Payments [Pay now] -> Check inventory count

Verification Results - Shopify Payments Edition

  1. Browser A (Chrome) Add inventory to cart -> Inventory count: 1
  2. Browser B (Safari) Add inventory to cart -> Inventory count: 1
  3. Browser A (Chrome) Checkout with Shopify Payments [Pay now] -> Inventory count: 0
  4. Browser B (Safari) Checkout with Shopify Payments [Pay now] -> Out of stock -> Inventory count: 0

With Shopify Payments, even when clicking the [Pay now] button simultaneously on the checkout page, inventory is allocated ideally and one results in out of stock.

Shopify Inventory Allocation Logic Verification - Alternative Payment Methods Edition

Verification Procedure - Alternative Payment Methods Edition

  1. Browser A (Chrome) Add inventory to cart -> Check inventory count
  2. Browser B (Safari) Add inventory to cart -> Check inventory count
  3. Browser A (Chrome) Checkout with Shopify Payments -> Check inventory count
  4. Browser B (Safari) Checkout with Amazon Pay -> Check inventory count

Verification Results - Alternative Payment Methods Edition

  1. Browser A (Chrome) Add inventory to cart -> Inventory count: 1
  2. Browser B (Safari) Add inventory to cart -> Inventory count: 1
  3. Browser A (Chrome) Checkout with Shopify Payments -> Inventory count: 0
  4. Browser B (Safari) Checkout with Amazon Pay -> Inventory count: -1

Conclusion: Using Payment Methods Other Than Shopify Payments Can Result in Negative Inventory

From the investigation results, it appears to be a Shopify specification that when payments are processed simultaneously using payment methods other than Shopify Payments, it doesn’t result in payment errors but leads to over-orders and cases where inventory count becomes negative.

Above were the verification results of Shopify’s inventory allocation logic when adding products to cart.

That’s all from the Gemba.