Table
RetailCategoryPriceRule
Retail category price rule table
Holds price rules set for product categories. It has no defined key. Each rule defines a price basis, a rule type (markup, margin or fixed amount), an amount or percentage, and optional links to a customer, vendor, unit, currency and rounding version. It also carries fields used by pricing rule entities.
- Table name
RetailCategoryPriceRule- Module
Commerce merchandising- 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 (31)
| Field and description | Type / EDT / enum | Mandatory | References | In public entities |
|---|---|---|---|---|
AccountCodeWhether the rule applies to one account, a group or all: table, group or all. | EnumPriceDiscAccountCodeTableGroupAll (enum) | No | RetailCategoryPriceRuleEntity | |
AccountRelationCustomer account, or group, that the rule applies to. | String (20)PriceDiscAccountRelation | No | CustTable.AccountNum | RetailCategoryPriceRuleEntity |
AmountPercentAmount or percentage used by the rule. | RealRetailAmountPercent | No | GUPCategoryPriceRuleEntityRetailCategoryPriceRuleEntity | |
CategoryProduct category the rule applies to, stored as the category record ID. | Int64EcoResCategoryId | No | EcoResCategory.RecId | None |
CategoryPriceRuleGroupCodeCategory price rule group the rule belongs to. | StringRetailCategoryPriceRuleGroupCode | No | RetailCategoryPriceRuleGroup.Code | None |
DataAreaIdThe company (legal entity) that the record belongs to. System field. | String (4)DataAreaId | No | None | |
ExactlyMatchedYes/No flag showing whether the rule is an exact match.low confidence | EnumNoYesIdNoYes (enum) | No | GUPCategoryPriceRuleEntity | |
ExchangeRateTypeRecIdExchange rate type used by the rule, stored as a record ID. | Int64ExchangeRateTypeRecId | No | ExchangeRateType.RecId | None |
IsGUPCategoryPriceRuleYes/No flag that marks the record as a category price rule of the pricing rule feature.low confidence | EnumNoYesIdNoYes (enum) | No | GUPCategoryPriceRuleEntity | |
LineNumLine number that orders the rule lines. | RealLineNum | No | GUPCategoryPriceRuleEntityRetailCategoryPriceRuleEntity | |
PartitionA system field for the data partition. In most environments every record has the same value. System field. | Int64Partition | No | None | |
PriceApplyAdjustmentYes/No flag that allows the price adjustment to be applied. | EnumGUPPriceDiscPriceApplyAdjustmentNoYes (enum) | No | GUPCategoryPriceRuleEntity | |
PriceBasisPrice that the rule starts from, such as base price, current price or purchase price. | EnumRetailPriceBasisType (enum) | No | GUPCategoryPriceRuleEntityRetailCategoryPriceRuleEntity | |
PriceBasisCurrencyCodeCurrency code of the price basis. | String (3)CurrencyCode | No | Currency.CurrencyCode | None |
PriceBasisInventDimIdInventory dimension number used for the price basis. | String (20)InventDimId | No | InventDim.inventDimId | None |
PriceBasisOtherPriceGroupPrice group used as the price basis. | StringPriceGroupId | No | None | |
PriceBasisVendAccountVendor account used for the price basis. | String (20)VendAccount | No | VendTable.AccountNum | None |
PriceComponentCombinationPrice attribute group combination linked to the rule, stored as a record ID. | Int64GUPPriceComponentCodeCombinationRecId | No | GUPPriceComponentCodePriceAttributeGroupCombination.RecId | None |
PriceGroupPrice group linked to the rule. | StringPriceGroupId | No | GUPCategoryPriceRuleEntity | |
PricePreventDiscountYes/No flag that stops further discount on the price. | EnumGUPPriceDiscPricePreventDiscountNoYes (enum) | No | GUPCategoryPriceRuleEntity | |
PriceSetupTypeType of price rule: markup, margin or fixed amount. | EnumRetailCategoryPriceSetupType (enum) | No | GUPCategoryPriceRuleEntityRetailCategoryPriceRuleEntity | |
PricingRuleHeaderHeader of the related price rule, stored as a record ID. | Int64GUPRefRecId | No | GUPPricingRule.RecId | GUPCategoryPriceRuleEntity |
PricingRuleLineLine of the related price rule, stored as a record ID. | Int64GUPRefRecId | No | GUPPricingRule.RecId | GUPCategoryPriceRuleEntity |
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 | |
ScopeWhether the rule includes or excludes sub-categories of the category. | EnumRetailPriceCategoryRuleScope (enum) | No | None | |
SmartRoundingGroupRounding version used for the resulting price. | StringPriceDiscSmartRoundingGroupId | No | PriceDiscSmartRoundingGroup.GroupId | GUPCategoryPriceRuleEntityRetailCategoryPriceRuleEntity |
TableIdA system number that identifies the table. System field. | IntegerTableId | No | None | |
UnitAppliesToAllYes/No flag that allows unit conversion, so the rule can apply across units. | EnumGUPUnitAppliesToAllNoYes (enum) | No | GUPCategoryPriceRuleEntity | |
UnitIdUnit of measure the rule applies to. | StringUnitOfMeasureSymbol | No | UnitOfMeasure.Symbol | GUPCategoryPriceRuleEntityRetailCategoryPriceRuleEntity |
VendAccountVendor account the rule applies to. | String (20)VendAccount | No | VendTable.AccountNum | GUPCategoryPriceRuleEntityRetailCategoryPriceRuleEntity |
Indexes (2)
PriceRuleGroupIdxCategoryPriceRuleGroupCode,LineNumUnique.
PriceBasisInventDimNot unique.
Relations (16)
Each relation joins RetailCategoryPriceRule to another table on the fields shown.
CustTable→CustTableJoin on
AccountCode = TableGroupAll::Table,AccountRelation = CustTable.AccountNumMany RetailCategoryPriceRule records → zero or one CustTable record
EcoResCategory→EcoResCategoryJoin on
Category = EcoResCategory.RecIdMany RetailCategoryPriceRule records → exactly one EcoResCategory record
PriceDiscGroup→PriceDiscGroupJoin on
PriceDiscGroup.Type = PriceGroupType::PriceGroup,PriceDiscGroup.Module = ModuleInventCustVend::Cust,AccountCode = TableGroupAll::GroupId,AccountRelation = PriceDiscGroup.GroupIdMany RetailCategoryPriceRule records → zero or one PriceDiscGroup record
PriceDiscSmartRoundingGroup→PriceDiscSmartRoundingGroupJoin on
SmartRoundingGroup = PriceDiscSmartRoundingGroup.GroupIdMany RetailCategoryPriceRule records → zero or one PriceDiscSmartRoundingGroup record
UnitOfMeasure→UnitOfMeasureJoin on
UnitId = UnitOfMeasure.SymbolMany RetailCategoryPriceRule records → zero or one UnitOfMeasure record
VendTable→VendTableJoin on
VendAccount = VendTable.AccountNumMany RetailCategoryPriceRule records → zero or one VendTable record
Currency→CurrencyJoin on
PriceBasisCurrencyCode = Currency.CurrencyCodeMany RetailCategoryPriceRule records → zero or one Currency record
ExchangeRateType→ExchangeRateTypeJoin on
ExchangeRateTypeRecId = ExchangeRateType.RecIdMany RetailCategoryPriceRule records → zero or one ExchangeRateType record
InventDim→InventDimJoin on
PriceBasisInventDimId = InventDim.inventDimIdMany RetailCategoryPriceRule records → exactly one InventDim record
PriceDiscGroupOther→PriceDiscGroupJoin on
PriceDiscGroup.Module = ModuleInventCustVend::Cust,PriceDiscGroup.Type = PriceGroupType::PriceGroup,PriceBasisOtherPriceGroup = PriceDiscGroup.GroupIdMany RetailCategoryPriceRule records → zero or one PriceDiscGroup record
RetailCategoryPriceRuleGroupFK→RetailCategoryPriceRuleGroupJoin on
CategoryPriceRuleGroupCode = RetailCategoryPriceRuleGroup.CodeMany RetailCategoryPriceRule records → zero or one RetailCategoryPriceRuleGroup record
VendTablePriceBasis→VendTableJoin on
PriceBasisVendAccount = VendTable.AccountNumMany RetailCategoryPriceRule records → zero or one VendTable record
GUPPricingRuleHeader→GUPPricingRuleJoin on
PricingRuleHeader = GUPPricingRule.RecIdZero or one RetailCategoryPriceRule record → exactly one GUPPricingRule record
GUPPricingRuleLine→GUPPricingRuleJoin on
PricingRuleLine = GUPPricingRule.RecIdZero or one RetailCategoryPriceRule record → exactly one GUPPricingRule record
GUPPriceComponentCodePriceAttributeGroupCombination→GUPPriceComponentCodePriceAttributeGroupCombinationJoin on
PriceComponentCombination = GUPPriceComponentCodePriceAttributeGroupCombination.RecIdZero or one RetailCategoryPriceRule record → zero or one GUPPriceComponentCodePriceAttributeGroupCombination record
GUPPriceGroup→PriceDiscGroupJoin on
PriceGroup = PriceDiscGroup.GroupId,PriceDiscGroup.PriceGroupAttributeEnable = NoYes::YesMany RetailCategoryPriceRule records → zero or one PriceDiscGroup record
Get this data out
Tables are not exposed directly. These public entities read from RetailCategoryPriceRule; use one of them in Power BI, Power Platform or a data management project.
GUPCategoryPriceRuleEntity· 15 fields from this tableRetailCategoryPriceRuleEntity· 9 fields from this table
Need help with RetailCategoryPriceRule in a report, an integration or a migration? Talk to Dr Dynamics.