Synchronizing stock with variants
Guide to stock syncing products with variants in Shoporama.
When you have products with variants (e.g. size and color), inventory is managed per variant. Here's how inventory synchronization works for variants in Shoporama.
Stock per variant
Each variant has its own stock status. If you have a t-shirt in S, M and L, each size has its own stock count. The total stock of the product is the sum of the stock of all variants.
For stock sync to hit the right variant, each variant must have its own unique SKU (item number) in the product's variant list.
Update stock via CSV
You can update stock on variants via CSV import. The file must be semicolon-separated and contain three columns: the variant SKU, quantity and an optional location tag.
TSHIRT-001-S;10; TSHIRT-001-M;15; TSHIRT-001-L;8;
The third column (tag) is optional and indicates a specific warehouse location. Leave it empty if you only have one location.
Update via REST API
Via the REST API you can update stock on a variant by specifying the variant name:
PUT /REST/stock/{product_id} { "count": 10, "variant_name": "M" }
If the product has variants and variant_name is not specified, the API returns an error with a list of available variants.
Shared inventory
If you have multiple online shops, you can use shared inventory to automatically synchronize inventory across shops. When a variant is sold in one shop, stock is automatically pulled in all shops.
Tip to keep in mind
Make sure each variant has a unique SKU. This is the SKU that ties the stock import to the correct variant. If two variants use the same SKU, the system can't decide which one to update.
Do you need help? Contact us at support@shoporama.dk.
Related articles
Show variants not in stock
Guide to display out-of-stock variants in your Shoporama theme so customers can see the full range and sign up for stock alerts.
Shared inventory between webshops
Guide to setting up shared inventory so that two Shoporama webshops draw from the same inventory.
Stock notification: Notify your customers when items are back in stock
Learn how to set up email notifications so your customers can be notified when out-of-stock products are restocked in your Shoporama online store.