# Value Entries

`GET` _(Table: Value Entry)_

```
eOne/core/v1.0/valueEntries
```

"Read-only value entries, the cost layer behind every inventory movement. This is the source Business Central's own inventory valuation and cost of goods sold are built on."

## Use costAmountActual

`costAmountActual` is realised cost. Sum it for true COGS and for inventory value: it is the number Business Central posts to the inventory accounts.

`costAmountExpected` is the cost of quantity received or shipped but not yet invoiced. It is superseded as invoices arrive. **Adding the two double counts.**

## Several rows per movement

One item ledger entry usually has more than one value entry, so group by `itemLedgerEntryNumber` rather than expecting a single row:

| entryType | when it is written |
| --- | --- |
| Direct Cost | the original posting |
| Revaluation | someone revalued the item |
| Rounding | costing rounding residue |
| Indirect Cost | overhead applied |
| Variance | standard costing variance |

## Margin without a sales document

`salesAmountActual` and `costAmountActual` sit on the same row, so gross margin per item, per customer or per location comes straight off this feed with no join to a sales document and no unit-cost approximation.

Deriving cost from the item card unit cost instead gives a figure that changes whenever someone edits the item, and never matches the general ledger.

## Reconciling to the G/L

`costPostedToGl` is how much of the actual cost has reached the general ledger. A gap between it and `costAmountActual` means Post Inventory Cost to G/L has not been run, and it is the usual reason an inventory valuation report disagrees with the inventory account.

`inventoriable` is false for costs that never become inventory value, such as an item charge on a sale. Include them in COGS, exclude them from stock value.

## Volume

Typically the largest table in Business Central, larger than the item ledger itself. Bound the first load by `postingDate` or `entryNumber`, then run incrementally.

## Value Entries fields

_API column → BC field._

**Legend**

- _(req)_ required on create
- _(res)_ resolver
- _(cur)_ currency-translated
- _(ro)_ read-only
- _(ext)_ added to this endpoint by another extension (BC field name shown; its API column name is not known here)

