If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Microsoft SQL Server > Implementing Policy based, time based and customer based pricing

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-30-11, 05:31
zahidmadeel zahidmadeel is offline
Registered User
 
Join Date: Dec 2011
Posts: 1
Implementing Policy based, time based and customer based pricing

i have trouble implementing policy based, time based and customer based pricing for our SKUs (Stock keeping units). So far i have created following table for time based pricing
Code:
SKUPrices  
ID Pk  
SKUID FK_To_Sku  
DateFrom  
DateTo  
Price
I believe this schema can handle time based pricing well (i need community review on it though) but i can not figure out how to handle customer based pricing (if we want to sell few skus to some customers at subsidized rates for some time period) and policy based pricing (where subsidized rates will be applied to skus if sold under some policy for some time period).
Reply With Quote
  #2 (permalink)  
Old 01-05-12, 12:08
weejas weejas is offline
Registered User
 
Join Date: Sep 2006
Location: Surrey, UK
Posts: 448
You need to add a field to link back to the relevant customer, and a field to link back to a policy.

Then you need to amend your pricing routine to look for one of them first in the pricing table (depending on which takes precedence) and then the other before using the unqualified price that applies for that period.

Our main SOP system uses advanced pricing, in which we record a price for each valid intersection of customer (group), SKU, date range and type (promotion/normal). When an invoice is generated, the program looks for a promotional price for that customer, SKU and date and applies that. If one is not found, it looks for a normal price and applies that. If neither are found, it raises an error report.
__________________
10% of magic is knowing something that no-one else does. The rest is misdirection.
Reply With Quote
  #3 (permalink)  
Old 01-05-12, 13:21
Pat Phelan Pat Phelan is offline
Resident Curmudgeon
 
Join Date: Feb 2004
Location: In front of the computer
Posts: 12,609
What are your policy parameters like? Give a couple of examples, and try to provide at least two examples of each kind of policy. For example which outlet a customer purchases at, how many units/dollars/whatevers they buy in one purchase, etc.

The big problem that I see is determining which of the three has precedence. If it is always customer based, then policy based, then time based the problem isn't too hard. If there are any exceptions at all, then it gets really difficult and complex to manage.

-PatP
__________________
In theory, theory and practice are identical. In practice, theory and practice are unrelated.
Reply With Quote
Reply

Tags
architect, database, database-design, sql

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On