Table

RetailTransactionDiscountTransHistory

Archived commerce discount transactions

Archived discount lines for Commerce transactions. Each row records the discount type and origin (customer, periodic, manual, loyalty or tender), amounts, percentages and offer details. Rows link to a sales line within a transaction by store, register and transaction number.

Table name
RetailTransactionDiscountTransHistory
Module
Commerce transactions and orders
Table group
Transaction
Table type
Regular
Data per company
Yes
Configuration key
Retail
Primary index
None
Replacement key
None
Key fields
None
Model
Foundation

Fields (30)

Field and descriptionType / EDT / enumMandatoryReferencesIn public entities
AmountFull discount amount; currency not stated in the metadata.Real
RetailDiscAmount
NoNone
AppliedDiscountLineNumLine number of the applied discount.Real
LineNum
NoNone
BundleIdID of the discount bundle.Integer
RetailDiscountBundleId
NoNone
CalculatedPricingPriorityNumberPricing priority number of the discount.Integer
RetailPricingPriorityNumber
NoNone
ChannelReference to the channel record, stored as a record ID.Int64
RefRecId
NoNone
CustomerDiscountTypeKind of customer discount: none, line, multiline or total discount.Enum
RetailCustomerDiscountType (enum)
NoNone
DataAreaIdThe company (legal entity) that the record belongs to. System field.String (4)
DataAreaId
NoNone
DealPriceDeal price value for the discount.Real
RetailDealPriceValue
NoNone
DiscountAmountCash discount amount; currency not stated in the metadata.Real
DiscAmount
NoNone
DiscountCodeCode of the discount.String (60)
RetailDiscountCodeId
NoNone
DiscountCostCost of the discount to the business.Real
RetailDiscountCost
NoNone
DiscountLineRecIdRecord ID of the related discount line.Int64
RefRecId
NoNone
DiscountOriginTypeWhere the discount came from: customer, periodic, manual, loyalty points or tender discount.Enum
RetailDiscountOriginType (enum)
NoNone
EffectivePercentageEffective discount percentage.Real
DiscPct
NoNone
LineNumLine number of the discount line.Real
LineNum
YesNone
ManualDiscountTypeKind of manual discount: line or total, as an amount or a percentage.Enum
RetailManualDiscountType (enum)
NoNone
OriginLocation number showing where the record came from.String (50)
RetailConnDistributionLocationId
NoNone
PartitionA system field for the data partition. In most environments every record has the same value. System field.Int64
Partition
NoNone
PercentageDiscount percentage.Real
DiscPct
NoNone
PeriodicDiscountOfferIdID of the periodic discount offer.String (20)
RetailOfferIdEx3
NoNone
RecIdA unique number that the system gives to every record. Other tables often use it to point to this record. System field.Int64
RecId
NoNone
RecVersionA system number that changes each time the record is updated. It is used to detect conflicting updates. System field.Integer
RecVersion
NoNone
ReplicationCounterFromOriginCounter value from the origin location, used to track replication of the record.Integer
RetailReplicationCounter
NoNone
SaleLineNumLine number of the sales line the discount applies to.Real
RetailTransactionSalesLineNum
NoNone
StoreIdNumber of the store where the transaction took place.String
RetailStoreId
NoNone
SysRowVersionA system row version number that is used for change tracking. System field.Int64
SysRowVersion
NoNone
SysRowVersionNumberSystem version number of the row. It has no label.low confidenceInt64
SysRowVersionNumber
NoNone
TableIdA system number that identifies the table. System field.Integer
TableId
NoNone
TerminalIdNumber of the register where the transaction took place.String
RetailTerminalId
NoNone
TransactionIdNumber of the transaction.String (44)
RetailTransactionId
YesNone

Indexes (2)

Get this data out

No public entity reads from RetailTransactionDiscountTransHistory. Its data is only reachable through the application, a custom entity or a database export.

Need help with RetailTransactionDiscountTransHistory in a report, an integration or a migration? Talk to Dr Dynamics.

Email sales@drdynamics.co.uk