Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

Stock exports allow fetching a one shot picture of stock at the current point in time. Stock images are highly customizable, making it possible to recover stock in accordance to your operational rules.

Dereferenced stock

It’s possible to recover an image with a quantity of 0 for lines of stock which were referenced in the last export but not anymore.

A referenced stock line is one for which the item and the stock location are included in the stock request.

A dereferenced item/point of stock is one which is no longer returned by the items/point of stock query (aggregates.item_filter.request_name / aggregates.endpoint_filter.request_name).

Stock lines no longer present in OneStock as a result of a scoped import will not be returned in a dereferenced stock export scenario.

 Example in a scoped scenario
  1. Stock in database at moment t0
    Store 1, item1 x 2
    Store 1, item 2 x 3

  2. Import full at moment t1
    Store 1, item1 x 1

  3. Stock in database at moment t1
    Store 1, item1 x 1

  4. Export at moment t2
    Store 1, item1 x 1

Configuration

To be able to recovered dereferenced lines, the following configuration must be added

stock:
  unreferenced_stock: true

Recovering dereferenced lines

Check out API documentation for GET /stock_exports.

  • No labels