Table
RetailSalesTable
Commerce sales orders
Holds retail-specific details for sales orders, in a record that links to the sales order. It covers the channel, store, register, loyalty card, discounts, payment and tax settings. Several sales order and BI entities use it.
- Table name
RetailSalesTable- 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 (39)
| Field and description | Type / EDT / enum | Mandatory | References | In public entities |
|---|---|---|---|---|
ChannelReferenceIdIdentifier of the order in the channel where it was created. | String (50)RetailOrderChannelReferenceId | No | RetailSalesTableBiEntity | |
CouponsStored list of coupons used on the order. | ContainerRetailCoupons | No | RetailSalesTableBiEntity | |
CreditCardTenderTypeIdThe payment method used for the card payment. | StringRetailStoreTenderTypeId | No | RetailSalesTableBiEntity | |
CreditCardTypeIdIdentifier of the card type used for payment. | StringRetailStoreCardTypeId | No | RetailSalesTableBiEntity | |
DataAreaIdThe company (legal entity) that the record belongs to. System field. | String (4)DataAreaId | No | None | |
DiscountCodesStored list of discount codes used on the order. | ContainerRetailDiscountCodes | No | RetailSalesTableBiEntity | |
GSTTransactionId_INInvoice identifier for GST transactions, used for India. | String (50)TaxTransactionId_IN | No | RetailSalesTableBiEntity | |
GSTTransactionIdFromPOS_INYes/No value used for India, about whether the GST transaction ID comes from the point of sale.low confidence | EnumNoYes (enum) | No | RetailSalesTableBiEntity | |
InitialReceiptIdReceipt number first issued for the order in the point of sale. | String (18)RetailInitialReceiptId | No | RetailSalesTableBiEntity | |
IsPriceAndDiscountRecalculationRequiredYes/No value showing whether price and discounts need to be recalculated. | EnumNoYes (enum) | No | RetailSalesTableBiEntity | |
IsTaxExemptedForPriceInclusiveYes/No value showing whether tax was exempted where prices include tax. | EnumRetailIsTaxExemptedForPriceInclusiveNoYes (enum) | No | RetailSalesTableBiEntity | |
OMInternalOrganizationPoints to the internal organization linked to the order. | Int64RefRecId | No | OMInternalOrganization.RecId | RetailSalesTableBiEntity |
OriginalTransactionTimeDate and time of the original transaction. | UtcDateTimeTransDateTime | No | RetailSalesTableBiEntity | |
OriginChannelPoints to the channel where the order originated. | Int64RefRecId | No | RetailSalesTableBiEntity | |
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 | RetailSalesTableBiEntity | |
RecIdA unique number that the system gives to every record. Other tables often use it to point to this record. System field. | Int64RecId | No | RetailSalesTableBiEntity | |
RecVersionA system number that changes each time the record is updated. It is used to detect conflicting updates. System field. | IntegerRecVersion | No | None | |
RetailCFDIDocumentType_MXType of CFDI document, global or normal, used for Mexico. | EnumRetailCFDIDocumentType_MX (enum) | No | RetailSalesTableBiEntity | |
RetailChannelPoints to the retail channel of the order. | Int64RefRecId | No | RetailChannelTable.RecId | RetailSalesTableBiEntity |
RetailHourOfDayPoints to the hour-of-day record for the order. | Int64RefRecId | No | RetailHour.RecId | RetailSalesTableBiEntity |
RetailLoyaltyCardPoints to the loyalty card linked to the order. | Int64RefRecId | No | RetailLoyaltyCard.RecId | RetailSalesTableBiEntity |
RetailOrderYes/No value showing whether this is a retail order. | EnumNoYes (enum) | No | RetailSalesTableBiEntity | |
RetailPrepaymentOverriddenYes/No value showing whether the prepayment was overridden. | EnumNoYesIdNoYes (enum) | No | RetailSalesTableBiEntity | |
RetailProductListUpdateIdIdentifier of a product list linked to the order. | String (40)RetailProductListId | No | RetailSalesTableBiEntity | |
RetailProductListUpdateNameName of a product list linked to the order. | String (250)RetailProductListName | No | RetailSalesTableBiEntity | |
RetailReplenishmentLocationIdThe warehouse used for replenishment. It points to a warehouse record. | StringSalesInventLocationId | No | InventLocation.InventLocationId | RetailSalesTableBiEntity |
RetailRetailStatusTypeRetail status of the order, for example document, sent, part receipt, closed or canceled. | EnumRetailRetailStatusTypeRetailRetailStatusTypeBase (enum) | No | RetailSalesTableBiEntity | |
RetailStoreIdNumber of the store linked to the order. | StringRetailStoreId | No | RetailStoreTable.StoreNumber | RetailSalesTableBiEntity |
RetailTerminalIdNumber of the register (POS terminal) linked to the order. | StringRetailTerminalId | No | RetailTerminalTable.terminalId | RetailSalesTableBiEntity |
SalesTablePoints to the sales order that this record extends. | Int64RefRecId | No | SalesTable.RecId | RetailSalesTableBiEntity |
ShouldUseUnifiedPricingEngineOnSalesOrderYes/No value showing whether the unified pricing engine is used on the order. | EnumNoYes (enum) | No | RetailSalesTableBiEntity | |
StatementIdNumber of the statement linked to the order. | String (20)RetailStatementId | No | RetailSalesTableBiEntity | |
SysRowVersionA system row version number that is used for change tracking. System field. | Int64SysRowVersion | No | None | |
TableIdA system number that identifies the table. System field. | IntegerTableId | No | None | |
TaxOverrideCodeCode of the sales tax override applied to the order. | String (25)RetailTaxOverrideCode | No | RetailSalesTableBiEntity | |
TmpPriceDiscountDataStored transaction data about price and discounts.low confidence | ContainerRetailTransactionDataEx3 | No | RetailSalesTableBiEntity | |
TotalManualDiscountAmountTotal of manual discounts, shown as a discount amount. The currency is not stated in the metadata. | RealDiscAmount | No | RetailSalesTableBiEntity | |
TotalManualDiscountPercentageManual discount given as a percentage. | RealDiscPct | No | RetailSalesTableBiEntity |
Indexes (5)
SalesTableIdxUnique, alternate key.
RetailLoyaltyCardIdxNot unique.
ProductListIdxNot unique.
ChannelReferenceIdxChannelReferenceId,RetailChannel,SalesTable,RetailTerminalId,RecIdNot unique.
InitialReceiptIdxNot unique.
Relations (8)
Each relation joins RetailSalesTable to another table on the fields shown.
OMInternalOrganization→OMInternalOrganizationJoin on
OMInternalOrganization = OMInternalOrganization.RecIdMany RetailSalesTable records → zero or one OMInternalOrganization record
RetailChannel→RetailChannelTableJoin on
RetailChannel = RetailChannelTable.RecIdMany RetailSalesTable records → exactly one RetailChannelTable record
RetailHour→RetailHourJoin on
RetailHourOfDay = RetailHour.RecIdMany RetailSalesTable records → exactly one RetailHour record
RetailLoyaltyCard→RetailLoyaltyCardJoin on
RetailLoyaltyCard = RetailLoyaltyCard.RecIdMany RetailSalesTable records → zero or one RetailLoyaltyCard record
RetailReplenishmentLocation→InventLocationJoin on
RetailReplenishmentLocationId = InventLocation.InventLocationIdMany RetailSalesTable records → zero or one InventLocation record
RetailStoreTable→RetailStoreTableJoin on
RetailStoreId = RetailStoreTable.StoreNumberMany RetailSalesTable records → exactly one RetailStoreTable record
RetailTerminalTable→RetailTerminalTableJoin on
RetailTerminalId = RetailTerminalTable.terminalIdMany RetailSalesTable records → exactly one RetailTerminalTable record
SalesTable→SalesTableJoin on
SalesTable = SalesTable.RecIdZero or one RetailSalesTable record → exactly one SalesTable record
Get this data out
Tables are not exposed directly. These public entities read from RetailSalesTable; use one of them in Power BI, Power Platform or a data management project.
RetailSalesTableBiEntity· 34 fields from this tableSalesOrderHeaderV4Entity· 0 fields from this tableSalesOrderHeaderV3Entity· 0 fields from this table
Need help with RetailSalesTable in a report, an integration or a migration? Talk to Dr Dynamics.