Skip to main content

MGCEarmarkLinePriceEntity

Read-only. The decomposition per build, including history and stale state - the feed that answers how much of what was invoiced is deal money the customer will hand back. Every build is exported, not only the current one, so a revenue model can filter on the current flag while an audit reads the whole history of a line that was priced three times. It cannot create a build: building a price also freezes an accrual instance per included deal in one transaction, and a build no instance backs would be money the deal balance has never heard of.

  • Public collection name: MGCEarmarkLinePrices
  • Primary key: LinePriceRecId, OrderId, LineNum, BuildNumber

Fields​

NameTypeMandatoryDescription
LinePriceRecIdRefRecIdNo
OrderIdMGCEarmarkNaturalKeyNoThe order number, in readable form. It exists because a record reference is unreadable in an export, unusable in a data-management load and worthless after a migration - and above all because a build survives the deletion of its line, after which this and the line number are the only things left that say what the build was about.
LineNumLineNumNoThe line number on the order, in readable form, stored for the same reason as the order number: it is what makes a build meaningful to a person, and what still identifies it after the line has been deleted.
BuildNumberMGCEarmarkBuildNumberYesThe ordinal of this build within this line's history, starting at 1. Together with the line reference it is the alternate key, so two builds of one line can never share a number.
LineTableIdRefTableIdYesWhich kind of order line this build belongs to. The build table serves the sales line today and the purchase line through the vendor-shape package, and a record reference alone cannot say which of the two it came from, so the table is stored beside it and every index leads on the pair.
LineRecIdRefRecIdYesThe record reference of the order line this build belongs to. It is half of the key and is not enough on its own: it says nothing to a person reading an export and it points at nothing once the line is deleted, which is why the order number and line number are stored as well.
InventTransIdInventTransIdNoThe inventory transaction identifier of the line, stored as the second half of the key and as the join to the accrual instances this build froze. It is what lets a movement posted months later be traced back to the price that promised it.
CurrentNoYesIdNoWhether this is the build the line is priced at now. Exactly one build per line may be current, which the platform cannot express as an index and which the table therefore enforces on every write.
BuildStateMGCEarmarkBuildStateNoWhere this build stands. Built is a price that still matches its line; Stale is one whose line has moved underneath it, with a reason row for each thing that changed; Unbuilt is a build that was withdrawn, which is terminal. There is no "not built" state - a line that was never built simply has no current row.
BuildSourceMGCEarmarkBuildSourceNoWhich door this build came through - the price builder form, the Conduit service, or an inbound pricing policy. It is recorded as provenance and nothing branches on it: a build made by an integration is governed by exactly the same rules as one made by an order taker.
IdempotencyKeyMGCEarmarkIdempotencyKeyNoThe caller-supplied key that makes a repeated build request incapable of building twice. A non-blank key that has been seen before is refused. It is blank for a build raised from the price builder form, which has no caller to supply one, and blanks are never compared with each other.
BuiltByUserIdNoWho built this price. Stamped rather than supplied, because it is the fact an auditor asks for and the fact a caller has no reason to provide.
BuiltDateTimeTransDateTimeNoWhen this price was built, in coordinated universal time. Stamped rather than supplied, for the same reason as the actor.
BasePriceCurMGCEarmarkUnitPriceAmountNoThe base price the build started from, per price unit, in the transaction currency. It is the commodity price before any margin over the basis and before any deal money.
BasePriceMSTMGCEarmarkUnitPriceAmountNoThe base price converted to the accounting currency using the rate stored on this build. It is a snapshot, not a live conversion - the rate that produced it is stored beside it so the figure can always be explained.
OverBasisCurMGCEarmarkOverBasisAmountNoThe amount added over the base price, per price unit, in the transaction currency. It may be negative, because a line may be sold under its basis; the built unit price as a whole may not fall below zero.
OverBasisMSTMGCEarmarkOverBasisAmountNoThe over-basis converted to the accounting currency using the rate stored on this build.
DealMoneyCurMGCEarmarkDealMoneyAmountNoThe total trade-deal money grossed into the invoiced price, per price unit, in the transaction currency. This is the liability inside the price: the customer is invoiced it and will claim it back. Off-invoice allowances are excluded and are carried separately.
DealMoneyMSTMGCEarmarkDealMoneyAmountNoThe deal money converted to the accounting currency using the rate stored on this build.
AllowanceCurMGCEarmarkAllowanceAmountNoThe total deal money held off the invoice, per price unit, in the transaction currency. It is a commitment to the customer that was never added into the price they were charged, so it is NOT part of the built unit price - adding it would count the liability twice.
AllowanceMSTMGCEarmarkAllowanceAmountNoThe off-invoice allowance converted to the accounting currency using the rate stored on this build.
UnitPriceCurMGCEarmarkUnitPriceAmountNoThe unit price this build produced - base plus over-basis plus deal money - per price unit, in the transaction currency. It is the value written back to the order line, and it excludes off-invoice allowances.
UnitPriceMSTMGCEarmarkUnitPriceAmountNoThe built unit price converted to the accounting currency using the rate stored on this build.
PriceUnitPriceUnitNoThe number of units every amount on this build is expressed per. A price of 250 means nothing until you know whether it is per each or per hundred, which is why the price unit is stored on the build rather than read from the line, where it may since have changed.
PriceModeSummaryMGCEarmarkPriceModeNoThe price mode of the invoiced half of this build - the mode that actually shaped the price on the order line. When a build carries both grossed-up deal money and an off-invoice allowance, the surfaces that show this column display "Mixed", which is computed from the two amounts rather than stored: there is no Mixed value in the price mode enumeration and there must not be one, because that enumeration also governs accrual instances, where Mixed would mean nothing. Company default is refused on any build that moved deal money, because every included deal's mode is resolved at build time and an unresolved mode would be silently grossed into an invoiced price.
PreBuildUnitPriceMGCEarmarkUnitPriceAmountNoThe unit price the order line carried immediately before this build wrote its own value over it. It is what Unbuild restores, which is the only reason it exists - without it, withdrawing a build would leave the line at a price nobody chose.
BuildExchRateExchRateNoThe exchange rate that produced every accounting-currency figure on this build. It is stored rather than re-derived because a rate that has since moved would make the stored figures unexplainable, and an amount nobody can reproduce is not evidence.
BuildRateTypeExchangeRateTypeNameNoThe exchange rate type the build's rate was taken from, stored beside the rate so the figure can be reproduced exactly.
BuildRateDateTransDateNoThe date the build's exchange rate was taken for, stored beside the rate and the rate type so the figure can be reproduced exactly.
FpItemIdItemIdNoThe item the line carried when this price was built. It is one of the eight facts the stale detector compares after every change; if it differs, the build is flagged stale with an Item reason. It is immutable, because a fingerprint that could be updated would be compared with itself and nothing would ever be stale.
FpInventDimIdInventDimIdNoThe inventory dimensions the line carried when this price was built. Compared after every change; a difference flags the build stale with a Dimensions reason. Immutable.
FpQtyMGCEarmarkDealQtyNoThe quantity the line carried when this price was built. Compared after every change; a difference flags the build stale with a Quantity reason, because a deal's qualifying quantity and its per-transaction limits are both quantity-sensitive. Immutable.
FpSalesUnitUnitOfMeasureSymbolNoThe unit the line was sold in when this price was built. Compared after every change; a difference flags the build stale, because every deal amount on the build was converted into this unit. Immutable.
FpPriceUnitPriceUnitNoThe price unit the line carried when this price was built. Compared after every change; a difference flags the build stale, because every amount on the build is expressed per this many units. Immutable.
FpInvoiceAccountMGCEarmarkAccountRelationNoThe account the line was to be invoiced to when this price was built. Compared after every change - including a change made on the order header - because a deal is targeted at a counterparty and a different invoice account may qualify for different deals entirely. Immutable.
FpEligibilityDateTransDateNoThe date the deals on this build were judged eligible against, taken from whichever line date the eligibility date basis parameter names. Compared after every change; a difference flags the build stale, because a deal's validity window may no longer cover the new date. Immutable.
FpCurrencyCodeCurrencyCodeNoThe transaction currency every amount on this build is expressed in. It is the build's own currency column as well as part of the fingerprint, deliberately stored once rather than twice. A change to it is the SPECIAL stale reason: the built price is arithmetic in a currency the order no longer uses, so the natively re-derived price stands and the build is void in the new currency. Immutable.
AcknowledgedByUserIdNoWho accepted that this build is still the right price even though its line has changed. Acknowledging keeps the price and clears the stale flag; it does not rebuild and does not touch the fingerprint.
AcknowledgedDateTimeTransDateTimeNoWhen the stale state of this build was accepted, in coordinated universal time. It is written together with the actor: half an acknowledgement is what a form leaves behind when it fails partway, and it would sit in the stale list looking answered.
AcknowledgeReasonCodeReasonCodeNoThe reason code recorded when the stale state was accepted, so that a later reader can tell a considered decision from a cleared inbox.

