MGCEarmarkDeal
The Earmark deal is the product's agreement object - the record that turns deal money into a governed object. It carries the identity, the module and shape discriminators, the trigger side, the validity window, the commercial terms, exactly one economic rate basis, the two orthogonal attributes claimable-by and account source, and the lifecycle stamps. A deal is written in Planning, submitted to the native deal approval workflow, and costs money only once it is Approved. Requirements A3, A7, A8, A11 and A12.
Fields
| Name | Type | Mandatory | Description |
|---|---|---|---|
DealId | MGCEarmarkDealId | Yes | The identifier of the Earmark deal. It is allocated from the Deal ID number sequence when one is configured and typed by the author when one is not, it is quoted on every claim statement and cited by every accrual instance the deal produces, and it cannot be changed once the deal exists. |
Name | MGCEarmarkDealName | Yes | The readable name of a deal or a deal group, in the words the person reading a list, a report or a claim statement will recognize. One hundred characters is long enough for a customer's own program naming without inviting a free-text note; the explanation of why a deal was ended or amended belongs on the reason note, not here. The name is a title field, so it is what the record is called wherever it appears beside its identifier, and it is one of the few values an approved deal may still change - and then only through an amendment. Implements requirements A3 and A14. |
DealGroupId | MGCEarmarkDealGroupId | No | An optional grouping used for reporting and for narrowing the Test deal resolution what-if. A deal group has no effect on which deals the resolver returns or on how much money they accrue. |
DealOwner | UserId | No | The user who owns this deal. The owner is notified when the deal is closed and is the subject of the My deals list-page view. A user rather than a worker, because notification and alerting key on the user. |
Module | MGCEarmarkModule | Yes | |
Shape | MGCEarmarkDealShape | Yes | |
TriggerSide | MGCEarmarkTriggerSide | No | |
ValidFrom | TransDate | Yes | The first date on which this deal can be resolved onto an order line. Both ends of the validity window are mandatory: an Earmark deal is never open-ended, and the AX date interval code is deliberately not carried. |
ValidTo | TransDate | Yes | The last date on which this deal can be resolved onto an order line. Expiry is not a lifecycle act - the deal simply stops being returned by the resolver, with no status change, no timeline row and no event. It is one of the six fields an approved deal may still change through the amendment workflow. |
CurrencyCode | CurrencyCode | Yes | The currency in which this deal's rate, thresholds and lifetime cap are expressed, and in which its accruals are held. It is part of the resolver's candidate query, so a deal never attaches to a line in another currency. |
TaxGroup | TaxGroup | No | An optional sales tax group carried onto the claim raised against this deal. Leave it empty to take the tax group from the counterparty in the usual way. |
PaymModeId | MGCEarmarkNaturalKey | No | An optional restriction to one method of payment. The value is resolved against customer methods of payment on a customer deal and vendor methods of payment on a vendor deal - one stored field, two relations, chosen by the module. Leave it empty to place no payment-method restriction on the deal. |
AccrualPoint | MGCEarmarkAccrualPoint | No | |
PriceMode | MGCEarmarkPriceMode | No | |
DealUnit | UnitOfMeasureSymbol | No | The unit in which this deal's rate and its quantity thresholds are expressed. It is required: a deal with no unit is refused when it is saved.A line whose unit cannot be converted to the deal unit produces the verdict Unit not convertible rather than a silently mis-scaled accrual. |
RateBasis | MGCEarmarkRateBasis | Yes | |
AccrualAmount | MGCEarmarkAccrualAmount | No | The deal money per unit quantity, in the deal currency and deal unit. Used when the rate basis is Amount per unit. Its sign is the deal's sign - there is no separate sign field, so the direction of the money and the money itself can never disagree. |
AccrualAmountUnitQty | MGCEarmarkAmountUnitQty | No | The quantity the accrual amount is stated per - 1 for a per-unit rate, 100 for a per-hundredweight rate. It must be greater than zero on an amount-per-unit deal. The default comes from Earmark parameters. |
AccrualPercent | MGCEarmarkRatePercent | No | The deal money as a percentage of the base. Used when the rate basis is Percent of base. Which base is percentaged is decided by the price build-up, not here. |
FixedAmount | MGCEarmarkAccrualAmount | No | The deal money as a flat amount per qualifying transaction, in the deal currency and independent of quantity. Used when the rate basis is Fixed per transaction. |
MinAccrualPerTrans | MGCEarmarkAccrualAmount | No | The smallest accrual this deal will produce on one transaction. Zero means no minimum. Clipping operates on the absolute value and re-applies the sign, so a negative deal clips symmetrically. |
MaxAccrualPerTrans | MGCEarmarkAccrualAmount | No | The largest accrual this deal will produce on one transaction. Zero means no maximum. A clipped accrual is a verdict with its own badge, not a failure. |
LifetimeCap | MGCEarmarkAccrualAmount | No | The most this deal will ever accrue in total, in the deal currency. Zero means uncapped. The cap applies regardless of criteria type, and it may be amended below the amount already accrued - the headroom simply floors at zero and nothing reverses. It is one of the six fields an approved deal may still change through the amendment workflow. |
MinQuantity | MGCEarmarkDealQty | No | The smallest quantity, in the deal unit, that qualifies for this deal's money. Zero means no minimum. Qualifying quantity is evaluated per deal and counterparty, never on the deal aggregate. |
MaxQuantity | MGCEarmarkDealQty | No | The largest quantity, in the deal unit, that qualifies for this deal's money. Zero means no maximum. |
CriteriaType | MGCEarmarkCriteriaType | No | |
AllowAmountEdit | NoYes | No | Whether the price builder may edit this deal's proposed amount on the order line. When it is No, the amount the deal resolves to is the amount that is built. |
HeadroomAlertPercent | MGCEarmarkRatePercent | No | The percentage of the lifetime cap remaining at which this deal starts warning that it is approaching its cap. It overrides the company default in Earmark parameters. Leave it empty to raise no headroom warning. It is one of the six fields an approved deal may still change through the amendment workflow. |
ClaimableBy | MGCEarmarkClaimableBy | No | |
AccountSource | MGCEarmarkAccountSource | No | |
FundingVendorAccount | VendAccount | No | The vendor who funds this deal, on a sales-triggered vendor accrual only. This is not the mirror's funding vendor - a mirror's funders are named per funding rule on the customer deal, not here. |
Status | MGCEarmarkDealStatus | No | |
SubmittedBy | UserId | No | The user who submitted this deal to the approval workflow. Stamped by the lifecycle; never entered. |
SubmittedDateTime | TransDateTime | No | When this deal was submitted to the approval workflow. Stamped by the lifecycle; never entered. |
ApprovedBy | UserId | No | The user who approved this deal. It is never the deal's author: the approver-is-not-the-author rule is enforced at the approval step regardless of whether segregation-of-duties rules were ever seeded. |
ApprovedDateTime | TransDateTime | No | When this deal was approved. Stamped by the lifecycle; never entered. |
EndedBy | UserId | No | The user who canceled, closed or aborted this deal. Stamped by the lifecycle; never entered. |
EndedDateTime | TransDateTime | No | When this deal was canceled, closed or aborted. Stamped by the lifecycle; never entered. |
EndReasonCode | ReasonCode | No | The financial reason code recorded when this deal was canceled, closed or aborted. It is mandatory on all three, and it must be a reason flagged as applicable to Earmark. |
EndReasonNote | MGCEarmarkReasonNote | No | The free-text note recorded beside the end reason code, carried onto the deal's timeline row. |
WorkflowInstanceId | WorkflowInstanceId | No | The native workflow instance correlating this deal with its approval. Written by the workflow, read by the workflow callbacks, and of no interest to a user. |