Stock Management and Stock API

Stock Management and Stock API

A new stock management system has been added.

Key features include:

  • Makes use of stock products in CPP.
  • The ability to export and import stock levels.
  • Webhooks that allow retailers to receive stock level updates from suppliers in near realtime.
  • Stock levels are updated automatically when new orders get created.
The old stock system is deprecated and should not be used.


Products

Any product in CPP that has Stock set as its type automatically gets tracked by the stock system.

Generally stock products would not be customisable.

Instead, customisable products in CPP should be linked to a base stock product via the Base Stock Product field (visible in CPPv2 only).

The reverse is also true, customisable products would generally not have the stock type set.

This means that hundreds of customisable CPP products can be linked to a single stock base product.

In the case of customisable products that make use of variants, each variant must link to its own base stock product.

In the case of virtual products, the base stock product is derived from the virtual product’s base product.

 Base stock products and virtual product base products (sorry for the wordiness!) are similiar concepts but have been kept separate to give the system more flexibility.
  • Virtual products inherit production properties (e.g. print areas) from their base product.
  • Products inherit stock tracking properties from their base stock product.


Example

With Variants

Let’s say that Supplier A sells T-shirt T01 which comes in 2 sizes, S and L.

In CPP, the supplier would create 3 separate products.

IDSKUTypeVariant 1 SKUVariant 1 Base Stock Product IDVariant 2 SKUVariant 2 Base Stock Product ID
100T01-SStockN/aN/a  
101T01-LStockN/aN/a  
102T01CustomisableT01-S100T01-L101

When OMS receives orders from a retailer for product 102, it will automatically adjust the stock levels for either product 100 or 101, depending on which variant of 102 was ordered.

Without Variants

Let’s say that Supplier A sells Samsung S7 cases. The recommended approach would be for the supplier to create the following products in CPP.

IDSKUTypeBase Stock Product ID
200S7StockN/a
201S7Customisable200

Taking a shortcut, it would also be possible to create a single product.

IDSKUTypeBase Stock Product ID
202S7Stock & CustomisableN/a

However with the shortcut, if the product is duplicated then the supplier will end up with 2 separate stock products that represent the same physical unit.

 The general rule of the thumb is that for a given supplier, all stock products in CPP should have unique SKUs.


Inventory User Interface

Stock levels can be manually updated via the Inventory section of Stock Manager.

Bulk updates are best performed by first exporting a CSV, updating the CSV in a spreadsheet package and then re-importing.


Webhooks

Retailers are able to register a webhook URL that allows them to receive stock level updates.

The webhook will be called whenever the stock level of a base stock product changes (at a maximum frequency of once every 15 minutes for each base stock product).

The webhook can be set in the V2 company settings section, under the Webhooks Product Stock Level Changed URL heading.

Detailed developer documentation will be added soon.

Product Determination

Retailers will receive updates via the webhook for base stock products across all suppliers where there exists a dropship connection between the supplier and the retailer.

In addition, the webhook will list all non stock products that the retailer has access to and that are associated with the base stock product.

For example, if Retailer A had their own version of product 102 (lets say the ID of their own version is 300), the webhook data for updates for product 100 will look something like:

{
	"stock": [
		"quantity_availble": 10,

		"linked" [
			{
				"product": {
					"id": 100,
					"sku": "T01-S"
				},

				"variant": null
			},

			{
				"product": {
					"id": 300,
					"sku": "T01"
				},

				"variant": {
					"attribute_1": {
							"name": "Size",
							"value": "Small"
					},

					"sku": "T01-S"
				}
			}
		]
	]
}

The base stock product is always the first product listed.


Intentional Limitations

  • Stock products cannot have variants
  • Stock products cannot have a base stock product set
    • Related Articles

    • Veeqo Stock Management API Accounting Integration

      An integration has been made between Veeqo and OMS in order to control stock within the Veeqo system. Settings There are two settings specific to this integrations API key and Channel Name, the Channel name is the name of the store (store and channel ...
    • Stock API for the retrieval and setting of stock values

      Custom Gateway provides a Stock API to allow suppliers to provide up-to-date stock information when stock positions change. This is updated via a Custom Gateway API end-point   There are two API end-points, one which allows the setting of stock ...
    • KornitX Platform Imports - Simple Stock (Creation Only)

      We offer this quick and easy way for fulfillers to create basic Stock Products which can be used for configurable stock items within variants or just to quickly create stock products to be sold on retailer websites. The headers for this import have ...
    • New Stock Manager Overview in OMS V2

      Gateway OMS V2 has seen a major update on the functionality of the Stock Management area of the system. Making it a lot more flexible  Detailed below is a simple overview of how this works  Every template / design in Gateway CPP can have a Stock Base ...
    • Importing Stock Items into Gateway CPP

      Stock Items from Magento (products tagged as Plain "Yes") are auto added to your Order Manager if an order is received However sometimes you might want to import all your stock items into the Gateway CPP Product Database so you can use for stock ...