ke Technical Documentation
Monday, February 9, 2015 User Loyalty Card
New Tab in keAdmin, under users, called Loyalty Card.
This is a Journal Type view for the points. Always, the last record (by date) will have the available balance. Records cannot be deleted or the amount changed.
Fields available:
- amount: amount of points awarded
- balance: calculated balance for the user
- source: source type, can be a service, a third party service and so on
- source reference: the reference id for the transaction where the points are awarded from
- source description: any other source information
New field available for the user information: USER_POINTS
Service has a new field: points, which can be a number or a formula.
Each successful service submission will have a trigger available for point calculation. Just put a number in the points field for a service with a set target, and the user will be awarded points. For the checkout service, user P for amount spent.
Shopping trigger:
- TG_KE_ONSUCCESS_SHOPPING_ACTION=ON_SUCCESS_USER_LOYALTY
- TG_KE_ONSUCCESS_SHOPPING_ACTION_PARAMS=SHOPPING_CHECKOUT,reference,more info
Normal feedback trigger:
- TG_KE_ONSUCCESS_ACTION=ON_SUCCESS_USER_LOYALTY
- TG_KE_ONSUCCESS_ACTION_PARAMS=SHOPPING_CHECKOUT,reference,more info
|KE_GENERIC_LOYALTY_CHECK(_user_id_,_prefix_)|
|SHOW_ON_LOYALTY_CHECK_START_prefix|
|SHOW_ON_LOYALTY_CHECK_END_prefix|
|HIDE_ON_LOYALTY_CHECK_START_prefix|
|HIDE_ON_LOYALTY_CHECK_END_prefix|
Loyalty Inputs:
- TG_KE_LOYALTY
- TG_KE_LOYALTY_STATS
- TG_KE_LOYALTY_PAGE
- TG_KE_LOYALTY_PAGE_ID
- TG_KE_LOYALTY_ORDER_FIELD
- TG_KE_LOYALTY_ORDER_TYPE
- TG_KE_LOYALTY_ORDER_NUMERIC
- TG_KE_LOYALTY_EARN
- TG_KE_LOYALTY_SPEND
- TG_LOYALTY_START_DATE
- TG_LOYALTY_END_DATE
- TG_LOYALTY_SEARCH_COUNT
Loyalty Fields:
- LOYALTY_ID
- LOYALTY_DATE
- LOYALTY_BALANCE
- LOYALTY_AMOUNT
- LOYALTY_SOURCE
- LOYALTY_SOURCE_REFERENCE
- LOYALTY_SOURCE_DESCRIPTION
- LOYALTY_EXPIRATION
New tag:
|SHOPPING_LOYALTY_CARD_MAX_COUNT| - max points available
New targets in shopping cart:
- TG_KE_LOYALTY_SPEND - code from constants
- TG_KE_LOYALTY_SPEND_AMOUNT - amount to spend
Max Points: $ |SHOPPING_LOYALTY_CARD_MAX_COUNT|
Points to Spend: $ |SHOPPING_LOYALTY_CARD_COUNT|
Amount: $ |SHOPPING_LOYALTY_CARD_AMOUNT|
New functions (name should be self explanatory):
- |KE_GENERIC_LOYALTY_POINTS_TO_AMOUNT(_user_id_,_formula_code_,_points_)|
- |KE_GENERIC_LOYALTY_AMOUNT_TO_POINTS(_user_id_,_formula_code_,_amount_)|
_user_id_ = |USSER_ID|
SHOPPING_LOYALTY_CARD_SPENT changed to TG_SHOP_LOYALTY_CARD_SPENT
Add a comment
Comments
dapoxetine effect on the kidneyslevitra side effects listcialis superactive