Skip to content

Inventory Adjustments Realtime-enabled — SmartConnect can trigger on changesRealtime-enabled

GETPOSTPATCHDELETETable: EONE Inventory Adjustment

eOne/core/v1.0/inventoryAdjustments

Adjust on-hand stock as its own header/line document, a header with an inventoryAdjustmentLines child collection, one line per item/variant/location. Backed by a dedicated staging table (the same model as Customer Payments), so it can be reviewed and approved in Business Central before it reaches the item ledger.

Count vs. Increment

Each line is either a Count (quantity is the counted on-hand; the delta is computed against current inventory) or an Increment (quantity is a signed delta applied directly). Lines that net to zero are skipped. Resolve the item with itemNumber or itemIntegrationId. See Resolver fields.

Processing is configurable

As with payments, how a staged adjustment reaches the item ledger is set on the eOne Integration Setup page (Inventory Adjustments tab): Manual (call process, or use the in-product eOne Inventory Adjustments page) builds unposted item journal lines; Auto Draft to Journal builds them in the background; Auto Post also posts them. An optional approval gate works the same way, enabled per endpoint by Requires Approval plus an enabled Business Central approval workflow, and driven from the client (not the API), see the bound-actions note below.

Name the target item journal with journalTemplateName + journalBatchName, or leave them blank to use the defaults from Setup. Auto Post posts only that adjustment's own lines, so the batch can be shared with other drafts. The template must be a Type = Item journal (Revaluation, Phys. Inventory, and Transfer templates cannot post the quantity adjustment lines).

Bound actions

Invoke with POST /inventoryAdjustments(<id>)/Microsoft.NAV.<action>:

  • validate: re-runs the document's checks (items, quantities, journal names) without processing it, reporting any problem in status / errorMessage. The response redirects back to the adjustment.
  • process: turns the staged adjustment into item journal lines (unposted draft, or posted, per the Setup policy above).
  • post: processes the adjustment and posts it, whatever the Setup policy says. Use it when SmartConnect decides that this one adjustment goes to the item ledger now, rather than an administrator putting the whole endpoint on Auto Post. Only the lines this adjustment just wrote are posted, so other drafts sitting in the same item journal batch are left alone, and the approval gate applies exactly as it does to process.

process and post return no body. The staged adjustment deletes itself the moment its item journal lines exist, so there is nothing to echo, and the outcome lives on the Processed Documents row the same call wrote. Fetch it by the integrationId you sent the adjustment with - processedDocuments?$filter=integrationId eq '<your id>' - and read postedDocumentNumber, postedPostingDate and status; after post they are already filled in. An adjustment posts to the item ledger, so its glTransactionNumber stays 0. A rejected call returns the error and leaves the adjustment in staging, with errorMessage describing the problem, ready to correct and retry.

Approval is not done through the API. When an endpoint has Requires Approval set and a Business Central approval workflow is enabled for eOne documents, an adjustment must be Approved before it processes. A licensed user sends it for approval and approves it in Business Central, on the eOne Inventory Adjustments page (Send Approval Request, then the standard Approve/Reject/Delegate), backed by Approval User Setup. The read-only status (Open → Pending Approval → Approved) and errorMessage fields report where the document is; a failed automatic attempt lands status = Error with the reason in errorMessage.

What a DELETE may do

A staged adjustment that is pending approval or already approved cannot be deleted; cancel the approval request or reopen it first, so what the approver signed off on is what posts. A DELETE is also refused when the endpoint's Allow Manual Delete switch is off on the eOne Integration Setup page (Inventory Adjustments tab). It is on by default, so nothing changes until an administrator turns it off to mark adjustments integration-owned.

Dimensions and per-line notes

Set shortcutDimension1Code–8Code on the adjustment header; they are applied to every generated item journal line. Each line also takes an optional comment (e.g. the reason for the count), which is carried onto that line's journal description. See Dimensions.