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 descriptionType / EDT / enumMandatoryReferencesIn public entities
ChannelReferenceIdIdentifier of the order in the channel where it was created.String (50)
RetailOrderChannelReferenceId
NoRetailSalesTableBiEntity
CouponsStored list of coupons used on the order.Container
RetailCoupons
NoRetailSalesTableBiEntity
CreditCardTenderTypeIdThe payment method used for the card payment.String
RetailStoreTenderTypeId
NoRetailSalesTableBiEntity
CreditCardTypeIdIdentifier of the card type used for payment.String
RetailStoreCardTypeId
NoRetailSalesTableBiEntity
DataAreaIdThe company (legal entity) that the record belongs to. System field.String (4)
DataAreaId
NoNone
DiscountCodesStored list of discount codes used on the order.Container
RetailDiscountCodes
NoRetailSalesTableBiEntity
GSTTransactionId_INInvoice identifier for GST transactions, used for India.String (50)
TaxTransactionId_IN
NoRetailSalesTableBiEntity
GSTTransactionIdFromPOS_INYes/No value used for India, about whether the GST transaction ID comes from the point of sale.low confidenceEnum
NoYes (enum)
NoRetailSalesTableBiEntity
InitialReceiptIdReceipt number first issued for the order in the point of sale.String (18)
RetailInitialReceiptId
NoRetailSalesTableBiEntity
IsPriceAndDiscountRecalculationRequiredYes/No value showing whether price and discounts need to be recalculated.Enum
NoYes (enum)
NoRetailSalesTableBiEntity
IsTaxExemptedForPriceInclusiveYes/No value showing whether tax was exempted where prices include tax.Enum
RetailIsTaxExemptedForPriceInclusive
NoYes (enum)
NoRetailSalesTableBiEntity
OMInternalOrganizationPoints to the internal organization linked to the order.Int64
RefRecId
NoOMInternalOrganization.RecIdRetailSalesTableBiEntity
OriginalTransactionTimeDate and time of the original transaction.UtcDateTime
TransDateTime
NoRetailSalesTableBiEntity
OriginChannelPoints to the channel where the order originated.Int64
RefRecId
NoRetailSalesTableBiEntity
PartitionA system field for the data partition. In most environments every record has the same value. System field.Int64
Partition
NoNone
PaymentsTypeKind of payments used on the order: legacy, commerce or call center.Enum
RetailPaymentsType (enum)
NoRetailSalesTableBiEntity
RecIdA unique number that the system gives to every record. Other tables often use it to point to this record. System field.Int64
RecId
NoRetailSalesTableBiEntity
RecVersionA system number that changes each time the record is updated. It is used to detect conflicting updates. System field.Integer
RecVersion
NoNone
RetailCFDIDocumentType_MXType of CFDI document, global or normal, used for Mexico.Enum
RetailCFDIDocumentType_MX (enum)
NoRetailSalesTableBiEntity
RetailChannelPoints to the retail channel of the order.Int64
RefRecId
NoRetailChannelTable.RecIdRetailSalesTableBiEntity
RetailHourOfDayPoints to the hour-of-day record for the order.Int64
RefRecId
NoRetailHour.RecIdRetailSalesTableBiEntity
RetailLoyaltyCardPoints to the loyalty card linked to the order.Int64
RefRecId
NoRetailLoyaltyCard.RecIdRetailSalesTableBiEntity
RetailOrderYes/No value showing whether this is a retail order.Enum
NoYes (enum)
NoRetailSalesTableBiEntity
RetailPrepaymentOverriddenYes/No value showing whether the prepayment was overridden.Enum
NoYesId
NoYes (enum)
NoRetailSalesTableBiEntity
RetailProductListUpdateIdIdentifier of a product list linked to the order.String (40)
RetailProductListId
NoRetailSalesTableBiEntity
RetailProductListUpdateNameName of a product list linked to the order.String (250)
RetailProductListName
NoRetailSalesTableBiEntity
RetailReplenishmentLocationIdThe warehouse used for replenishment. It points to a warehouse record.String
SalesInventLocationId
NoInventLocation.InventLocationIdRetailSalesTableBiEntity
RetailRetailStatusTypeRetail status of the order, for example document, sent, part receipt, closed or canceled.Enum
RetailRetailStatusType
RetailRetailStatusTypeBase (enum)
NoRetailSalesTableBiEntity
RetailStoreIdNumber of the store linked to the order.String
RetailStoreId
NoRetailStoreTable.StoreNumberRetailSalesTableBiEntity
RetailTerminalIdNumber of the register (POS terminal) linked to the order.String
RetailTerminalId
NoRetailTerminalTable.terminalIdRetailSalesTableBiEntity
SalesTablePoints to the sales order that this record extends.Int64
RefRecId
NoSalesTable.RecIdRetailSalesTableBiEntity
ShouldUseUnifiedPricingEngineOnSalesOrderYes/No value showing whether the unified pricing engine is used on the order.Enum
NoYes (enum)
NoRetailSalesTableBiEntity
StatementIdNumber of the statement linked to the order.String (20)
RetailStatementId
NoRetailSalesTableBiEntity
SysRowVersionA system row version number that is used for change tracking. System field.Int64
SysRowVersion
NoNone
TableIdA system number that identifies the table. System field.Integer
TableId
NoNone
TaxOverrideCodeCode of the sales tax override applied to the order.String (25)
RetailTaxOverrideCode
NoRetailSalesTableBiEntity
TmpPriceDiscountDataStored transaction data about price and discounts.low confidenceContainer
RetailTransactionDataEx3
NoRetailSalesTableBiEntity
TotalManualDiscountAmountTotal of manual discounts, shown as a discount amount. The currency is not stated in the metadata.Real
DiscAmount
NoRetailSalesTableBiEntity
TotalManualDiscountPercentageManual discount given as a percentage.Real
DiscPct
NoRetailSalesTableBiEntity

Indexes (5)

Relations (8)

Each relation joins RetailSalesTable to another table on the fields shown.

  • OMInternalOrganization → OMInternalOrganization

    Join on OMInternalOrganization = OMInternalOrganization.RecId

    Many RetailSalesTable records → zero or one OMInternalOrganization record

  • RetailChannel → RetailChannelTable

    Join on RetailChannel = RetailChannelTable.RecId

    Many RetailSalesTable records → exactly one RetailChannelTable record

  • RetailHour → RetailHour

    Join on RetailHourOfDay = RetailHour.RecId

    Many RetailSalesTable records → exactly one RetailHour record

  • RetailLoyaltyCard → RetailLoyaltyCard

    Join on RetailLoyaltyCard = RetailLoyaltyCard.RecId

    Many RetailSalesTable records → zero or one RetailLoyaltyCard record

  • RetailReplenishmentLocation → InventLocation

    Join on RetailReplenishmentLocationId = InventLocation.InventLocationId

    Many RetailSalesTable records → zero or one InventLocation record

  • RetailStoreTable → RetailStoreTable

    Join on RetailStoreId = RetailStoreTable.StoreNumber

    Many RetailSalesTable records → exactly one RetailStoreTable record

  • RetailTerminalTable → RetailTerminalTable

    Join on RetailTerminalId = RetailTerminalTable.terminalId

    Many RetailSalesTable records → exactly one RetailTerminalTable record

  • SalesTable → SalesTable

    Join on SalesTable = SalesTable.RecId

    Zero 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.

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

Email sales@drdynamics.co.uk