2024.1 Stock Options
Stock synchronization between NetSuite and Magento are done based on the following principles:
- NetSuite is the single source of truth for inventory.
- Inventory updates import and change the quantity in Magento, ignoring the ordered quantity in the queue.
- Single Stock and Multi Stock Magento modes are supported by the NetSuite Connector. Inventory is managed on the NetSuite side so we don't need multiple stocks in Magento.
The options below should be configured for proper stock synchronization.
Configuration name | Value Type | Additional Information |
---|---|---|
Location internal id | Integer | NetSuite supports multiple stock locations (warehouses). Magento does not (by default, read below for Multi Source Inventory implementation), so it is necessary to specify the location from where Magento will grab stocks. Oleksandr Kozyr (Unlicensed) this looks of. Do we even use this still? In case you need to handle multiple locations:
|
Stock stored at location level? | Boolean | While by default the stock information is present at the location level, some users may choose to expose it as a custom field at the product level. This flag instructs the connector on where to look for stock information. This config is ignored for Inventory Multi Management NSC setup. |
Order Location Id | Integer | Internal Id for the Order Export usage. It can be the same or differ from the Stock Location - Stock Options |
Quantity field type | Select | When 'Standard' is selected - 'Standard quantity field name' will be used, otherwise - 'Quantity field name' |
Quantity field name | Text | The exact field name that contains the stock number. For fields at the product level, only custom fields are accepted. For fields at the location level, you can specify either custom or standard fields. A new setting will appear, "Quantity field type", where you can define whether the field is standard or custom. |
Standard quantity field name | Integer | Used when grabbing stock at product import. Must be an InventoryItemLocations standard field. |
Update the stocks every N minutes | Integer | This value defines the frequency of the updates. Based on your catalog size, you can tweak this up or down. |
Saved Stock search internal id | Integer | See the section below. |
Page size for the saved search query | Integer | The stock information is paged when grabbed. This value defines how many stock values are grabbed at once. 500 is the maximum NetSuite will allow. |
Change stock status when under zero items | Boolean | If this is set, then when the stock level reaches zero, the status will get changed to "out of stock", then the status will be changed to "in stock" when quantity is greater than zero. If this option is not set then status will always stay as "In stock". This is useful when you allow backorders. |
Grab stock updates when importing products | Boolean | If this is set to No, then the only stock update will be the full one, based on the Saved Search. You would want this when the stock is not stored in a single location and the Saved Search is the only way to easily aggregate stock into a single column. |
Saved Search for Stock
Since the stock update is a frequent operation on all products, RW wanted to make it as fast as possible. Instead of querying NetSuite for all product information then extracting the stock, a Saved Search must be created so as to grab only the fields we require. The Saved Search must contain at least 2 fields (it can contain more but they will be ignored):
- Item Internal ID
- The field that contains the stock number as it was defined in the "Quantity field name" setting
Saved Search
If the "Quantity Field Name" is at the location level, then you will be getting a row for each location. Mitigate this by adding filter criteria to the search to list only the location you are pulling from (the one that you defined in "Location internal id")
Saved Search
If you don't use stocks for specific product types (i.e. matrixes do not have stocks, only their subitems have), filter them out with criteria conditions. This way you will prevent unnecessary data processing.
Saved Search
You may want to have some other specific conditions added to the filtering criteria. The additional filters will save time and resources for stock updates in Magento.
Saved Search is required in the format described here. The Saved Search ID needs to be used for the Saved Stock Search Internal Id Configuration name to get Stock Updates working!
Saved Search Creation in NetSuite
Step-by-step guide 2024.1 Saved Search Creation in NetSuite