|
| 1 | +--- |
| 2 | +title: Inventory tracking |
| 3 | +subtitle: Track plant stock levels in real-time with automated alerts and reservations |
| 4 | +slug: inventory-tracking |
| 5 | +--- |
| 6 | + |
| 7 | +## Overview |
| 8 | + |
| 9 | +The Plant Store API's inventory tracking capabilities help you maintain accurate stock levels and prevent overselling. Use it to track on-hand, reserved, and available quantities, reserve inventory when orders are placed, set up automatic low-stock alerts, view inventory history and audit trails, and manage stock across multiple locations. |
| 10 | + |
| 11 | +<CardGroup cols={2}> |
| 12 | + <Card |
| 13 | + title="Managing plant inventory" |
| 14 | + icon="duotone book-sparkles" |
| 15 | + href="/inventory-tutorial" |
| 16 | + > |
| 17 | + Learn how to track and update your plant stock. |
| 18 | + </Card> |
| 19 | + <Card |
| 20 | + title="API reference" |
| 21 | + icon="duotone code" |
| 22 | + href="/api-reference" |
| 23 | + > |
| 24 | + Explore inventory endpoints and schemas. |
| 25 | + </Card> |
| 26 | +</CardGroup> |
| 27 | + |
| 28 | +## Inventory states |
| 29 | + |
| 30 | +Inventory isn't just a single number. Plants exist in different states throughout the order and fulfillment process. |
| 31 | + |
| 32 | +| State | Definition | Formula | |
| 33 | +|-------|------------|---------| |
| 34 | +| **On-hand** | Physical count in your possession | Actual count from warehouse | |
| 35 | +| **Reserved** | Committed to pending orders | Sum of active order reservations | |
| 36 | +| **Available** | Stock available for new orders | On-hand - Reserved - Damaged | |
| 37 | +| **In-transit** | Ordered from suppliers, not yet received | Active purchase orders | |
| 38 | + |
| 39 | +<Warning> |
| 40 | +Update inventory in real-time, not in batches. Delays between order creation and inventory updates cause overselling. |
| 41 | +</Warning> |
| 42 | + |
| 43 | +## Reservation strategy |
| 44 | + |
| 45 | +Reserve inventory when an order is created (not just when paid) to prevent two customers from buying the last plant simultaneously. Set expiration times for unpaid orders—typically 15-30 minutes—and release reservations automatically if payment fails or times out. Convert reservations to permanent deductions when the order ships. |
| 46 | + |
| 47 | +<Tip> |
| 48 | +Most payment processors complete checkout within 15 minutes. Setting reservation expiration to 15-30 minutes balances preventing overselling with not holding stock unnecessarily. |
| 49 | +</Tip> |
| 50 | + |
| 51 | +## Low-stock alerts |
| 52 | + |
| 53 | +Set reorder points based on supplier lead time and sales velocity to ensure you never run out of popular plants. |
| 54 | + |
| 55 | +**Reorder point formula:** `(Lead time in days × Daily sales) + Safety stock` |
| 56 | + |
| 57 | +| Component | Example | Purpose | |
| 58 | +|-----------|---------|---------| |
| 59 | +| Lead time | 7 days | How long to get new stock from supplier | |
| 60 | +| Daily sales | 2 plants/day | Average sales velocity | |
| 61 | +| Safety stock | 5 plants | Buffer for demand spikes or delays | |
| 62 | +| **Reorder point** | **19 plants** | Alert when inventory drops below this | |
| 63 | + |
| 64 | +Automate reorder notifications via email or webhook when inventory drops below the reorder point. Track supplier lead times over time and adjust reorder points accordingly to account for seasonal variations or supply chain changes. |
| 65 | + |
| 66 | +## Accuracy and auditing |
| 67 | + |
| 68 | +Maintain inventory accuracy through regular physical counts and comprehensive audit trails. Use cycle counting—counting a different section each week rather than everything at once. High-value or fast-moving items should be counted weekly, while slow-movers can be quarterly. |
| 69 | + |
| 70 | +Log all inventory changes with timestamps, reasons, and the user who made the change. This creates an audit trail for troubleshooting discrepancies and preventing fraud. |
| 71 | + |
| 72 | +| Change type | Reason code | Approval required | |
| 73 | +|-------------|-------------|-------------------| |
| 74 | +| Stock received | `shipment_received` | No | |
| 75 | +| Order shipped | `order_fulfilled` | No | |
| 76 | +| Damaged goods | `shrinkage_damaged` | Manager approval | |
| 77 | +| Manual adjustment | `count_correction` | Manager approval | |
| 78 | + |
| 79 | +<Note> |
| 80 | +Plants are trickier than most inventory due to perishability, growth, and quality variance. Regular physical counts catch issues before they impact customers. |
| 81 | +</Note> |
| 82 | + |
| 83 | +## Multi-location inventory |
| 84 | + |
| 85 | +For operations with multiple greenhouses, warehouses, or stores, choose a strategy that balances complexity with delivery speed. |
| 86 | + |
| 87 | +| Strategy | Best for | Trade-offs | |
| 88 | +|----------|----------|------------| |
| 89 | +| **Centralized** | Small operations, specialty items | Simpler to manage, slower/costlier shipping | |
| 90 | +| **Distributed** | Large operations, fast delivery needs | Faster delivery, more complex management | |
| 91 | +| **Hybrid** | Most operations | Popular items everywhere, specialty items central | Balanced approach | |
| 92 | + |
| 93 | +Route orders to the optimal location based on proximity to customer, current stock availability, and shipping costs. Allow transfers between locations for balancing inventory across facilities. |
0 commit comments