Skip to content

Inventory

Matt MacDougall edited this page Sep 9, 2026 · 1 revision

Inventory and locations

Inventory synchronization reads NetSuite saved item searches and updates existing linked products. Select single or multi in the general inventory mode setting. Single mode is the default. Multi mode includes unresolved location and fulfillment defects; read Known limitations before using it.

Saved-search contract

Configure the saved-search internal ID under Inventory Settings. Multiple IDs can be comma-separated. The search must return the item's internal ID and the configured quantity field. The default quantity field is quantityOnHand, with standard-field access enabled and the at-location quantity flag enabled.

The quantity field should represent the stock quantity the store is intended to sell. The code does not infer whether on-hand, available, committed, or another account-specific measure is correct for the business.

The default page size is 500. Search rows update linked products; absent search rows are not a global instruction to set every missing product to zero. Ensure the search includes zero-stock records and the intended locations. The Stock location setting does not itself filter saved-search results in the single-mode transformer.

Single mode

The single-mode transformer resolves NetSuite product IDs to store SKUs and combines repeated rows for the same SKU by summing their quantities. Filter the saved search deliberately so duplicated or overlapping search results do not inflate quantities.

The repository updates legacy catalog inventory and existing rows for the default MSI source, then performs the relevant indexing work. It does not provide a general process for assigning every product to new sources or sales channels.

The zero-quantity stock-status option is enabled by default. Configurable and non-inventory product handling can also change manage-stock behavior. Verify simple, configurable, bundle, and non-inventory items actually used by the catalog.

Multi mode

Multi-mode search rows must include:

  • Product identity through the basic item internal-ID search column.
  • A location through inventoryLocationJoin.internalId[0].searchValue.internalId.
  • The quantity column selected by the configured stock transformer.

Each location must match an MSI source's netsuite_internal_id. Unknown products or unmapped source locations are skipped. Source-item writes are performed in batches of 100. Assigning sources to MSI stocks and sales channels remains store configuration work.

Some inherited UI comments say stock field settings are ignored in multi mode, but the transformer still uses shared quantity-field configuration. Validate the actual SOAP search-row shape and quantity source.

Location mapping

The location mapper contains the following NetSuite custom-field contract:

Field Use
custrecord_rw_cf_enable_in_magento Source enablement.
custrecord_rw_cf_import_to_magento Import eligibility.
custrecord_rw_cf_magento_code MSI source code.
custrecord_rw_cf_magento_pickup_desc Pickup-location description.
custrecord_rw_cf_magento_pickup_name Pickup-location display name.

It also maps location name, address, contact information, coordinates, and pickup extension attributes. Source codes and NetSuite IDs must remain stable once products and fulfillments depend on them.

The scheduled location path is currently broken. The multi-mode cron plugin calls a nonexistent ProcessManagement::processOtherEntities() method. The location processor's ordinary isActive() method returns false, and all does not automatically import locations. The dedicated plugin also lacks a complete location-pagination loop. The existence of --mode=location is not proof of a working source bootstrap.

Scheduling

Stock processing runs through netsuite:cron --mode=stock or the stock stage of --mode=all. The default update interval is 360 minutes. The standalone netsuite:utils:updatestocks command uses the same processor and interval check; it is not a force-refresh switch.

A two-minute connector schedule therefore does not imply two-minute stock updates. Choose the stock interval and NetSuite request volume intentionally.

MSI reservations and shipment deductions

The module installs inventory hooks beyond saved-search updates:

  • DisableReservation permits only order_placed, order_place_failed, and shipment_created reservation events. Other reservation events are suppressed by that plugin.
  • The normal inventory_sales_source_deduction_processor shipment observer is disabled in events.xml.
  • The export postprocessor adds positive reservation compensation for orders that reach either DONE or ERROR, using a shipment-created event context.

The reservation filter has no global connector-enabled check. Setting Enable integration to No does not reverse these registrations. A terminal export error can release reservation quantity, and replay behavior needs care. Verify physical stock, source quantity, and salable quantity for placement, failed export, cancellation, partial fulfillment, refund, and retry before accepting this version.

Sources: stock processor, search repository, single transformer, single stock writes, multi transformer, multi stock writes, location mapper, location cron plugin, reservation filter, compensation, events.

Clone this wiki locally