docs: general fixes and additions (#10876)

This commit is contained in:
Shahed Nasser
2025-01-08 16:09:48 +02:00
committed by GitHub
parent 9427f1e4af
commit a0e944a7a8
12 changed files with 235 additions and 74 deletions
@@ -10,6 +10,12 @@ This document explains how the Inventory Module is used within the Medusa applic
When a product variant is created and its `manage_inventory` property's value is `true`, the Medusa application creates an inventory item associated with that product variant.
<Note title="Tip">
This flow is implemented within the [createProductVariantsWorkflow](/references/medusa-workflows/createProductVariantsWorkflow)
</Note>
![A diagram showcasing how the Inventory Module is used in the product variant creation form](https://res.cloudinary.com/dza7lstvk/image/upload/v1709661511/Medusa%20Resources/inventory-product-create_khz2hk.jpg)
---
@@ -18,6 +24,12 @@ When a product variant is created and its `manage_inventory` property's value is
When a product variant with `manage_inventory` set to `true` is added to cart, the Medusa application checks whether there's sufficient stocked quantity. If not, an error is thrown and the product variant won't be added to the cart.
<Note title="Tip">
This flow is implemented within the [addToCartWorkflow](/references/medusa-workflows/addToCartWorkflow)
</Note>
![A diagram showcasing how the Inventory Module is used in the add to cart flow](https://res.cloudinary.com/dza7lstvk/image/upload/v1709711645/Medusa%20Resources/inventory-cart-flow_achwq9.jpg)
---
@@ -26,6 +38,12 @@ When a product variant with `manage_inventory` set to `true` is added to cart, t
When an order is placed, the Medusa application creates a reservation item for each product variant with `manage_inventory` set to `true`.
<Note title="Tip">
This flow is implemented within the [completeCartWorkflow](/references/medusa-workflows/completeCartWorkflow)
</Note>
![A diagram showcasing how the Inventory Module is used in the order placed flow](https://res.cloudinary.com/dza7lstvk/image/upload/v1709712005/Medusa%20Resources/inventory-order-placed_qdxqdn.jpg)
---
@@ -38,6 +56,12 @@ When an item in an order is fulfilled and the associated variant has its `manage
- Resets the `reserved_quantity` to `0`.
- Deletes the associated reservation item.
<Note title="Tip">
This flow is implemented within the [createOrderFulfillmentWorkflow](/references/medusa-workflows/createOrderFulfillmentWorkflow)
</Note>
![A diagram showcasing how the Inventory Module is used in the order fulfillment flow](https://res.cloudinary.com/dza7lstvk/image/upload/v1709712390/Medusa%20Resources/inventory-order-fulfillment_o9wdxh.jpg)
---
@@ -46,6 +70,12 @@ When an item in an order is fulfilled and the associated variant has its `manage
When an item in an order is returned and the associated variant has its `manage_inventory` property set to `true`, the Medusa application increments the `stocked_quantity` of the inventory item's level with the returned quantity.
<Note title="Tip">
This flow is implemented within the [confirmReturnReceiveWorkflow](/references/medusa-workflows/confirmReturnReceiveWorkflow)
</Note>
![A diagram showcasing how the Inventory Module is used in the order return flow](https://res.cloudinary.com/dza7lstvk/image/upload/v1709712457/Medusa%20Resources/inventory-order-return_ihftyk.jpg)
### Dismissed Returned Items