Skip to main content

echoInventoryItemChanges

The history of one SKU: every recorded change, newest first by default, with the levels it left behind. Use it to see how an item reached its current position, and how it behaved over a period, including within a single day. To browse changes across SKUs use echoInventoryChanges, and for the daily position of the whole company use echoInventoryRecords.

Business Rules​

  • The history covers one SKU. Narrow it further by warehouse, location or period.
  • Each change carries the warehouse and location totals it left behind, so a row is a position and not a movement. Two rows describe a movement only when they belong to the same warehouse, so filter by a single warehouse and then subtract the older row from the newer one.
  • By default, changes that share a moment are listed in the reverse of the order in which they were written, so the first row of a shared moment is the state that moment ended at.
  • The history covers changes made through inventory operations, and the corrections the nightly repair sweep makes when a level has drifted. Each row says which of the two it was.
  • Bulk recalculations, which an operator can ask for, write to the level tables directly and do not appear here.

Error Scenarios​

  • The SKU has no recorded changes in the period: an empty list.

Permissions Required​

  • echo:read
echoInventoryItemChanges(
after: String
before: String
filter: InventoryChangeFilterInput
first: Int
last: Int
sku: String!
sortField: InventoryChangeSortFieldEnum = CAPTURED_AT
sortType: SortTypeEnum = DESC
): InventoryChangeRecordConnection!

Arguments​

echoInventoryItemChanges.after ● String scalar common​

Returns the elements in the list that come after the specified cursor.

echoInventoryItemChanges.before ● String scalar common​

Returns the elements in the list that come before the specified cursor.

echoInventoryItemChanges.filter ● InventoryChangeFilterInput input common​

Optional filters, all combined with AND. Any SKUs given here are ignored.

echoInventoryItemChanges.first ● Int scalar common​

Returns the first _n_ elements from the list.

echoInventoryItemChanges.last ● Int scalar common​

Returns the last _n_ elements from the list.

echoInventoryItemChanges.sku ● String! non-null scalar common​

The SKU whose history to return.

echoInventoryItemChanges.sortField ● InventoryChangeSortFieldEnum enum common​

Field used to sort records. Defaults to date.

echoInventoryItemChanges.sortType ● SortTypeEnum enum common​

Sort direction. Defaults to descending.

Type​

InventoryChangeRecordConnection object common​

The connection type for InventoryChangeRecord.