Stock History
Overview
Stock History is the complete, permanent ledger of every inventory transaction that has occurred. Every shipment received or shipped, every build started or completed, every adjustment made - all create entries in this history. Current stock levels are calculated by summing this history, making it the source of truth for all inventory data.
Each stock history entry records a specific inventory event with complete detail. It captures which product was affected, how many units moved in or out, what type of transaction caused the movement, which warehouse location was involved, and what the cost was. Entries are timestamped and attributed to the user who executed the transaction, creating a complete audit trail for compliance and investigation.
Transaction types distinguish different kinds of inventory movements. Sale shipments (1000) remove inventory for customer orders. Purchase shipments (1002) add inventory from suppliers. Transfer shipments (1001) move inventory between locations. Builds (1005) both consume components and produce finished goods. Each transaction type has specific update types that track the exact stage - for example, distinguishing between packing a sale shipment (which reserves inventory) versus shipping it (which removes inventory).
The history captures both quantity and cost information. Units in and units out show the physical movement of products. Transaction cost per unit records what each movement cost. Running totals maintain the cumulative quantity after each transaction. Average cost per unit and valuation balance track the inventory value over time, essential for accurate financial reporting and cost of goods sold calculations.
For lot-tracked products, each stock history entry specifies which lot was affected. This creates a detailed trace of lot movements - when each lot arrived, how it moved through the warehouse, and when it shipped out. This lot-level traceability is crucial for expiration management, recall handling, and regulatory compliance in industries like food, pharmaceuticals, and cosmetics.
Stock history supports powerful analysis and reporting. You can view all movements for a specific product to understand its usage patterns. You can filter by date range to see what happened during a particular period. You can trace individual transactions back to their source shipments or builds. You can analyze cost changes over time to understand how purchase prices have affected your inventory valuation. This historical data is invaluable for operational improvement, financial analysis, and audit support.
GraphQL API
The stockHistory collection provides access to stockHistory data via the GraphQL API. All queries use the Relay connection specification with cursor-based pagination.
Query Name: stockHistoryViewConnection
Available Features:
- Cursor-based pagination (first/last/after/before)
- 16 filter options
- 4 relations to other collections
Query Examples
Basic Query
The stockHistory collection is accessed via the stockHistoryViewConnection query, which returns a Relay-style connection with pagination support.
query {
stockHistoryViewConnection(first: 10) {
edges {
node {
averageCostPerUnit
cbm
cost
index
lotId
}
}
pageInfo {
hasNextPage
endCursor
}
}
}Pagination
Use cursor-based pagination to retrieve large datasets:
# First page
query {
stockHistoryViewConnection(first: 50) {
edges {
node { lotId }
}
pageInfo {
hasNextPage
endCursor
}
}
}
# Subsequent pages
query {
stockHistoryViewConnection(first: 50, after: "cursor-from-previous-page") {
edges {
node { lotId }
}
pageInfo {
hasNextPage
endCursor
}
}
}Filtering
Apply filters to narrow results (see Filters section for all available options):
query {
stockHistoryViewConnection(
first: 10
location: "Warehouse A"
) {
edges {
node { lotId }
}
}
}Relations
Query related data (see Relations section for all available relations):
query {
stockHistoryViewConnection(first: 10) {
edges {
node {
lotId
product {
title
productUrl
}
}
}
}
}Summary and Aggregation
This collection supports metrics aggregation through the summary field. You can calculate totals, averages, counts, and other aggregate values across filtered data.
Note: This collection does not support groupBy dimensions. For dimensional analysis, use collections like product, order, or invoice.
For a comprehensive guide to using aggregations, see the Aggregation Concept Guide.
Query Structure
stockHistoryViewConnection(filters...) {
summary {
errorCode
errorMessage
metrics {
# Calculated metrics (see table below)
}
}
}Available Metrics
This collection provides 1 metric that can be aggregated:
| Metric | Parameters | Description |
|---|---|---|
count | None | Count of items in the result set |
Common Parameters:
operator- Aggregation function:sum,mean,min,maxtransform- Mathematical transformation:absdateRange- Filter to specific date rangefacilityUrlList- Filter to specific facilities
Examples
Example 1: Total stockHistory Metrics
Calculate aggregate metrics across all stockHistory records:
query {
stockHistoryViewConnection(first: 1) {
summary {
errorCode
errorMessage
metrics {
totalCount: count
}
}
}
}Expected result structure:
{
"data": {
"stockHistoryViewConnection": {
"summary": {
"errorCode": null,
"errorMessage": null,
"metrics": {
"totalCount": [1523]
}
}
}
}
}Fields
This collection has 40 fields:
- 34 simple fields
- 6 enum fields (with predefined values)
- 0 parameterized fields (accept query options)
Note on Field Formatting: All scalar fields support the
formatterargument to control output format. Available options:"html","none","abbreviated","blank-zero". Some fields have a default formatter (shown below). See the Formatting guide for details.
Note on Sorting: Field sortability may vary depending on the UI context and query parameters used. Some parameter options explicitly disable sorting (marked with ⚠️ not sortable).
Simple Fields
These fields return values directly without additional options.
averageCostPerUnit
averageCostPerUnitThe average cost paid per unit for items in this stock history record. This value is used to calculate profit margins by comparing it against the selling price per unit. When a product is sold, the system calculates the margin percentage by determining the difference between the sale price per unit and this average cost per unit, divided by the sale price.
Label: Average cost per unit
Sortable: No
cbm
cbmThe cumulative volume measurement in cubic meters (CBM) for the items in this stock history record. This field calculates the total volume by multiplying the quantity of items by their per-unit volume dimensions. Volume tracking must be enabled in the system for this field to contain values; otherwise it displays as zero.
Label: CBM subtotal
Sortable: No
cost
costThe total standard accounting cost for a stock history transaction, calculated by multiplying the quantity by the product's standard accounting cost per unit. This field represents the accounting value assigned to the inventory movement, using the product's defined standard cost rather than average cost or other cost methods. It appears in stock history reports to show the total cost impact of each inventory transaction based on the standard cost valuation method.
Label: Std accounting cost amount
Sortable: No
index
indexA sequential row number that indicates the display order of stock history records when viewing inventory transaction history. The index starts at 1 for the first record and increments for each subsequent transaction in the list, providing a simple way to reference specific rows in the stock history view.
Label: Row sequence number
Sortable: No
lotId
lotIdThe lot identifier associated with the inventory item in this stock transaction. Lot IDs are used to track specific batches of inventory, such as items with manufacturing dates or batch numbers like "Mfg: 3/8/2010 2nd". This field can be filtered and searched to view stock history for particular lots, allowing businesses to trace the movement and cost changes of specific inventory batches over time. The field may be empty for transactions that don't involve lot-tracked items.
Label: Lot ID
Sortable: No
lotIdUnprefixed
lotIdUnprefixedThe lot identifier without any system-generated prefix that may have been added to the lot ID. This provides a cleaner version of the lot number for display and reporting purposes, removing any prefixes that the system automatically adds for internal tracking. Users can reference this field when they need to view or work with the base lot number as it was originally entered, rather than the full prefixed version used internally.
Label: Lot ID unprefixed
Sortable: No
nativeNeq
nativeNeqFurther information is not available.
Label: Native NEQ subtotal
Sortable: No
nativeWeight
nativeWeightThe weight of the product in the transaction measured in the product's native weight unit of measure. This field appears alongside stockHistoryWeight and can be aggregated using stockHistoryNativeWeightSum for reporting purposes. Native weight preserves the original unit of measure assigned to each product (such as pounds or kilograms) rather than converting all weights to a standard unit, allowing users to view inventory weights in the same units they were recorded.
Label: Native Weight subtotal
Sortable: No
neq
neqThe Net Explosive Quantity (NEQ) for the stock item, expressed as a weight measurement. This field is used to track the explosive content weight for products that contain hazardous materials or explosives, which is critical for compliance with safety regulations and shipping requirements. NEQ appears alongside other weight and quantity measurements in stock history records and can be summed and subtotaled for reporting purposes.
Label: NEQ subtotal
Sortable: No
packing
packingThe case packing specification for the product in this stock transaction, showing the number of units per case and inner pack configuration. For example, "12 cs 12/1" indicates 12 units per case packaged as 12 individual items, while "8 cs 8/4" represents 8 units per case packaged as 8 items in 4 inner packs. This field displays in abbreviated form (e.g., "cs 12/1") and helps distinguish between case quantity transactions and open stock (individual unit) transactions in inventory movement records.
Label: Packing
Sortable: No
quantity
quantityThe number of cases or units of a product involved in a stock transaction. This field represents the quantity change at the case level, showing positive values for stock increases (such as receiving purchases, stock adjustments adding inventory, or completing builds) and negative values for stock decreases (such as shipping sales orders, transferring stock out, or consuming materials). The quantity is displayed with its packing string to show the case size, and when multiplied by the normalized packing units, gives the total unit count. For journal entries that only adjust cost without moving inventory, the quantity shows as zero with a warning that value was applied to zero quantity.
Label: Quantity
Sortable: No
quantityCaseOrCaseEquivalent
quantityCaseOrCaseEquivalentThe quantity expressed in cases for case stock products, or in case equivalents for open stock products. For products tracked as case stock, this displays the actual number of cases involved in the stock transaction. For products tracked as open stock, this shows the equivalent number of cases by dividing the unit quantity by the product's units per case. This field allows users to compare inventory movements across both case stock and open stock products using a consistent case-based measurement, which is particularly useful for businesses that need to view inventory in terms of case quantities regardless of how the product is tracked.
Label: Quantity, case or case equivalent
Sortable: No
quantityCaseStock
quantityCaseStockThe quantity on hand for items stored in case packaging. This field represents the portion of inventory that has a case pack structure (such as "6 cs 3/2" or "8 cs 8/4"), as opposed to open stock which represents individually stored items without case packaging. When viewing stock history or inventory levels, the total quantity on hand is the sum of case stock and open stock quantities. This distinction helps businesses track inventory that is stored in manufacturer cases separately from loose or individually stored items.
Label: Quantity, case stock
Sortable: No
quantityInOpenStock
quantityInOpenStockThe quantity of product received into open stock through this stock history transaction. This field is part of a trio of open stock quantity fields that track the movement of open stock inventory: quantityInOpenStock captures incoming quantities, quantityOutOpenStock captures outgoing quantities, and quantityOpenStock represents the net quantity change. Open stock refers to inventory that is available in individual units rather than in case quantities, allowing for more granular tracking of partial case transactions and unit-level inventory movements.
Label: Quantity in, open stock
Sortable: No
quantityOpenStock
quantityOpenStockThe net quantity change in open stock for a stock history transaction. This field represents the difference between quantities moving into open stock and out of open stock, tracking the overall impact of the transaction on available inventory that is not yet committed or allocated. It works in conjunction with quantityInOpenStock (quantity moving into open stock) and quantityOutOpenStock (quantity moving out of open stock) to provide a complete picture of open stock movements.
Label: Quantity, open stock
Sortable: No
quantityOutOpenStock
quantityOutOpenStockThe quantity of open stock (individual units not packed in cases) being removed or sent out in a stock transaction. This appears as a negative quantity or outbound movement in stock history records, such as when products are transferred out of a location, shipped to customers, or consumed in production. It is used alongside quantityInOpenStock to track the flow of open stock inventory, showing decreases in on-hand quantities at a given location.
Label: Quantity out, open stock
Sortable: No
recordDate
recordDateThe date when a stock transaction occurred. This field shows the business date of inventory movements such as receiving purchases, transferring stock between locations, or making stock adjustments, helping users track when inventory changes took place. Users can filter stock history by date ranges to analyze inventory activity within specific time periods.
Label: Record date
Sortable: No
runningTotalQuantity
runningTotalQuantityThe cumulative stock quantity at a point in time, calculated by adding each stock change to all previous quantities. This field shows the total on-hand inventory after each transaction is applied, allowing users to see the stock level at any moment in the history. For example, if the initial stock is 88 units and a transaction adds 8 units, the running total quantity becomes 96, then continues accumulating with each subsequent stock change.
Label: Running total units
Sortable: No
shortCode
shortCodeA scannable barcode identifier that uniquely represents a specific product, packing configuration, and lot combination. This field enables quick lookup and identification of inventory items during transactions such as receiving, picking, or stock takes. Short codes are typically numeric values like '0200000008000' that can be scanned from barcode labels to identify the exact stock item being handled, including its specific packing size and lot information if applicable.
Label: Short code
Sortable: No
transactionAllocatedCostPerUnit
transactionAllocatedCostPerUnitThe per-unit cost of a stock transaction after allocated adjustments have been applied. This is calculated by dividing the allocated adjustments by the transaction quantity, showing the cost per unit including any allocated costs that have been distributed to the transaction. For example, if a transaction has $366 in allocated adjustments for 30 units (3 cases of 3/1 packing), the allocated cost per unit would be $12.20.
Label: Transaction allocated cost per unit
Sortable: No
transactionAllocatedCostSubtotal
transactionAllocatedCostSubtotalThe total allocated cost for a stock transaction, calculated by multiplying the allocated cost per unit by the transaction quantity. This field represents the subtotal amount of costs that have been allocated or apportioned to this specific inventory transaction, which may differ from the base cost depending on cost allocation methods or adjustments applied within the system.
Label: Transaction allocated cost subtotal
Sortable: No
transactionBaseCostPerUnit
transactionBaseCostPerUnitFurther information is not available.
Label: Transaction base cost per unit
Sortable: No
transactionBaseCostSubtotal
transactionBaseCostSubtotalThe total base cost amount for a stock transaction, calculated by multiplying the base cost per unit by the transaction quantity. This represents the fundamental cost of the items in the transaction before any cost allocations or adjustments are applied. The field is used alongside transaction allocated cost subtotal and transaction cost subtotal to provide different views of the transaction's cost.
Label: Transaction base cost subtotal
Sortable: No
transactionCommitTimestamp
transactionCommitTimestampThe date and time when the stock transaction was committed to the system. This timestamp records when the transaction was finalized and saved, which may differ from the transaction's record date. The field displays in various timezone formats and shows "--" when no commit timestamp is available. Users can filter stock history records by this timestamp to find transactions committed during specific time periods, useful for auditing when changes were actually made to the system versus when they were dated to occur.
Label: Transaction timestamp
Sortable: No
transactionCostPerUnit
transactionCostPerUnitThe cost per unit associated with a stock transaction at the time it occurred. This field displays the unit cost for transactions like purchases, transfers, and stock adjustments, showing values such as the received cost on a purchase order or the inventory value during a transfer. The field can be null for certain transaction types like average cost changes or stock adjustments where no specific unit cost applies.
Label: Transaction cost per unit
Sortable: No
transactionCostSubtotal
transactionCostSubtotalThe total cost value associated with a stock transaction. This represents the aggregate cost for the quantity of items involved in the transaction, calculated using the average cost method. The field is commonly used to track the monetary impact of inventory movements such as purchases, sales, transfers, and stock adjustments. It appears in cost analysis reports and can be summed to show running totals of transaction costs over time, or used to calculate average cost per unit ratios.
Label: Transaction cost subtotal
Sortable: No
transactionDescription
transactionDescriptionA brief summary of the stock transaction that occurred, indicating the type and identifying number of the transaction. Examples include "Purchase 891 received" for received purchase orders, "Transfer 301 sent" and "Transfer 301 received" for inventory transfers, "Quick stock change" for manual adjustments without a transaction number, "Stock change 103" for numbered manual adjustments, and "Average cost change 212121 posted" for cost adjustments. This provides users with a quick way to understand what action affected inventory levels without needing to view full transaction details.
Label: Transaction description
Sortable: No
Default Formatter: html
Example Query:
{
stockHistory(stockHistoryUrl: "example-url") {
transactionDescription # Uses default formatter: html
transactionDescriptionRaw: transactionDescription(formatter: "none") # Get raw value
}
}transactionDetails
transactionDetailsAdditional contextual information about the stock transaction that provides relevant details beyond the basic transaction description. For purchase receipts, this includes the supplier name, destination location, and tracking number. For transfers, it shows the origin and destination locations along with tracking information. For stock changes and average cost adjustments, it displays any notes entered by the user to explain the reason for the change. This field may be empty for transactions like quick stock changes where no additional details were provided.
Label: Transaction details
Sortable: No
units
unitsThe total number of individual units in a stock transaction, calculated by multiplying the quantity by the packing configuration. For example, if a transaction records 12 cases with a packing of "12 cs 12/1" (12 cases of 12 units each), the units field would be 144 individual units. This field provides the lowest-level unit count for inventory tracking, regardless of how the product is packed or sold. It is used in running sum calculations to track total units available and in determining average cost per unit.
Label: Units
Sortable: No
unitsIn
unitsInThe quantity of units added to inventory through this stock transaction. This field tracks inbound inventory movements such as receipts, returns, or adjustments that increase stock levels. It appears alongside units out to provide a clear view of inventory flow, with the net change reflected in the units field.
Label: Units in
Sortable: No
unitsOut
unitsOutThe quantity of inventory units that were removed from stock during a transaction. This field captures outbound inventory movements such as sales, transfers out, adjustments decreasing stock, or any other transaction that reduces inventory levels. It is used in inventory reports and analysis to track stock depletion and calculate running balances of on-hand inventory.
Label: Units out
Sortable: No
unitsPerCase
unitsPerCaseThe number of individual units contained in one case for the product in this stock transaction. This field is derived from the product's packing configuration and helps convert between case quantities and individual unit counts. For example, if a product is packed as "8 cs 8/4", the unitsPerCase would be 32 (8 cases times 4 units per case). This value is used throughout the system to calculate total units in transactions by multiplying the quantity of cases by the units per case.
Label: Units per case
Sortable: No
valuationBalance
valuationBalanceThe total monetary value of inventory on hand after a stock transaction. This represents the cumulative value of all units in stock at their average cost, calculated by multiplying the total quantity on hand by the current average cost per unit. The field tracks how the inventory's dollar value changes over time as products are received, sold, transferred, or adjusted.
Label: Valuation balance
Sortable: No
weight
weightThe total weight for the stock transaction, calculated by multiplying the transaction quantity by the product's weight per unit. This field shows the aggregate weight moving in or out of inventory for that specific transaction, helping users track the physical weight of inventory movements. The weight is displayed in the system of measure (such as pounds or kilograms) and is used to calculate weight subtotals and running totals across multiple transactions.
Label: Weight subtotal
Sortable: No
Enum Fields
These fields return one of a predefined set of values.
rowType
rowTypeIndicates the type of row in stock history reports, distinguishing between regular transaction rows and calculated summary rows. Regular transaction rows represent actual inventory transactions and have a rowType value of 1. Initial summary rows show the starting stock position at the beginning of a reporting period with a rowType value of 0, while ending summary rows show the closing stock position at the end of a reporting period with a rowType value of 2. These summary rows are used in reports to display opening and closing inventory balances alongside individual transactions.
Label: Row type
Sortable: No
Possible Values:
##rowInitialSummary- Initial summary##rowTransaction- Transaction##rowEndingSummary- Ending summary
stockType
stockTypeThe current status of inventory in the stock transaction. This field indicates whether the stock is available for use, in transit between locations, or packed and ready for shipment. Common values include "In stock" for available inventory, "In transit" for items being transferred between locations, and "Packed" for items that have been prepared for outbound shipment. Users can filter stock history records by this field to view specific types of inventory movements.
Label: Stock type
Sortable: No
Possible Values:
0- In stock1- In transit2- Packed3- WIP
transactionStatus
transactionStatusThe current processing status of the stock transaction, indicating whether it has been posted to inventory, is still pending, or has been canceled. This field is used to filter stock history reports and determine which transactions should be included in inventory calculations. Posted transactions reflect completed and finalized inventory movements, pending transactions represent unfinalized changes that may still be modified, and canceled transactions are excluded from inventory totals and summary metrics.
Label: Transaction status
Sortable: No
Possible Values:
##transactionPosted- Posted##transactionCanceled- Canceled##transactionPending- Pending
transactionType
transactionTypeThe category of inventory movement that occurred, such as sales shipments, purchase receipts, inventory transfers, inventory variances, or production builds. This field classifies the type of business operation that caused the inventory level change, helping users filter and analyze inventory history by the nature of the transaction. Common transaction types include packed shipments, shipped sales orders, received purchase orders, inventory adjustments, transfer shipments between facilities, and work effort consumption or production.
Label: Transaction type
Sortable: No
Possible Values:
1000- Sale shipment1001- Transfer1002- Purchase shipment1003- Return shipment1004- Stock change or take1005- Build1006- Average cost change
transactionUpdateType
transactionUpdateTypeThe specific stage or status of the inventory transaction, indicating what action or state change occurred to the stock. This field tracks the detailed progression of inventory movements through various operational stages such as when a sale shipment is packed, transferred, shipped, or unpacked; when transfer shipments are shipped or received; when purchase shipments are received; when stock changes are committed; when builds consume or produce items; and when average cost adjustments are posted. The transaction update type provides granular visibility into the lifecycle of each inventory movement, allowing users to understand not just what type of transaction occurred, but precisely which step in the fulfillment, receiving, or adjustment process was executed.
Label: Transaction update type
Sortable: No
Possible Values:
0- Sale shipment packed1- Sale shipment packed transfer2- Sale shipment packed shipped3- Sale shipment unpacked4- Sale shipment shipped5- Transfer shipment shipped6- Transfer shipment received7- Purchase shipment received8- Return shipment received9- Quick stock transfer10- Stock change or take11- Build consume started12- Build consume completed13- Build produce completed15- Average cost change
warning
warningData quality alerts that flag potential issues with an inventory transaction. Warnings identify conditions such as missing average cost, missing purchase price, product value applied to zero quantity, mismatches between expected and resulting costs, or total units available going negative. These warnings help users identify and investigate transactions that may require attention or correction to maintain accurate inventory costing and valuation.
Label: Warning
Type: ##iconWithTooltip
Sortable: No
Possible Values:
##shWarningAverageCost- Missing average cost##shWarningPurchasePrice- Missing purchase price##shWarningValueAppliedToZeroQuantity- Product value missing quantity##shWarningExpectedResultingCostMismatch- Expected/resulting cost mismatch##shWarningUnitsNegative- Total units available negative
Relations
product
- Related Collection: product
- Label: Product
TODO: Add relation description
sublocation
- Related Collection: facility
- Label: Sublocation
TODO: Add relation description
transactionCommitUser
- Related Collection: userLogin
- Label: Transaction user
TODO: Add relation description
variance
- Related Collection: variance
- Label: Variance
TODO: Add relation description
Filters
location
- Label: Location
- Type: List|FacilityUrlLocationString
- Enabled: Yes
Filter Type: Reference to facility collection
Note: Filters to locations only
This filter accepts values from the facilityViewConnection query. To get available values:
query {
facilityViewConnection(
first: 100
type: "FACILITY_LOCATION"
status: "FACILITY_ACTIVE"
) {
edges {
node {
facilityUrl # Use this value in the filter
name
}
}
}
}Usage Example:
query {
stockHistoryViewConnection(
first: 10
location: ["FACILITY_URL_VALUE"]
) {
edges {
node {
stockHistoryId
facility {
name
}
}
}
}
}lotId
- Label: Lot ID
- Type: LotIdSearchString
- Enabled: Yes
Filter Type: Text value
This filter accepts freeform text values.
Usage Example:
query {
stockHistoryViewConnection(
first: 10
lotId: "LOT-001"
) {
edges {
node {
stockHistoryId
lotId
}
}
}
}productCategory
- Label: Category
- Type: List|String
- Enabled: Yes
Filter Type: Text value
This filter accepts freeform text values.
Usage Example:
query {
stockHistoryViewConnection(
first: 10
productCategory: "Electronics"
) {
edges {
node {
stockHistoryId
productCategory
}
}
}
}productManufacturer
- Label: Manufacturer
- Type: List|String
- Enabled: Yes
Filter Type: Text value
This filter accepts freeform text values.
Usage Example:
query {
stockHistoryViewConnection(
first: 10
productManufacturer: "Acme Corp"
) {
edges {
node {
stockHistoryId
productManufacturer
}
}
}
}productUrl
- Label: Product
- Type: List|ProductUrlString
- Enabled: Yes
Filter Type: Reference to product collection
This filter accepts values from the productViewConnection query. To get available values:
query {
productViewConnection(
first: 100
) {
edges {
node {
productUrl # Use this value in the filter
title
}
}
}
}Usage Example:
query {
stockHistoryViewConnection(
first: 10
productUrl: ["PRODUCT_URL_VALUE"]
) {
edges {
node {
stockHistoryId
product {
title
}
}
}
}
}recordDate
- Label: Record date
- Type: dateRangeInput
- Enabled: Yes
Filter Type: Date range
Input Structure:
{
begin: string // ISO date format: "2024-01-01"
end: string // ISO date format: "2024-12-31"
}Usage Example:
query {
stockHistoryViewConnection(
first: 10
recordDate: {
begin: "2024-01-01"
end: "2024-12-31"
}
) {
edges {
node {
stockHistoryId
recordDate
}
}
}
}stockType
- Label: Stock type
- Type: String
- Enabled: Yes
- Options:
- In stock (0)
- In transit (1)
- Packed (2)
- WIP (3)
Filter Type: Predefined options
Get Current Options:
These options may vary by account configuration. To get the current list:
query {
dataSetMeta(purpose: "uiStockHistory") {
dataSets(name: "stockHistory") {
filters {
name
optionList {
value
label
}
}
}
}
}Usage Example:
query {
stockHistoryViewConnection(
first: 10
stockType: ["0", "1"]
) {
edges {
node {
stockHistoryId
stockType
}
}
}
}sublocation
- Label: Sublocation
- Type: List|FacilityUrlSublocationString
- Enabled: Yes
Filter Type: Reference to facility collection
Note: Filters to sublocations only
This filter accepts values from the facilityViewConnection query. To get available values:
query {
facilityViewConnection(
first: 100
type: "FACILITY_SUBLOCATION"
status: "FACILITY_ACTIVE"
) {
edges {
node {
facilityUrl # Use this value in the filter
name
}
}
}
}Usage Example:
query {
stockHistoryViewConnection(
first: 10
sublocation: ["FACILITY_URL_VALUE"]
) {
edges {
node {
stockHistoryId
facility {
name
}
}
}
}
}summaryRows
- Label: Summary rows
- Type: List|String
- Enabled: Yes
- Options:
- Ending summary (##rowEndingSummary)
- Initial summary (##rowInitialSummary)
Filter Type: Predefined options
Get Current Options:
These options may vary by account configuration. To get the current list:
query {
dataSetMeta(purpose: "uiStockHistory") {
dataSets(name: "stockHistory") {
filters {
name
optionList {
value
label
}
}
}
}
}Usage Example:
query {
stockHistoryViewConnection(
first: 10
summaryRows: ["##rowInitialSummary", "##rowEndingSummary"]
) {
edges {
node {
stockHistoryId
summaryRows
}
}
}
}transactionCommitTimestamp
- Label: Transaction timestamp
- Type: dateRangeInput
- Enabled: Yes
Filter Type: Date range
Input Structure:
{
begin: string // ISO date format: "2024-01-01"
end: string // ISO date format: "2024-12-31"
}Usage Example:
query {
stockHistoryViewConnection(
first: 10
transactionCommitTimestamp: {
begin: "2024-01-01"
end: "2024-12-31"
}
) {
edges {
node {
stockHistoryId
transactionCommitTimestamp
}
}
}
}transactionCommitUser
- Label: Transaction user
- Type: List|UserLoginUrlString
- Enabled: Yes
Filter Type: Text value
This filter accepts freeform text values.
Usage Example:
query {
stockHistoryViewConnection(
first: 10
transactionCommitUser: "admin"
) {
edges {
node {
stockHistoryId
transactionCommitUser
}
}
}
}transactionCommitUserAccountType
- Label: Transaction user account type
- Type: List|String
- Enabled: Yes
- Options:
- API connection (##apiConnection)
- External user (##externalAuth)
- Finale staff (##finaleStaff)
- Finale user (##normal)
Filter Type: Predefined options
Get Current Options:
These options may vary by account configuration. To get the current list:
query {
dataSetMeta(purpose: "uiStockHistory") {
dataSets(name: "stockHistory") {
filters {
name
optionList {
value
label
}
}
}
}
}Usage Example:
query {
stockHistoryViewConnection(
first: 10
transactionCommitUserAccountType: ["##finaleStaff", "##externalAuth"]
) {
edges {
node {
stockHistoryId
transactionCommitUserAccountType
}
}
}
}transactionStatus
- Label: Transaction status
- Type: String
- Enabled: Yes
- Options:
- Canceled (##transactionFilterCanceled)
- Pending (##transactionFilterPending)
- Posted (##transactionFilterPosted)
- Posted, pending, or canceled (##transactionFilterAll)
Filter Type: Predefined options
Get Current Options:
These options may vary by account configuration. To get the current list:
query {
dataSetMeta(purpose: "uiStockHistory") {
dataSets(name: "stockHistory") {
filters {
name
optionList {
value
label
}
}
}
}
}Usage Example:
query {
stockHistoryViewConnection(
first: 10
transactionStatus: ["##transactionFilterPosted", "##transactionFilterCanceled"]
) {
edges {
node {
stockHistoryId
transactionStatus
}
}
}
}transactionType
- Label: Transaction type
- Type: List|String
- Enabled: Yes
- Options:
- Average cost change (1006)
- Build (1005)
- Purchase shipment (1002)
- Return shipment (1003)
- Sale shipment (1000)
- Stock change or take (1004)
- Transfer (1001)
Filter Type: Predefined options
Get Current Options:
These options may vary by account configuration. To get the current list:
query {
dataSetMeta(purpose: "uiStockHistory") {
dataSets(name: "stockHistory") {
filters {
name
optionList {
value
label
}
}
}
}
}Usage Example:
query {
stockHistoryViewConnection(
first: 10
transactionType: ["1000", "1001"]
) {
edges {
node {
stockHistoryId
transactionType
}
}
}
}transactionUpdateType
- Label: Transaction update type
- Type: List|String
- Enabled: Yes
- Options:
- Average cost change (15)
- Build consume completed (12)
- Build consume started (11)
- Build produce completed (13)
- Purchase shipment received (7)
- Quick stock transfer (9)
- Return shipment received (8)
- Sale shipment packed (0)
- Sale shipment packed shipped (2)
- Sale shipment packed transfer (1)
- Sale shipment shipped (4)
- Sale shipment unpacked (3)
- Stock change or take (10)
- Transfer shipment received (6)
- Transfer shipment shipped (5)
Filter Type: Predefined options
Get Current Options:
These options may vary by account configuration. To get the current list:
query {
dataSetMeta(purpose: "uiStockHistory") {
dataSets(name: "stockHistory") {
filters {
name
optionList {
value
label
}
}
}
}
}Usage Example:
query {
stockHistoryViewConnection(
first: 10
transactionUpdateType: ["0", "1"]
) {
edges {
node {
stockHistoryId
transactionUpdateType
}
}
}
}warning
- Label: Warning
- Type: List|String
- Enabled: Yes
- Options:
- Expected/resulting cost mismatch (##shWarningExpectedResultingCostMismatch)
- Missing average cost (##shWarningAverageCost)
- Missing purchase price (##shWarningPurchasePrice)
- Product value missing quantity (##shWarningValueAppliedToZeroQuantity)
- Total units available negative (##shWarningUnitsNegative)
Filter Type: Predefined options
Get Current Options:
These options may vary by account configuration. To get the current list:
query {
dataSetMeta(purpose: "uiStockHistory") {
dataSets(name: "stockHistory") {
filters {
name
optionList {
value
label
}
}
}
}
}Usage Example:
query {
stockHistoryViewConnection(
first: 10
warning: ["##shWarningAverageCost", "##shWarningPurchasePrice"]
) {
edges {
node {
stockHistoryId
warning
}
}
}
}