Table
RetailTransactionAffiliationTrans
Affiliations for transactions
Records which affiliations and loyalty tiers apply to a retail transaction. Each row is identified by affiliation, loyalty tier, channel, store, register and transaction number. It links to the affiliation, the loyalty tier and the transaction.
- Table name
RetailTransactionAffiliationTrans- Module
Commerce transactions and orders- Table group
Transaction- Table type
Regular- Data per company
Yes- Configuration key
Retail- Primary index
AffiliationTxnIdx- Replacement key
AffiliationTxnIdx- Key fields
Affiliation, LoyaltyTier, Channel, StoreId, TerminalId, TransactionId- Model
Foundation
Fields (21)
| Field and description | Type / EDT / enum | Mandatory | References | In public entities |
|---|---|---|---|---|
AffiliationAffiliation (loyalty programme) record this row refers to. | Int64RefRecId | No | RetailAffiliation.RecId | RetailTransactionAffiliationLineEntityRetailTransactionAffiliationTransEntityRetailTransactionLoyaltyLineEntityand 1 more |
LoyaltyTierLoyalty tier record this row refers to. | Int64RefRecId | No | RetailLoyaltyTier.RecId | RetailTransactionAffiliationTransEntityRetailTransactionLoyaltyLineEntityRetailTransactionAffiliationTransBIEntity |
ChannelRetail channel of the transaction, pointing to the channel record. | Int64RetailChannelRecId | No | RetailChannelTable.RecId | RetailTransactionAffiliationLineEntityRetailTransactionAffiliationTransEntityRetailTransactionLoyaltyLineEntityand 1 more |
StoreIdNumber of the store, pointing to the store record. | StringRetailStoreId | Yes | RetailStoreTable.StoreNumber | RetailTransactionAffiliationTransEntityRetailTransactionAffiliationTransBIEntity |
TerminalIdNumber of the POS register, pointing to the register record. | StringRetailTerminalId | Yes | RetailTerminalTable.terminalId | RetailTransactionAffiliationLineEntityRetailTransactionAffiliationTransEntityRetailTransactionLoyaltyLineEntityand 1 more |
TransactionIdNumber of the retail transaction, matched together with channel, store and register. | String (44)RetailTransactionId | Yes | RetailTransactionTable.transactionId | RetailTransactionAffiliationLineEntityRetailTransactionAffiliationTransEntityRetailTransactionLoyaltyLineEntityand 1 more |
CreatedByThe user who created the record. System field. | String (20)CreatedBy | No | RetailTransactionAffiliationTransBIEntity | |
CreatedDateTimeThe date and time when the record was created. System field. | UtcDateTimeCreatedDateTime | No | RetailTransactionAffiliationTransBIEntity | |
CreatedTransactionIdA system number for the database transaction that created the record. System field. | Int64CreatedTransactionId | No | None | |
DataAreaIdThe company (legal entity) that the record belongs to. System field. | String (4)DataAreaId | No | RetailTransactionAffiliationTransBIEntity | |
ModifiedByThe user who last changed the record. System field. | String (20)ModifiedBy | No | RetailTransactionAffiliationTransBIEntity | |
ModifiedDateTimeThe date and time when the record was last changed. System field. | UtcDateTimeModifiedDateTime | No | RetailTransactionAffiliationTransBIEntity | |
ModifiedTransactionIdA system number for the database transaction that last changed the record. System field. | Int64ModifiedTransactionId | No | None | |
PartitionA system field for the data partition. In most environments every record has the same value. System field. | Int64Partition | No | None | |
ReceiptIdReceipt number of the transaction. | String (18)RetailReceiptId | No | RetailTransactionAffiliationLineEntityRetailTransactionAffiliationTransEntityRetailTransactionLoyaltyLineEntityand 1 more | |
RecIdA unique number that the system gives to every record. Other tables often use it to point to this record. System field. | Int64RecId | No | RetailTransactionAffiliationTransBIEntity | |
RecVersionA system number that changes each time the record is updated. It is used to detect conflicting updates. System field. | IntegerRecVersion | No | None | |
replicationCounterFromOriginCounter used to track replication from the source location. | IntegerRetailReplicationCounter | No | RetailTransactionAffiliationTransEntityRetailTransactionAffiliationTransBIEntity | |
StaffIdID of the operator who handled the transaction. | String (25)RetailStaffId | No | RetailTransactionAffiliationTransEntityRetailTransactionAffiliationTransBIEntity | |
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 |
Indexes (1)
AffiliationTxnIdxPrimary indexReplacement keyAffiliation,LoyaltyTier,Channel,StoreId,TerminalId,TransactionIdUnique, alternate key.
Relations (6)
Each relation joins RetailTransactionAffiliationTrans to another table on the fields shown.
RetailAffiliation→RetailAffiliationJoin on
Affiliation = RetailAffiliation.RecIdMany RetailTransactionAffiliationTrans records → zero or one RetailAffiliation record
RetailChannelTable→RetailChannelTableJoin on
Channel = RetailChannelTable.RecIdMany RetailTransactionAffiliationTrans records → exactly one RetailChannelTable record
RetailLoyaltyTier→RetailLoyaltyTierJoin on
LoyaltyTier = RetailLoyaltyTier.RecIdMany RetailTransactionAffiliationTrans records → zero or one RetailLoyaltyTier record
RetailStoreTable→RetailStoreTableJoin on
StoreId = RetailStoreTable.StoreNumberMany RetailTransactionAffiliationTrans records → exactly one RetailStoreTable record
RetailTerminalTable→RetailTerminalTableJoin on
TerminalId = RetailTerminalTable.terminalIdMany RetailTransactionAffiliationTrans records → exactly one RetailTerminalTable record
RetailTransactionTable→RetailTransactionTableJoin on
Channel = RetailTransactionTable.Channel,TransactionId = RetailTransactionTable.transactionId,StoreId = RetailTransactionTable.store,TerminalId = RetailTransactionTable.terminalMany RetailTransactionAffiliationTrans records → zero or one RetailTransactionTable record
Get this data out
Tables are not exposed directly. These public entities read from RetailTransactionAffiliationTrans; use one of them in Power BI, Power Platform or a data management project.
RetailTransactionAffiliationLineEntity· 5 fields from this tableRetailTransactionAffiliationTransEntity· 9 fields from this tableRetailTransactionLoyaltyLineEntity· 6 fields from this tableRetailTransactionAffiliationTransBIEntity· 15 fields from this table
Need help with RetailTransactionAffiliationTrans in a report, an integration or a migration? Talk to Dr Dynamics.