Examples & Practice of Decision Tables Copy

Let’s look at some more examples!

EXAMPLE 1

Maybe your requirement looks like this:

Our pricing and rates for loans are based on Customer Tiers.  The rules for Customer Tiers are as follows:

  • Tier 1= Loyal 10yrs,  Mortgage with us, and 100K in assets with us
  • Tier 2 = Mortgage with us and 10yrs loyal
  • Tier 3 = Loyal 10yrs, and 100k in assets with us
  • Tier 4 = Loyal 10yrs
  • Tier 5 = 100k in assets with us
  • Tier 6 = All Others

How do we make this into a Decision Table to drive ALL of the scenarios? (Warning, answer below….try it before scrolling down!)

First, identify the actual decision this rule/logic set is trying to make.

Second, what are the conditions that are evaluated to make the decision?

Third, populate the combinations, and then the results.

 

 

<<<  WARNING – ANSWER BELOW – DID YOU TRY THIS BEFORE SCROLLING?  >>>

 

 

Okay, here is an example of what this might look like. It illustrates out all 8 scenarios. Did you find 3 conditions and 8 scenarios?

Okay, are you ready for another one?

EXAMPLE 2

Maybe your requirement looks something like this:

  • If an account is overdue more than 15 days, then the customer pays a late fee.
  • Late fees rules:
    • 10% of it is 15 days or more
    • 15% for amounts delinquent more than 30 days
    • 20% for amounts delinquent more than 60 days

How do we make this into a Decision Table to drive ALL of the scenarios? (Warning, answer below….try it before scrolling down!)

First, identify the actual decision this rule/logic set is trying to make.

Second, what are the conditions that are evaluated to make the decision?

Third, populate the combinations, and then the results.

 

<<<  WARNING – ANSWER BELOW – DID YOU TRY THIS BEFORE SCROLLING?  >>>

 

 

Okay, here is an example of what this might look like. It illustrates all 16 scenarios. Did you find 4 conditions and 16 scenarios?

And, it helps to add a scenario as well.  Something like this:

Scenario A: A customer has an outstanding balance of $100.  $50 is the recent invoice and less than 15 days, $20 is 29 days overdue, and $30 is 59 days overdue. This fits line 13 of the decision table and the late fee would be: $6.50.  This is 10% of $20 plus 15% of $30.

KEY LEARNINGS:

  • Both examples have bullet point logic to start, they seem quite clear, but when using a decision table, there were far more scenarios identified. This makes the requirement more clear for the developers and testing/QA team.  Without this clarity, the “missing” scenarios may not be programmed or tested.  Or worse yet, they are programmed or tested but with the incorrect result.
  • The more conditions you have, the more scenarios you get, EXPONENTIALLY!
  • The data/nouns in your conditions must be defined VERY well.
    • For example:  What does “loyal” mean?  How is it calculated?  Maybe that is another decision table?
    • For example: How are the delinquent days calculated exactly?  From what date/time to what date/time?