Stores and Warehouses

In this guide we will go through the integration of stores and warehouses which is the basic requirements for integrating stock in Sitoo.

Stores

Stores are used in Sitoo as a point of sale which can be one of the following types:

  • Store
  • Outlet
  • Pop-Up
  • Mobile
  • Online

A store contains contact information, location and how warehouses in it should be treated. The key property for a store is storeid which is used to connect warehouses and nearby stores.

Important Store Fields (POST/PUT)

PropertyDescription
storetypeThe type of the store
nameThe name of the store, shown in UI
externalidExternal ID for the store. Used as reference in dashboards and order made in that store are tagged with this value
externalgroupidExternal Group ID that can be used to group stores together in different contexts
address, address2, zip, city, state, countryidAddress fields for the store
nearby_storesArray of storeid (integer) for nearby stores to this store
usetype_movein, usetype_moveout, usetype_manualin, usetype_manualout, usetype_shipmentin, usetype_shipmentoutDefault warehouse use types for warehouse transfers of different types
tagsArray of tags associated for this store

Nearby Stores

Nearby Stores are used to simplify the flows in the POS when doing stock checks, bookings, deliveries from other stores and more.

Warehouse Use Types

The warehouse use types on store are used to be able to suggest preferred warehouse when doing different types of warehouse transactions.

Tags

Assign tags to stores to be able to connect campaigns and price lists to certain stores.

See the Stores endpoints for more information.

Warehouses

Warehouses are the entities that can hold stock for products. The warehouses use the product sku to keep track of the stock for products. There are two types of warehouses:

  • FIFO
  • Virtural

Important Warehouse Fields (POST/PUT)

PropertyDescription
warehousetypeType of warehouse
usetypeUse type for warehouse
storeidThe ID of the store that the warehouse belongs to or null if not connected to a store
sellableDetermines if the warehouse contains sellable stock
currencycodeThe currency code used for the warehouse (3-letter ISO 4217)
nameThe name of the warehouse
address, address2, zip, city, state, countryidAddress fields for the warehouse
externalidExternal ID for the warehouse

Warehouse Items

The object that holds the actual stock for a warehouse is called a warehouse item. They are accessed using sku. Note! It is not required for an sku for warehouse items to exists among the products in Sitoo.

FIFO Warehouses

FIFO is a bookkeeping term that stands for "First In First Out" and is a method of calculating the value of stock. In a FIFO warehouse all stock leveles are determined using transactions. The value of the stock is calculated using the value of the latest deliveries into the warehouse (together with the actual cost for those deliveries). FIFO warehouses are recommended to use for all warehouses that have POS connected to them. In a FIFO warehouse, the only way of changing the stock levels is by committing transactions to the warehouse. In Sitoo there are 5 types of warehouse transactions:

  • ManualIn Used for restocking/resupplying warehouse. if the stock values are to be used in Sitoo, then a purchase price for the incoming items are required.
  • ManualOut Used for taking stock out of a warehouse.
  • Sales Read-Only Used for sales transactions.
  • Refund Read-Only Used for refund (return) transactions.
  • StockTaking Used for stock-taking.

Depending on the type of transaction that you want to make on the warehouse, there are 2 ways of creating warehouse transactions via the API, either using warehouse batches, or by creating warehouse transactions directly.

Manual In and Manual Out

For ManualIn and ManualOut, the recommended way is to use the Add Warehouse Transactions endpoint where transactions can be added directly to the warehouse.

Stock-taking

For StockTaking the Warehouse Batches endpoint should be used. A warehouse batch is basically a session on the backend that allows changes to be made to it before comitting it as a transaction. The steps for a stocktaking is as follows:

  1. Create a Warehouse Batch (in Open state)
  2. Set values for the stock-taking using the Set Warehouse Batch Items endpoint. This can be done as long as the batch is in Open state.
  3. Update the batch and set the state to Closed. This will close the batch and commit a warehouse transaction, updating all stock levels accordingly.

Note! There can only be one open warehouse batch session per type at the same time for a warehouse.

Virtual Warehouses

Virtual warehouses are recommended when Sitoo is not the master of the warehouse, e.g. a fulfillment warehouse or an e-commerce warehouse. For virtual warehouses in Sitoo it is possible to set the stock level by simply calling the Batch Set Warehouse Items endpoint. Example:

REQUEST
[
{
"sku": "10038-1",
"decimaltotal": "10.000",
"moneytotal": "79.00"
},
{
"sku": "10038-2",
"decimaltotal": "3.000",
"moneytotal": "23.27"
}
]

See the Warehouses endpoints for more information.