Skip to main content

MGCEarmarkClaimEntity

The read-only export of Earmark claim headers - the documents that turn accrued deal money into a counterparty credit. It is keyed on the claim ID, the natural key, never a record id, and it publishes both accounts the claim carries: the invoice account, which is the posting target and the grouping key, and the counterparty account, which is the party a person recognizes. The reversal reference travels as the reversing claim's ID rather than as a record id, so a reversal pair can be reconstructed from an exported file. The entity is read-only because every transition on a claim is a policy act with its own guard - generation runs the eligibility predicate and the movement engine; submission and approval run the segregation-of-duties verdicts and the full re-validation set; reversal runs the settlement check - and a writable entity would be a door into that state machine with none of them behind it. Copy-configuration is off: claims are transactional, and copying one into a test environment would put a live counterparty and a live amount where different people and different security apply. Implements requirements D1, D3 and D4.

  • Public collection name: MGCEarmarkClaims
  • Primary key: ClaimId

Fields​

NameTypeMandatoryDescription
ClaimIdMGCEarmarkClaimIdYesThe claim's identifier, issued from the claim number sequence and quoted to the customer as the first half of the claim reference. It is frozen from insert and can never be edited, because it has been printed on a statement and used as journal text.
CounterpartyTypeMGCEarmarkClaimCounterpartyTypeNoWhether this claim credits a customer or a vendor. It is frozen from insert: the counterparty side decides which posting profile resolves the accounts and which native transaction table the credit lands in, so changing it would re-aim a posting that has already been described.
CounterpartyAccountMGCEarmarkAccountRelationNoThe trading party the deal was struck with - WHAT THE USER RECOGNIZES. On a chain account this is not the party that pays, which is why it is a separate column from the invoice account. It is shown so a claims clerk can recognize the claim; it is never the posting target.
InvoiceAccountMGCEarmarkAccountRelationYesThe account the credit posts to, and the key claims are grouped by - one claim per invoice account per deal currency. It is THE POSTING TARGET, and it is frozen from insert: moving it would re-aim a credit at a different customer without re-cutting the claim.
CurrencyCodeCurrencyCodeYesThe deal currency every line on this claim accrued in, and the second half of the grouping key. Amounts on the claim are held in it, with the accounting amount beside them.
StatusMGCEarmarkClaimStatusNoWhere this claim stands. Written only by the claim orchestrators, and the table enforces that: outside the lifecycle write context a status change is refused in every case, including from a runnable job or a data-management load. Only five moves are legal, and approved is final.
PostingStatusMGCEarmarkClaimPostingStatusNoWhether the claim's journals have posted. It starts at posting pending, which is the enum's zero precisely so that an unset value cannot claim a credit exists when it does not.
AssignedToUserIdNoThe user currently working this claim. Together with the status this drives the My claims and Unassigned queues. Assignment is deliberately free of the lifecycle write context: picking up work is not a state change and moves no money.
AssignedByUserIdNoWho made the current assignment. On a self-service take this is the same user as the assignee; on a supervisor assignment it is not, and the difference is worth keeping.
AssignedDateTimeTransDateTimeNoWhen the current assignment was made.
GeneratedByUserIdNoWho ran the generator that created this claim. Frozen from insert, because it is half of the segregation-of-duties test at approval - the approver may not be the generator - and a stamp that could be edited afterwards would be worthless as a control.
GeneratedDateTimeTransDateTimeNoWhen the claim was generated. Frozen from insert.
SubmittedByUserIdNoWho submitted the claim for approval. The other half of the segregation-of-duties test: the approver may be neither the generator nor the submitter.
SubmittedDateTimeTransDateTimeNoWhen the claim was submitted for approval.
ApprovedByUserIdNoWho approved the claim. Approval is what posts the credit, so this is the name behind the money.
ApprovedDateTimeTransDateTimeNoWhen the claim was approved, and therefore the date the credit ages from.
WorkflowInstanceIdWorkflowInstanceIdNoThe native workflow instance that carried this claim's approval. It is the second half of the idempotency key the integration operation uses, which is what makes a repeated approval call incapable of posting a second credit.
TotalAmountCurMGCEarmarkClaimAmountNoThe total the claim asks for, in the deal currency, being the sum of its lines. It is what was ASKED FOR at generation - it is not what is still open on the credit, which is read live and never stored.
TotalAmountMSTAmountMSTNoThe claim total in the accounting currency. Each line carries the exchange rate that produced its own accounting amount; this total is the sum of those amounts, not a re-conversion of the transaction-currency total, so the claim and the ledger agree to the cent.
ReturnFlagBadgeNoYesIdNoWhether any line on this claim carries a return that arrived after the claim was made and has not yet been accepted or rejected. Rolled up from the lines, never entered - it exists so a queue can show at a glance which claims need a human decision before they are submitted.
ReversalClaimIdMGCEarmarkClaimIdYesThe claim's identifier, issued from the claim number sequence and quoted to the customer as the first half of the claim reference. It is frozen from insert and can never be edited, because it has been printed on a statement and used as journal text.

Mappings​

Entity fieldData sourceField
ClaimIdMGCEarmarkClaimClaimId
CounterpartyTypeMGCEarmarkClaimCounterpartyType
CounterpartyAccountMGCEarmarkClaimCounterpartyAccount
InvoiceAccountMGCEarmarkClaimInvoiceAccount
CurrencyCodeMGCEarmarkClaimCurrencyCode
StatusMGCEarmarkClaimStatus
PostingStatusMGCEarmarkClaimPostingStatus
AssignedToMGCEarmarkClaimAssignedTo
AssignedByMGCEarmarkClaimAssignedBy
AssignedDateTimeMGCEarmarkClaimAssignedDateTime
GeneratedByMGCEarmarkClaimGeneratedBy
GeneratedDateTimeMGCEarmarkClaimGeneratedDateTime
SubmittedByMGCEarmarkClaimSubmittedBy
SubmittedDateTimeMGCEarmarkClaimSubmittedDateTime
ApprovedByMGCEarmarkClaimApprovedBy
ApprovedDateTimeMGCEarmarkClaimApprovedDateTime
WorkflowInstanceIdMGCEarmarkClaimWorkflowInstanceId
TotalAmountCurMGCEarmarkClaimTotalAmountCur
TotalAmountMSTMGCEarmarkClaimTotalAmountMST
ReturnFlagBadgeMGCEarmarkClaimReturnFlagBadge
ReversalClaimIdReversalClaimClaimId