Mappings​

Entity fieldData sourceField
LinePriceRecIdMGCEarmarkLinePriceRecId
OrderIdMGCEarmarkLinePriceOrderId
LineNumMGCEarmarkLinePriceLineNum
BuildNumberMGCEarmarkLinePriceBuildNumber
LineTableIdMGCEarmarkLinePriceLineTableId
LineRecIdMGCEarmarkLinePriceLineRecId
InventTransIdMGCEarmarkLinePriceInventTransId
CurrentMGCEarmarkLinePriceCurrent
BuildStateMGCEarmarkLinePriceBuildState
BuildSourceMGCEarmarkLinePriceBuildSource
IdempotencyKeyMGCEarmarkLinePriceIdempotencyKey
BuiltByMGCEarmarkLinePriceBuiltBy
BuiltDateTimeMGCEarmarkLinePriceBuiltDateTime
BasePriceCurMGCEarmarkLinePriceBasePriceCur
BasePriceMSTMGCEarmarkLinePriceBasePriceMST
OverBasisCurMGCEarmarkLinePriceOverBasisCur
OverBasisMSTMGCEarmarkLinePriceOverBasisMST
DealMoneyCurMGCEarmarkLinePriceDealMoneyCur
DealMoneyMSTMGCEarmarkLinePriceDealMoneyMST
AllowanceCurMGCEarmarkLinePriceAllowanceCur
AllowanceMSTMGCEarmarkLinePriceAllowanceMST
UnitPriceCurMGCEarmarkLinePriceUnitPriceCur
UnitPriceMSTMGCEarmarkLinePriceUnitPriceMST
PriceUnitMGCEarmarkLinePricePriceUnit
PriceModeSummaryMGCEarmarkLinePricePriceModeSummary
PreBuildUnitPriceMGCEarmarkLinePricePreBuildUnitPrice
BuildExchRateMGCEarmarkLinePriceBuildExchRate
BuildRateTypeMGCEarmarkLinePriceBuildRateType
BuildRateDateMGCEarmarkLinePriceBuildRateDate
FpItemIdMGCEarmarkLinePriceFpItemId
FpInventDimIdMGCEarmarkLinePriceFpInventDimId
FpQtyMGCEarmarkLinePriceFpQty
FpSalesUnitMGCEarmarkLinePriceFpSalesUnit
FpPriceUnitMGCEarmarkLinePriceFpPriceUnit
FpInvoiceAccountMGCEarmarkLinePriceFpInvoiceAccount
FpEligibilityDateMGCEarmarkLinePriceFpEligibilityDate
FpCurrencyCodeMGCEarmarkLinePriceFpCurrencyCode
AcknowledgedByMGCEarmarkLinePriceAcknowledgedBy
AcknowledgedDateTimeMGCEarmarkLinePriceAcknowledgedDateTime
AcknowledgeReasonCodeMGCEarmarkLinePriceAcknowledgeReasonCode