
Inventory > Stock Items > [Item] > General
Definition
tracks where a stock item physically is — at hand in your inventory, or out with a customer. State is automatic: TWICE updates it based on fulfillment events on the orders the item participates in. Two State Values:- In — Item is at hand in your inventory. It may still be committed to an upcoming order, but it is physically with you.
- Out — Item is with the customer (rented or sold) or otherwise away.
State vs Status
These are two independent dimensions. You will see both on the same item.Where do I use it?
You view state on each Stock Item in Inventory > Stock Items and on the item’s General tab. State is also a filter column on the stock items table. State affects:- Available To Sell (ATS) — only items that are In and not committed to overlapping bookings count toward availability.
- Returns workflow — items that are Out are expected back; this drives return reminders and overdue reporting.
- Calendar views — see when items are expected to come back In.
- Conflict detection — moving an item that is Out is flagged because the customer still has it.
Key Properties
How state changes
State transitions are driven by fulfillment events on orders that include the Stock Item. The relevant events are recorded in the item’s activity log.In → Out
Triggered when an item is handed out on an order. Recorded events:handed_out— pickup / dispatch on a rental or sale.assigned_to_orderfollowed by handout — the item was reserved and then physically went out.
unavailability range driven by the order. ATS for any range overlapping that unavailability drops by one.
Out → In
Triggered when:returned— the item is returned on a rental order.- Order is cancelled or the line item is removed before pickup (item never actually left).
- Fulfillment is reversed (operator undoes a handout in the admin).
How fulfillment drives state
Order line items go through pickup and return phases:- Reservation — order is created; item is In, but now linked to the reserving order. ATS drops for the booked range.
- Handout — operator marks the line as picked up. Activity log records
handed_out. State becomes Out. - Customer holds the item — state stays Out. Late return reports surface items overdue.
- Return — operator marks the line as returned. Activity log records
returned. State becomes In. Item is freed for re-rental. - Order completion / cancellation — closes the order side. If a line is removed before handout,
freed_from_orderis recorded.
ATS calculation
Available To Sell answers: for the requested date range, how many units of this SKU can I commit to a new booking? For a SKU’s ATS over a range[start, end]:
- Start from the total count of linked Stock Items where
status = activeand the requested service location matches. - Subtract units that are Out with a return date later than
start. - Subtract units that are In but committed to overlapping bookings (
scheduledEvents.type = reservationand unavailability ranges from other orders). - The remainder is ATS for the range.
temporalStock on the article availability response — four series of { range, value } pairs:
- 3 are Out on rentals running until Jan 15.
- 5 are In but committed to an order covering Jan 10–13.
- The other 2 are In and uncommitted.
stockBalance stays at 10 throughout — rentals commit units, they do not remove them from the books. Only sales reduce the balance. stockUtilisation for Jan 10–13 is 80%.
Edge cases
Item is lost while Out
Item is lost while Out
Multi-day rental crossing a calendar boundary
Multi-day rental crossing a calendar boundary
Customer returns one of two items on a multi-item line
Customer returns one of two items on a multi-item line
Item returned to a different location than it left from
Item returned to a different location than it left from
location_changed event is recorded. The article’s articleLocations gets a new range starting at the return timestamp at the new service location.Fulfillment was reversed by mistake
Fulfillment was reversed by mistake
handed_out event. The earlier reversal stays in the log for audit.Item booked but never picked up
Item booked but never picked up
Querying items by state
State is exposed indirectly throughunavailability ranges and the articleLocations array. To find items currently Out, list articles with a date range covering “now” and filter to those with an active unavailability of type order whose handout has fired and whose return has not.
In the admin: open Inventory > Stock Items and filter the State column to Out.
In the API: pass a dateRange covering the moment of interest. Stock Items that are currently out have an unavailability range overlapping that point, originating from an order line that is in the handed-out phase.
FAQs
Can I manually change state?
Can I manually change state?
What if an item is lost while Out?
What if an item is lost while Out?
How do I find all items currently Out?
How do I find all items currently Out?
Does state affect my online store availability?
Does state affect my online store availability?
An item shows In but the customer still has it. What happened?
An item shows In but the customer still has it. What happened?
Developer Reference
Stock item state is read from thearticles endpoints — filter by dateRange to see items currently Out.