DealId | MGCEarmarkDealId | Yes | The deal ID of the Earmark deal this row targets for, stored alongside the record reference as the readable half of the key. It is stamped from the parent deal when the row is written and is what a data-management export, a migration load or a support engineer reads. Table standard TDD-EAR-000 section 7.1. |
LineNum | LineNum | Yes | The display order of this targeting row within its deal, and the readable half of the row's natural key. Deal ID plus line number is what the targeting data entity imports against, because a record ID is meaningless in an export and worthless after a migration. The number is allocated by the row itself when a writer does not supply one, it is unique within the deal, and it never participates in resolution - precedence is decided by the four axes, then by priority, then by effective date, then by creation order. Requirement A4. |
ItemSelector | MGCEarmarkItemSelector | No | How this row selects products - a specific item (Table), an item group (Group), a category in the targeting category hierarchy (Category), or everything (All). The item axis is the only axis that carries Category, and Category rows resolve against the hierarchy named in Earmark parameters, which is why that parameter cannot be changed or cleared while any live deal carries a Category row. Precedence on this axis runs Table before Group before Category before All. Table is the default rather than All, deliberately: a row nobody finishes is refused for a missing relation rather than silently targeting the whole catalog. Requirements A1, A4 and A5; rule BR-04. |
ItemRelation | MGCEarmarkItemRelation | No | The item, item group or category name this row selects, read according to the item code. It holds up to 60 characters, which is wider than the native trade-agreement relation, because a merchandising category name does not fit in 20. It is mandatory for every item code except All, and it must be left empty when the item code is All - a row that claims to target everything and also names a relation is refusing to say what it means, so it is refused. On a Category row it is stamped from the category reference rather than typed. Changing the item code clears it, per axis and per row. Requirement A4; rules BR-04 and BR-05. |
AccountSelector | MGCEarmarkAccountSelector | No | How this row selects counterparties - a specific customer or vendor account (Table), an account group (Group), or every account (All). Which side is read follows the deal's module. The account axis has no Category value at all: category targeting is an item-side concept, and the account side of a category-targeted deal resolves by item group. Precedence on this axis runs Table before Group before All. On an inventory deal the account axis carries no meaning and must be set to All. Requirements A4 and A5; rules BR-03 and BR-06. |
AccountRelation | MGCEarmarkAccountRelation | No | The customer, vendor or account group this row selects, read according to the account code and the deal's module. It holds up to 60 characters, matching the item relation beside it. It is mandatory for every account code except All, and it must be left empty when the account code is All. Changing the account code clears the relation, per axis and per row. Requirement A4; rules BR-03 and BR-05. |
InventDimId | InventDimId | No | The inventory dimension combination this row narrows to - a specific configuration, color, size, style, site or warehouse combination. Blank means the row matches any dimension combination, and that is the shipped default. Precedence treats a specified dimension as more specific than a blank one, so a dimension-bearing row outranks an otherwise identical row that leaves it blank. Requirements A4 and A5. |
UnitSymbol | UnitOfMeasureSymbol | No | The unit of measure this row applies to. Leaving it empty means any unit, and a row that names a unit is more specific than one that does not - the unit is the least significant of the four specificity axes, consulted only when item, account and inventory dimension have all tied. Requirements A4 and A5. |
Priority | MGCEarmarkPriority | No | The author's own tie-break between rows that are equally specific. It is consulted only after every axis has been compared, and a lower number wins. If priority is also equal the later effective-from date wins, and if that is equal too the row created first wins - so resolution is total and deterministic and never depends on the order rows happen to be read in. Requirement A5. |
EffectiveFrom | TransDate | No | The first date this targeting row is live, within its deal's validity window. Leaving it blank means the row is live from the start of the deal's window. A stated date that falls before the deal's effective date is refused, because a targeting row can only ever narrow its deal's availability, never widen it. Requirement A4. |
EffectiveTo | TransDate | No | The last date this targeting row is live, within its deal's validity window. Leaving it blank means the row is live to the end of the deal's window. A stated date after the deal's expiration date is refused, and the expiration must not fall before the row's own effective date. Requirement A4. |
SpecificityRank | MGCEarmarkSpecificityRank | No | The row's own specificity, computed from its four axes and stored so that the qualifying row recorded on an accrual instance can be compared and reported without re-deriving it. The formula is fixed and published, because other Earmark packages read this number: the item weight times a thousand, plus the account weight times a hundred, plus the dimension weight times ten, plus the unit weight - item Table 4, Group 3, Category 2, All 1; account Table 3, Group 2, All 1; a specified dimension or unit 2 against a blank one 1. A higher rank is more specific. The rank is stamped by the row itself on every write and a supplied value is discarded; comparing candidate rows, applying the tie-breaks and choosing the single winning row within a deal is the deal resolver's work and is implemented once, there. Requirement A5. |