LoyaltyCampaign
Updated
A loyalty campaign is a dated earn-rate overlay. While it is live it beats LoyaltyTier and CRMSettings. You do not pick the campaign on the invoice: the server chooses the rate when SalesRealization is Released.
| Kind | Dictionary |
| Module | CRM |
| Menu | CRM → Dictionaries → Loyalty campaigns |
Fields#
| Field | Caption | Points at |
|---|---|---|
ID |
ID | number sequence |
Code |
Code | string, unique |
Name |
Name | string |
EarnRate |
Earn rate | decimal |
EffectiveFrom |
Effective from | date and time |
EffectiveTo |
Effective to | date and time |
IsDisabled |
Disabled | boolean |
ItemGroup |
Item group | ItemGroup |
CustomerKind |
Customer type | CustomerType |
CustomerType |
Customer type code | string, hidden |
Code, Name, EarnRate, and EffectiveFrom are required. ID comes from LoyaltyCampaignSeq, which starts at 1000 and steps by 1. Earn rate must be greater than zero. Empty Effective to leaves the window open. Empty Item group is every invoice line. Empty Customer type is every customer. Disabled takes the row off the calendar so it does not block another window.
Hidden CustomerType is the code of CustomerKind, kept in step on save, trimmed and compared case-insensitive with the customer's code. ItemGroup is ItemGroup.
Two live campaigns with the same item group, the same customer type, and overlapping dates will not save. A window that names a group or a type beats a wider one; both named beats either. Earn then falls through to a reached LoyaltyTier with a positive rate, else CRMSettings.
Who references this#
No object stores a LoyaltyCampaign field. SalesLoyaltyTx on SalesRealization reads the live window when awarding LoyaltyPoints. LoyaltyRedemption writes points off and does not read this card.
There are no commands. This dictionary writes no register.