Table
RetailSalesTableHistory
Commerce sales orders
Holds retail details for a commerce sales order, such as channel, store, register, loyalty card and discount data. Each record points to one sales order through a reference to SalesTable. It also has payment type, product list and country-specific tax fields for India and Mexico.
- Table name
RetailSalesTableHistory- Module
Commerce transactions and orders- Table group
Miscellaneous- Table type
Regular- Data per company
Yes- Configuration key
Retail- Primary index
None- Replacement key
None- Key fields
None- Model
Foundation
Fields (38)
| Field and description | Type / EDT / enum | Mandatory | References | In public entities |
|---|---|---|---|---|
ChannelReferenceIdReference code the sales channel uses for this order. | String (50)RetailOrderChannelReferenceId | No | None | |
CouponsStored list of coupons linked to the order. | ContainerRetailCoupons | No | None | |
CreditCardTenderTypeIdID of the payment method used. | StringRetailStoreTenderTypeId | No | None | |
CreditCardTypeIdID of the card type used for payment. | StringRetailStoreCardTypeId | No | None | |
DataAreaIdThe company (legal entity) that the record belongs to. System field. | String (4)DataAreaId | No | None | |
DiscountCodesStored list of discount codes linked to the order. | ContainerRetailDiscountCodes | No | None | |
GSTTransactionId_INGST transaction ID of the invoice, used for India. | String (50)TaxTransactionId_IN | No | None | |
GSTTransactionIdFromPOS_INYes/no flag used for India. It appears to show whether the GST transaction ID came from the point of sale.low confidence | EnumNoYes (enum) | No | None | |
InitialReceiptIdReceipt number first created for the order in the point of sale app. | String (18)RetailInitialReceiptId | No | None | |
IsPriceAndDiscountRecalculationRequiredYes/no flag showing whether prices and discounts need to be recalculated. | EnumNoYes (enum) | No | None | |
IsTaxExemptedForPriceInclusiveYes/no flag showing whether tax was exempted where prices include tax. | EnumRetailIsTaxExemptedForPriceInclusiveNoYes (enum) | No | None | |
OMInternalOrganizationReference to the internal organisation linked to the order. | Int64RefRecId | No | None | |
OriginalTransactionTimeDate and time of the original transaction, stored in UTC. | UtcDateTimeTransDateTime | No | None | |
OriginChannelReference to the channel where the order originated. No related table is given.low confidence | Int64RefRecId | No | None | |
PartitionA system field for the data partition. In most environments every record has the same value. System field. | Int64Partition | No | None | |
PaymentsTypeKind of payments used on the order: Legacy, Commerce or Call Center. | EnumRetailPaymentsType (enum) | No | None | |
RecIdA unique number that the system gives to every record. Other tables often use it to point to this record. System field. | Int64RecId | No | None | |
RecVersionA system number that changes each time the record is updated. It is used to detect conflicting updates. System field. | IntegerRecVersion | No | None | |
RetailCFDIDocumentType_MXCFDI document type, either Global or Normal, used for Mexico. | EnumRetailCFDIDocumentType_MX (enum) | No | None | |
RetailChannelReference to the retail channel of the order. | Int64RefRecId | No | None | |
RetailHourOfDayReference to the hour-of-day record for the order. | Int64RefRecId | No | None | |
RetailLoyaltyCardReference to the loyalty card linked to the order. | Int64RefRecId | No | None | |
RetailOrderYes/no flag showing whether the record is a retail one. | EnumNoYes (enum) | No | None | |
RetailPrepaymentOverriddenYes/no flag showing whether the prepayment was overridden. | EnumNoYesIdNoYes (enum) | No | None | |
RetailProductListUpdateIdID of the product list. | String (40)RetailProductListId | No | None | |
RetailProductListUpdateNameName of the product list. | String (250)RetailProductListName | No | None | |
RetailReplenishmentLocationIdCode of the warehouse linked to the order. | StringSalesInventLocationId | No | None | |
RetailRetailStatusTypeRetail status of the order, for example Document, Sent, Part receipt, Closed or Canceled. | EnumRetailRetailStatusTypeRetailRetailStatusTypeBase (enum) | No | None | |
RetailStoreIdNumber of the store linked to the order. | StringRetailStoreId | No | None | |
RetailTerminalIdNumber of the POS register linked to the order. | StringRetailTerminalId | No | None | |
SalesTablePoints to the sales order this retail data belongs to. | Int64RefRecId | No | SalesTable.RecId | None |
ShouldUseUnifiedPricingEngineOnSalesOrderYes/no flag for using the unified pricing engine on the order. | EnumNoYes (enum) | No | None | |
StatementIdNumber of the retail statement linked to the order. | String (20)RetailStatementId | No | None | |
TableIdA system number that identifies the table. System field. | IntegerTableId | No | None | |
TaxOverrideCodeCode that replaces the normal sales tax handling. | String (25)RetailTaxOverrideCode | No | None | |
TmpPriceDiscountDataStored transaction data used for price and discount handling.low confidence | ContainerRetailTransactionDataEx3 | No | None | |
TotalManualDiscountAmountTotal cash discount amount entered manually. | RealDiscAmount | No | None | |
TotalManualDiscountPercentageTotal discount percentage entered manually. | RealDiscPct | No | None |
Indexes (1)
SalesTableIdxUnique, alternate key.
Relations (1)
Each relation joins RetailSalesTableHistory to another table on the fields shown.
SalesTable→SalesTableJoin on
SalesTable = SalesTable.RecIdZero or one RetailSalesTableHistory record → exactly one SalesTable record
Get this data out
No public entity reads from RetailSalesTableHistory. Its data is only reachable through the application, a custom entity or a database export.
Need help with RetailSalesTableHistory in a report, an integration or a migration? Talk to Dr Dynamics.