Skip to content

Commit 21d6f80

Browse files
author
Jo
committed
first draft
1 parent a2c1587 commit 21d6f80

File tree

9 files changed

+89
-47
lines changed

9 files changed

+89
-47
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Inventories has the following characteristics:
2+
3+
- It is possible for more products to be in carts than there are in stock if the add to cart request quantity is less than available stocks. For example, when available stocks are 100, a user can add 60 to cart 1 and then 50 to cart 1, or user A can add 80 to cart 1, while user B can add 30 to cart 2.
4+
- It is possible for more products to be checked out than there are in stock if the add to cart request quantity is less than the available stocks.
5+
- It is not possible for more stock to be paid for than is in stock.
6+
- It is a race for your customers to pay for an order, and whoever does not pay fast enough, is left disappointed.
7+
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
Managing inventory involves a variety of tasks aimed at ensuring that stock levels are optimized, products are stored correctly, and supply meets demand, efficiently.
2+
3+
Using Inventories, you can:
4+
5+
- identify the source of a stock position.
6+
- explicitly set stock for your locations.
7+
- change stock.
8+
- move stock between locations automatically. Stock positions can be updated in near real-time using batch updates.
9+
- see if there are failures when updating stock positions.
10+
- disable or enable locations.
11+
12+
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
Inventories allows you to optionally manage stock across multiple locations, giving you better control over your inventory and improving stock accuracy. By offering localized stock information and flexible order fulfilment options, you can enhance your customer's shopping experience.
2+
3+
For example, you can use multi-location inventory to support the "Buy Online, Pick Up In-Store" process. Tagging inventory with specific locations, allows you to select a designated location for dispatch when adding stock to a product, ensuring that inventory is accurately tracked and readily available for in-store pickup orders. Multi-location inventory optimizes your fulfillment process by aligning stock with the most appropriate physical locations, improving efficiency and boosting customer satisfaction.
4+
5+
An inventory location is a specific physical or virtual place where stock or inventory is stored, tracked, and managed. Your inventory locations could refer to a warehouse, retail store, distribution center. You may want a virtual inventory location, for example, for promotions. You may want to collect all the products in the promotion virtually in one place within your system, to ensure that promotional stock is reserved and accurately tracked.
6+
7+
In the Inventories API, you can create an inventory location. You can create individual inventory locations, either for a single physical site or for multiple distinct locations.
8+
9+
When creating an inventory location, there are several details, you need to consider the location's details, including name, description, and GPS location. In addition, you can specify an `external_ref` which is a unique attribute that you could use to contain information from an external warehouse system, for example.
10+
11+
In addition, you can import your locations from another company system. See Importing locations.
12+
13+
14+

docs/partials/inventory/multi-location/creating-locations.mdx

Lines changed: 0 additions & 13 deletions
This file was deleted.

docs/partials/inventory/multi-location/managing-locations.mdx

Lines changed: 0 additions & 10 deletions
This file was deleted.

docs/partials/inventory/multi-location/overview.mdx

Lines changed: 0 additions & 22 deletions
This file was deleted.

docs/partials/inventory/overview.mdx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
1-
The Inventory API allows you to manage stock for products at both organization and store levels.
1+
Using Inventories allows you to track stock inventory for products in Elastic Path Composable Commerce at both organization and store levels.
22

3-
Inventory is the quantity of each product that you have in stock. The inventory service allows you and your business to keep track of inventory, optionally at different locations, and including a transactional historic log.
3+
Inventory is the quantity of each product that you have in stock. The inventory service allows you and your business to track inventory, with a transactional historic log, and optionally, manage stock across multiple locations.
4+
5+
You manage inventory using both:
6+
7+
- the [Inventories API](/docs/api/pxm/inventory)
8+
- [Commerce Manager](/docs/commerce-manager/product-experience-manager/Products/manage-product-inventory).
49

510
## What is Inventory?
611

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
The way you track stock levels in Inventories is through transactions. Inventories maintains a transactional historic log. This is a detailed, chronological record of all transactions that have affected inventory levels within a system over time. It serves as an audit trail, ensuring transparency and accountability in Inventories.
2+
3+
## Types of Transactions
4+
5+
In Inventories, stock levels are adjusted or updated through transactions. In other words, you manage stock levels by recording transactions that increase or decrease inventory. For example, increase this stock level by 10 units using the **increment** transaction.
6+
7+
Inventories has the following transaction types:
8+
9+
- **increment** - use this when you want to make products available for purchase, for example, when you have received stock from a supplier.
10+
- **decrement** - use this when you want to remove stock from product inventory.
11+
- **allocate** - use this when you want to allocate stock, normally to a reseller who sells on the stock.
12+
- **deallocate** - use this when you want to deallocate any previously allocated stock.
13+
- **Set** - use this when you want to set stock in Elastic Path Composable Commerce from an external warehousing system.

docs/partials/inventory/workflow.mdx

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
### Order flow
2+
3+
There are three mandatory steps to complete an order in relation to inventory:
4+
5+
1. Added to a cart
6+
2. Checked out
7+
3. Paid
8+
4. Shipped (optional)
9+
10+
#### Unpaid order flow
11+
12+
The following flowchart depicts the process of an unpaid order.
13+
14+
![The order is created from the cart during the checkout process.](/assets/order-flow.png)
15+
16+
#### Payment flow
17+
18+
The following flowchart depicts the process of paying for an order.
19+
20+
![The payment workflow.](/assets/payment-workflow-1.png)
21+
22+
### How stock is managed
23+
24+
Stock is managed as follows:
25+
26+
1. When a customer attempts to add products to a cart, the inventory service checks if there is enough available stock. If there is not enough stock available, you receive a 400 HTTP response with a warning. The response does not describe what products cannot be added, nor does it return how many products are in stock.
27+
2. If a customer successfully adds products to a cart, the customer can checkout to create an unpaid order.
28+
3. A final check on the available stock is performed.
29+
4. After creating the unpaid order, the payment for an order can be taken. When a customer attempts to pay for an order, the inventory service reserves the stock before the payment is processed internally. At any time before the point of payment, a customer might lose their order, if the customer is slower than everyone else.
30+
31+
If the payment fails, the temporary stock allocation is removed, and the stock becomes available again for anyone to buy.
32+
33+
If the payment succeeds, that stock is still allocated, and the items belong to the customer, unless for any reason they are reallocated before shipment. For example, if the customer cancels, or you realize the order is fraudulent, then you can reallocate the inventory.
34+
5. Finally, when the order is marked as shipped, that stock is fully decremented. This means the allocation number is reduced, and therefore the total, and the products are no longer in the warehouse.
35+
36+
During split payments, stocks are allocated only if the first transaction for an order is complete. If the transaction fails, the stocks are deallocated. Once the first transaction is complete, the stocks are not allocated for the subsequent transactions as they are already reserved for the order. The stocks are deallocated and return to available when the the order is canceled.

0 commit comments

Comments
 (0)