Table

RetailLoyaltyEarnSchemeLine

Retail loyalty scheme earn line

Holds the lines of a loyalty scheme that define how reward points are earned. Each line sets an activity, such as a purchase by amount or quantity, and the reward points given for it. Lines link to a scheme, tier, program and reward point type, and have a validity period.

Table name
RetailLoyaltyEarnSchemeLine
Module
Commerce customers
Table group
Main
Table type
Regular
Data per company
No
Configuration key
Retail
Primary index
RecId
Replacement key
None
Key fields
None
Model
Foundation

Fields (21)

Field and descriptionType / EDT / enumMandatoryReferencesIn public entities
CreatedDateTimeThe date and time when the record was created. System field.UtcDateTime
CreatedDateTime
NoNone
FromActivityAmountCurrencyThe currency of the activity amount.String (3)
CurrencyCode
NoCurrency.CurrencyCodeRetailLoyaltyEarnSchemeLineEntity
FromActivityAmountQtyThe activity amount or quantity needed to earn points.Real
RetailLoyaltyActivityAmountQty
YesRetailLoyaltyEarnSchemeLineEntity
FromActivityRetailGroupMemberLinePoints to the retail group member line that the activity applies to.Int64
RefRecId
NoRetailGroupMemberLine.RecIdRetailLoyaltyEarnSchemeLineEntity
FromActivityTypeThe kind of activity that earns points, such as Purchase products by amount, Purchase products by quantity, Sales transaction count or Other.Enum
RetailLoyaltyActivityType (enum)
YesRetailLoyaltyEarnSchemeLineEntity
LineNumThe number of the line within the scheme.Real
LineNum
NoRetailLoyaltyEarnSchemeLineEntity
LoyaltySchemePoints to the loyalty scheme that the line belongs to.Int64
RefRecId
YesRetailLoyaltyScheme.RecIdRetailLoyaltyEarnSchemeLineEntity
LoyaltyTierPoints to the loyalty tier the line applies to.Int64
RefRecId
NoRetailLoyaltyTier.RecIdRetailLoyaltyEarnSchemeLineEntity
ModifiedByThe user who last changed the record. System field.String (20)
ModifiedBy
NoNone
ModifiedDateTimeThe date and time when the record was last changed. System field.UtcDateTime
ModifiedDateTime
NoNone
PartitionA system field for the data partition. In most environments every record has the same value. System field.Int64
Partition
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
RetailAffiliationIdPoints to the loyalty program of the line.Int64
RetailAffiliationId
NoRetailAffiliation.RecIdRetailLoyaltyEarnSchemeLineEntity
RetailFromOtherActivityTypeIdPoints to the other activity type, used when the activity type is Other.Int64
RetailLoyaltyOtherActivityTypeRefRecId
NoRetailLoyaltyOtherActivityType.RecIdRetailLoyaltyEarnSchemeLineEntity
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
ToRewardPointPoints to the reward point type given by the line.Int64
RefRecId
YesRetailLoyaltyRewardPoint.RecIdRetailLoyaltyEarnSchemeLineEntity
ToRewardPointAmountQtyThe number of reward points given.Real
RetailLoyaltyRewardPointAmountQty
YesRetailLoyaltyEarnSchemeLineEntity
ValidFromThe date the line starts to apply.Date
ValidFromDate
NoRetailLoyaltyEarnSchemeLineEntity
ValidToThe date the line stops applying.Date
ValidToDate
NoRetailLoyaltyEarnSchemeLineEntity

Indexes (2)

Relations (7)

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

  • FromActivityAmountCurrency → Currency

    Join on FromActivityAmountCurrency = Currency.CurrencyCode

    Many RetailLoyaltyEarnSchemeLine records → zero or one Currency record

  • RetailGroupMemberLine → RetailGroupMemberLine

    Join on FromActivityRetailGroupMemberLine = RetailGroupMemberLine.RecId

    Many RetailLoyaltyEarnSchemeLine records → zero or one RetailGroupMemberLine record

  • RetailLoyaltyRewardPoint → RetailLoyaltyRewardPoint

    Join on ToRewardPoint = RetailLoyaltyRewardPoint.RecId

    Many RetailLoyaltyEarnSchemeLine records → exactly one RetailLoyaltyRewardPoint record

  • RetailLoyaltyScheme → RetailLoyaltyScheme

    Join on LoyaltyScheme = RetailLoyaltyScheme.RecId

    Many RetailLoyaltyEarnSchemeLine records → exactly one RetailLoyaltyScheme record

  • RetailLoyaltyTier → RetailLoyaltyTier

    Join on LoyaltyTier = RetailLoyaltyTier.RecId

    Many RetailLoyaltyEarnSchemeLine records → exactly one RetailLoyaltyTier record

  • RetailAffiliation → RetailAffiliation

    Join on RetailAffiliationId = RetailAffiliation.RecId

    Many RetailLoyaltyEarnSchemeLine records → exactly one RetailAffiliation record

  • RetailFromOtherActivityType → RetailLoyaltyOtherActivityType

    Join on RetailFromOtherActivityTypeId = RetailLoyaltyOtherActivityType.RecId

    Many RetailLoyaltyEarnSchemeLine records → zero or one RetailLoyaltyOtherActivityType record

Get this data out

Tables are not exposed directly. These public entities read from RetailLoyaltyEarnSchemeLine; use one of them in Power BI, Power Platform or a data management project.

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

Email sales@drdynamics.co.uk