8

My upcoming project is relate to sales system, so one of the main requirement is "user can modify promotion by themselves". Promotions is vary, they give me some of them.

  1. Buy 1 get 1 free, Buy 2 get 3.
  2. One for 30%, two for 50%, three for 80%
  3. Buy product A will discount 30% for product B
  4. 20% off for more than 20$ per transaction

I know a little of rule engine, please suggest me a book to learn it too.

Anonymous
  • 9,366
  • 22
  • 83
  • 133
  • I'd love to see how you are going to design your UI with such varying requirements. I suspect that will be much harder to design the UI when compared to coding a rules engine. – Kane Jan 28 '10 at 07:07
  • 1
    I think the UI is pretty much done -- just replace each of the numbers with a textbox, and the numbered list with radio buttons. – Jay Jan 28 '10 at 07:13
  • 2
    IN a past life I designed grocery shopping websites. I can tell you there are no less than 170 varieties of promotion. Mind boggling to say the least! – Jamiec Jan 28 '10 at 14:48
  • @Jamiec, As I have discuss with my customer, I found their promotions have common pattern e.g. buy x units get free y units, buy x units discount y %, buy product x get product y, buy x$ get discount y%. I want to hear from you, how about your experience with this type off application? – Anonymous Jan 29 '10 at 02:39
  • Does the O.P have any info on what they ended up using? I'm trying to do something very similar... – Alex May 31 '11 at 14:48

4 Answers4

4

A previous SO answer might be of help: Looking for simple rules-engine library in .NET

Have you looked at Windows Workflow Foundation

Community
  • 1
  • 1
Mitch Wheat
  • 295,962
  • 43
  • 465
  • 541
1

You could use a commercial rule engine for .Net like InRule or the .Net version of IBM ILOG Rules or FICO Blaze Advisor. All of them make it easy to expose the rules to the business user in a way that makes it safe for them to edit them while providing technical hooks/APIs to make it easy to integrate the rules engine and execution.

James Taylor
  • 352
  • 2
  • 4
  • Correct. Commercial products do the good job in this area. Other option is [FlexRule](http://www.flexrule.com/javascript) which allows exposing rules in web user interface as well as windows based authoring environment. – Arash Aghlara Jan 14 '16 at 11:35
0

You can use BOO DSL features or use Rhino.DSL (we are using it as a macro engine for our project)

as for your example check out this link

Sergey Mirvoda
  • 3,209
  • 2
  • 26
  • 30
0

You can use a simple attribute based Rule Engine created by me:

http://ruen.codeplex.com/

Bhaskar
  • 10,537
  • 6
  • 53
  • 64