Rules & Calculation Formulas
- Abstract rules
- 7
- Implemented rules
- 7
- Executed rules
- 9
Define once, reference anywhere. Abstract rules are the general rules of arithmetic and selection; implemented rules build business formulas on them; executed rules keep every evaluation, step by step, with where each value was read from.
- 1Abstract rulesThe rules themselves: each a formula over named parameters, with its rounding, output and the policy it implements. Approved as rules.
- 2Implemented rulesWhere each rule is used, and with what: every parameter mapped to its source (which price, in which table and record) and the workflow, step or service that uses it.
- 3Executed rulesThe log of every run of an implemented rule: each value, the cell it was read from, each step.
Abstract rules
The rules themselves: each a formula over named parameters, with its rounding, output and the policy it implements. Approved as rules.
The charge for a service before tax: the quantity asked for times the fee of one unit of the service.
Service charge = Quantity × unit fee
Computed by FN-3 · Product · Policy: Retail fee schedule 2026
Implemented rules
- IR-1Service charge · retail service catalogueApproved0 runsProcess map PF-2 · Step “Calculate the charge”
The VAT due on a taxable amount: the standard VAT rate of the country of supply, in percent, of the amount.
VAT amount = Taxable amount × VAT rate (%) ÷ 100
Computed by FN-5 · Percentage of · Policy: Egypt VAT Law 67 of 2016, art. 2; KSA VAT Implementing Regulations, art. 2
Implemented rules
- IR-2VAT · standard rate of the country of supplyApproved1 runsProcess map PF-2 · Step “Calculate the charge”
What the customer is invoiced: the net amount plus the VAT on it.
Total charge = Net amount + VAT
Computed by FN-1 · Sum · Policy: Retail pricing policy RP-04
Implemented rules
- IR-3Total charge · retail quoteApproved3 runsProcess map PF-2 · Step “Issue the new card and charge the fee”
The largest part of a charge an agent may waive without approval: a share, in percent, of the charge.
Waiver allowed = Charge × Largest waiver (%) ÷ 100
Computed by FN-5 · Percentage of · Policy: Fee waiver rule (FEE-WAIVER-RATE)
Implemented rules
- IR-4Fee waiver limit · FY2026 approval thresholdsApproved1 runsProcess map PF-2 · Decision “Waive the fee?”
Who approves a refund: up to the automatic approval limit it is approved automatically, below the supervision limit by Finance, and from the supervision limit on by the risk committee.
Approval route = IF(Refund requested ≤ Automatic approval limit, Route up to the automatic limit, IF(Refund requested < Supervision limit, Route between the limits, Route from the supervision limit))
Computed by FN-11 · Threshold band · Policy: Refund policy RF-02, approval matrix
Implemented rules
- IR-5Refund approval route · refund request caseApproved3 runsWorkflow WF-3 · Node “Choose approval route”
The typical refund: the mean amount of the latest refund requests.
Average refund requested = SUM(Refund amounts) ÷ COUNT(Refund amounts)
Computed by FN-6 · Average (arithmetic mean) · Policy: Refund monitoring KPI K-RF-3
Implemented rules
- IR-6Average refund · latest 25 refund casesApproved1 runsReport / interface RM-7 · Refund exposure report
How many times the average refund a request is; far above 1 flags it for a second look.
Refund to average ratio = Refund requested ÷ Average refund
Computed by FN-4 · Ratio · Policy: Proposal from the Q3 refund review
Implemented rules
- IR-7Refund deviation · refund request caseDraft0 runsWorkflow WF-3 · Proposed check before Finance approval
Latest executed rules
All executed rules (9)| Rule | Result | Context | By | At | ||
|---|---|---|---|---|---|---|
| RX-9 | IR-6 v1 Average refund · latest 25 refund casesMonthly refund monitoring | 975.36 EGP | 2026-10-15 · EG | Karim Mansour | 15 Oct 2026, 15:49 | Succeeded |
| RX-8 | IR-5 v1 Refund approval route · refund request caseDry run for January 2027: the FY2026 thresholds end on 31 December and FY2027 is not released yet | Failed | 2027-01-15 · EG · REQ-1 | Nour Adel | 15 Oct 2026, 15:49 | Failed |
| RX-7 | IR-5 v1 Refund approval route · refund request caseRefund processing (WF-3) · Choose approval route | "Approve automatically" | 2026-10-15 · EG · REQ-5 | Workflow | 15 Oct 2026, 15:49 | Succeeded |
| RX-6 | IR-5 v1 Refund approval route · refund request caseRefund processing (WF-3) · Choose approval route | "Finance approval" | 2026-10-15 · EG · REQ-1 | Workflow | 15 Oct 2026, 15:49 | Succeeded |
| RX-5 | IR-2 v1 VAT · standard rate of the country of supplyQuote for the Dubai office: no VAT code for AE yet | Failed | 2026-10-15 · AE · service=SRV-CARD-REPLACE · quantity=1 | Lina Saleh | 15 Oct 2026, 15:49 | Failed |
| RX-4 | IR-4 v1 Fee waiver limit · FY2026 approval thresholdsWaiver an agent may grant on three card replacements | 128.25 EGP | 2026-10-15 · EG · service=SRV-CARD-REPLACE · quantity=3 | Nour Adel | 15 Oct 2026, 15:49 | Succeeded |
| RX-3 | IR-3 v1 Total charge · retail quoteEarly loan settlement quote, Riyadh office (VAT 15%) | 575.00 EGP | 2026-10-15 · SA · service=SRV-LOAN-SETTLE · quantity=1 | Lina Saleh | 15 Oct 2026, 15:49 | Succeeded |
| RX-2 | IR-3 v1 Total charge · retail quoteThree account statements, Alexandria branch | 85.50 EGP | 2026-10-15 · EG · service=SRV-STATEMENT · quantity=3 | Nour Adel | 15 Oct 2026, 15:49 | Succeeded |
Calculation functions (13)
The general functions every rule is computed by (FN-1…FN-13). They never change.
| FN-1 | Sum | Terms | Adds every term. A list term adds each of its values. |
| FN-2 | Difference | Amount − Less | The first amount less the second. |
| FN-3 | Product | Factors | Multiplies every factor. |
| FN-4 | Ratio | Numerator ÷ Denominator | The first value divided by the second. A zero denominator stops the calculation; it never becomes zero or infinity. |
| FN-5 | Percentage of | Base amount × Rate (%) ÷ 100 | A rate, in percent, of a base amount. |
| FN-6 | Average (arithmetic mean) | SUM(Values) ÷ COUNT(Values) | The sum of the values divided by how many there are. Empty values are left out of both; no values stops the calculation. |
| FN-7 | Count | COUNT(Values) | How many values there are, leaving empty ones out. |
| FN-8 | Minimum | MIN(Values) | The smallest of the values. |
| FN-9 | Maximum | MAX(Values) | The largest of the values. |
| FN-10 | Cap at a limit | MIN(Value, Limit) | The value, but never more than the limit. |
| FN-11 | Threshold band | IF(Value ≤ Up to, Outcome up to the first threshold, IF(Value < Below, Outcome between, Outcome from the second threshold)) | Places a value in one of three bands by two thresholds: up to the first (inclusive), below the second, or from the second on. |
| FN-12 | Effective-dated selection | SELECT the one record WHERE criteria match AND valid from ≤ date ≤ valid to | Exactly one record must match the criteria and be in effect on the day. None, or more than one, stops every calculation that depends on it: there is no fallback value. |
| FN-13 | Round half up | ROUND(value, decimals) | Rounds to a number of decimals, halves away from zero. Monetary results round to 2 decimals once, at the end of the step that makes them. |