| API | BC field | Notes |
| --- | --- | --- |
| `id` | SystemId | The Business Central record id. Unique on its own, and the key this feed is written against. _(ro)_ |
| `bcCompanyId` | bcCompanyId | The company this row belongs to - the same GUID that appears in the request URL. Present on every endpoint so a store pooling several companies can keep them apart without relying on which URL it called. _(ro)_ |
| `bcCompanyName` | bcCompanyName | The name of the company this row belongs to. _(ro)_ |
| `entryNumber` | Entry No. | Business Central's own entry number. _(ro)_ |
| `itemLedgerEntryNumber` | Item Ledger Entry No. | The inventory movement this cost belongs to. Join it to itemLedgerEntries.entryNumber. Several value entries can share one. _(ro)_ |
| `itemNumber` | Item No. | The item being costed. _(ro)_ |
| `variantCode` | Variant Code | The item variant, when one is used. _(ro)_ |
| `postingDate` | Posting Date | The date the cost posted. _(ro)_ |
| `valuationDate` | Valuation Date | The date the cost is recognised for valuation, which can differ from the posting date. _(ro)_ |
| `documentDate` | Document Date | The date on the source document. _(ro)_ |
| `entryType` | Entry Type | Direct Cost, Revaluation, Rounding, Indirect Cost or Variance. _(ro)_ |
| `itemLedgerEntryType` | Item Ledger Entry Type | The kind of movement being costed: Purchase, Sale, adjustment, transfer and so on. _(ro)_ |
| `documentType` | Document Type | The kind of posted document behind the cost. _(ro)_ |
| `documentNumber` | Document No. | The posted document behind the cost. _(ro)_ |
| `documentLineNumber` | Document Line No. | Which line of that document produced this cost. _(ro)_ |
| `externalDocumentNumber` | External Document No. | The counterparty's document number, when one was recorded. _(ro)_ |
| `description` | Description | The entry description. _(ro)_ |
| `locationCode` | Location Code | Where the costed movement happened. _(ro)_ |
| `valuedQuantity` | Valued Quantity | The quantity this cost row covers. Negative on outbound movements. _(ro)_ |
| `invoicedQuantity` | Invoiced Quantity | How much of the quantity has been invoiced. _(ro)_ |
| `itemLedgerEntryQuantity` | Item Ledger Entry Quantity | The quantity on the underlying movement, carried here so a cost per unit can be checked without joining. _(ro)_ |
| `costPerUnit` | Cost per Unit | The unit cost applied, in the company local currency. _(ro)_ |
| `costAmountActual` | Cost Amount (Actual) | The realised cost. Sum this for true cost of goods sold and for inventory value - it is the number Business Central posts to the inventory accounts. _(ro)_ |
| `costAmountExpected` | Cost Amount (Expected) | The cost of quantity received or shipped but not yet invoiced. Do not add it to costAmountActual; it is superseded as invoices arrive. _(ro)_ |
| `costAmountNonInvtbl` | Cost Amount (Non-Invtbl.) | Cost that does not become inventory value, such as an item charge on a sale. _(ro)_ |
| `costPostedToGl` | Cost Posted to G/L | How much of the actual cost has reached the general ledger. A gap means Post Inventory Cost to G/L has not been run. _(ro)_ |
| `expectedCostPostedToGl` | Expected Cost Posted to G/L | How much of the expected cost has reached the general ledger. _(ro)_ |
| `salesAmountActual` | Sales Amount (Actual) | The invoiced revenue for this movement, in the company local currency. With costAmountActual this gives margin at the source, with no join to a sales document. _(ro)_ |
| `salesAmountExpected` | Sales Amount (Expected) | Revenue shipped but not yet invoiced. _(ro)_ |
| `purchaseAmountActual` | Purchase Amount (Actual) | The invoiced purchase amount for this movement. _(ro)_ |
| `purchaseAmountExpected` | Purchase Amount (Expected) | Purchase amount received but not yet invoiced. _(ro)_ |
| `discountAmount` | Discount Amount | The discount applied on the source line. _(ro)_ |
| `expectedCost` | Expected Cost | Whether this row carries expected rather than actual cost. _(ro)_ |
| `inventoriable` | Inventoriable | Whether the cost becomes inventory value. Non-inventoriable rows never reach the inventory account. _(ro)_ |
| `adjustment` | Adjustment | Whether the row was written by the cost adjustment routine rather than by an original posting. _(ro)_ |
| `varianceType` | Variance Type | For a variance row, which variance it is: purchase, material, capacity, subcontracted or overhead. _(ro)_ |
| `inventoryPostingGroup` | Inventory Posting Group | The posting group that directed this cost to its inventory account. Join it to the inventoryPostingGroups endpoint. _(ro)_ |
| `sourceType` | Source Type | Whether the counterparty was a customer, vendor or item. _(ro)_ |
| `sourceNumber` | Source No. | The customer or vendor behind the movement. _(ro)_ |
| `salespersonPurchaserCode` | Salespers./Purch. Code | The salesperson or purchaser on the source document. _(ro)_ |
| `genBusPostingGroup` | Gen. Bus. Posting Group | The general business posting group on the source line. _(ro)_ |
| `genProdPostingGroup` | Gen. Prod. Posting Group | The general product posting group on the source line. _(ro)_ |
| `itemChargeNumber` | Item Charge No. | The item charge that produced this cost, when the row came from one. _(ro)_ |
| `orderType` | Order Type | The kind of order that generated the movement. _(ro)_ |
| `orderNumber` | Order No. | The order that generated the movement. _(ro)_ |
| `sourceCode` | Source Code | What kind of posting produced the entry. _(ro)_ |
| `dimensionSetId` | Dimension Set ID | The dimension set this record carries. Join it to the dimensionSetEntries endpoint to resolve the full set of dimension codes and values, including any beyond the eight shortcut dimension columns. _(ro)_ |
| `lastModifiedDateTime` | SystemModifiedAt | The last date and time the record was modified. Use it as the watermark for an incremental pull. _(ro)_ |
