Skip to content

Hard-coded business rules

Stop hard-coding your business rules

Your hard-coded business rules decide who gets approved, blocked or escalated, yet nobody outside IT can read them. Move them into one place the business owns, and let your applications ask for the answer instead.

Incoming request

evaluating

Why does a £5,000 limit change need a release?

  1. Look up the customer's price band in the Price bands lookup table
  2. Trade customers on band B can have up to 12% off list price
  3. Any discount over the band limit goes to the sales manager for sign-off
  4. Orders for customers on credit hold get no discount at all

Answer, with the reason

A 10% discount for a band B trade customer is allowed straight away. When sales wants band B to go to 15%, the sales director edits one row in the lookup table, tests it and publishes it the same day. No release needed.

Sound familiar?

Sound familiar?

The policy was agreed in a meeting. Then it was turned into code, and the business lost sight of it.

01

"It's in the backlog"

Finance wants the approval limit raised from £5,000 to £7,500. It is one number. It still joins the queue behind three features and a bug fix, and ships in the next release if you are lucky.

02

"Nobody knows what the code actually does"

The developer who wrote the discount logic left two years ago. The rules are spread across a plug-in, a stored procedure and an if-statement nobody dares touch.

03

"We changed it in one system but not the other"

The same credit rule lives in the ERP, the web portal and a nightly job. One gets updated, two do not, and customers get different answers depending on where they ask.

The quiet cost

What it quietly costs you

  • Policy changes that should take an afternoon wait for a release window.
  • Developers spend their time adjusting thresholds instead of building what the business actually asked for.
  • Nobody can show an auditor the rule that was live last March without reading old code.
  • Every change carries the risk of breaking something unrelated in the same release.

Before and after

From buried in code to owned by the business

Today

  • Rules hidden inside application code only developers can read
  • A policy change means a ticket, a sprint and a deployment
  • The same rule copied into several systems, drifting apart
  • No record of which version of the rule gave which answer

With Condexa

  • Rules laid out step by step on a visual canvas anyone can follow
  • The policy owner changes the rule, tests it and publishes it
  • One decision that every system calls for the same answer
  • Every answer recorded with the version and the reason behind it

How you get there

How you get the rules out of the code

  1. 1

    See the rule in plain sight

    Paste an example record and Condexa sets up the shape and a starting workflow. Your team lays out the steps, lookups and checks so finance and IT are finally reading the same thing.

  2. 2

    Prove it gives the right answer

    Run it with real examples before anything goes live. The trace shows every step, every lookup and every value, so you can match it against what the old code did.

  3. 3

    Let your applications ask

    Publish the decision and your ERP, CRM or Dynamics 365 calls it over a REST API and gets the answer back in milliseconds. The code stops holding the policy and just asks for it.

condexa / designer
Building a decision on the canvas

A worked example

Example: a discount rule pulled out of the order system

A distributor's order screen had discount logic written into it years ago. Sales wants a new band for trade customers, and the change has been in the backlog for two sprints.

The rules, in plain English

  1. R1Look up the customer's price band in the Price bands lookup table
  2. R2Trade customers on band B can have up to 12% off list price
  3. R3Any discount over the band limit goes to the sales manager for sign-off
  4. R4Orders for customers on credit hold get no discount at all

Condexa answers

A 10% discount for a band B trade customer is allowed straight away. When sales wants band B to go to 15%, the sales director edits one row in the lookup table, tests it and publishes it the same day. No release needed.

Side by side

Hard-coded rules vs Condexa

AspectHard-coded rulesCondexa
Who can read the ruleDevelopers, if they can find itAnyone with access, laid out step by step
Changing a thresholdTicket, sprint, test cycle, deploymentEdit, test and publish, often in minutes
Testing a changeTest environment and a QA cycleRun it with your own examples and read the trace
Same rule in several systemsCopied into each one and maintained separatelyOne decision, called by every system
Explaining an answerDig through logs and old codeEvery call recorded with inputs, outputs and trace
Going back to an earlier ruleRevert code and redeployEarlier versions kept and ready to use
Who owns the policyWhoever last touched the codeThe team that sets the policy

FAQ

Questions people ask

What are hard-coded business rules?

Hard-coded business rules are policies, such as approval limits, discount bands or credit checks, written directly into application code. Because they sit inside the software, only developers can read or change them, and every change needs a release.

How do you stop hard-coding business rules?

Move the rule into a separate decision service that your applications call when they need an answer. The application sends the facts, such as the order value and cost centre, and gets back the result. The rule itself can then be changed, tested and published without touching the application code.

Why should business rules be separated from application code?

Business rules change far more often than the software around them. Keeping them separate means a policy change does not need a deployment, the same rule can serve several systems, and the business can see exactly what the rule says.

Is a rules engine better than hard coding?

For logic that changes often or needs explaining, usually yes. A rules engine lets the people who own the policy maintain it, keeps a record of every version and shows why each answer was given. Logic that never changes can happily stay in code.

Do our developers lose control if the business owns the rules?

No. Developers still decide how applications call the decision and which API key each application uses. Workspaces and roles control who can author and who can publish, so changes go live only when the right person approves them.

Which rule is stuck in your backlog right now?

Bring a decision your team makes every week. We will build it with you, live, test it against your own examples and show your systems calling it.

No slides. Your decision, built live. No obligation.