14. Three-Provider Routing
Finance · Intelligence Studio
Select the cheapest active provider among three available options.
Scenario
Three providers (A, B, C) are connected. Provider C is offline.
Problem statement
YamusaPay is now connected to three providers: A, B, and C.
Provider C is offline and must be avoided. Between the active providers A and B, Provider B offers the lowest fee.
Filter out offline providers first, then select Provider B to process the transaction stream.
Provider C is offline. Provider B is online and cheaper than Provider A.
Add rule: WHEN onlineB -> DO route-b to route all transactions to Provider B.
What this teaches
Filter out unavailable routes and pick the lowest-cost active option.
Active controller
Apply & Run executes only the selected controller.
How a rule works
A rule has two parts:
WHEN <something is true> → DO <this action>
- WHEN is a question about what is happening right now. For example: "Is it raining?" or "Is there a wall ahead?"
- DO is what happens when the answer is yes.
- The simulation runs one step at a time.
- On each step, the rules are checked from top to bottom.
- The first rule that is true wins. The rules below it are skipped for that step.
- To change which rule wins, move it up or down the list.
- If no rule is true, nothing happens on that step.
- Some actions have more than one step, like "turn right, then move". You build these in the Functions tab.
- Once a multi-step action starts, it finishes all its steps before the rules are checked again. It only stops early if the next step is not safe.
See an example
Two rules for deciding about an umbrella:
1 WHEN isRaining → take an umbrella 2 WHEN always → leave the umbrella at home
- It is raining. Rule 1 is true, so you take an umbrella. Rule 2 is skipped.
- It is sunny. Rule 1 is false, so rule 2 is checked next. Rule 2 is always true, so you leave the umbrella at home.
- Order matters. If rule 2 were on top, it would be true every day, and you would never take an umbrella.
Rule folders
Categorise cards without changing their global execution order.
Transfer flow
Queue → AI routing decision → provider lane
Ready queue · 4
AI router
Live policy
Choosing a route for tx-001
Awaiting first decision
Provider lanes
Latest activity
No settlements yet — press Apply & Run to start the switch.
Failures and penalty audit⌄
The score is a lower-is-better operating cost. Every component below is added to the final score.
Provider fees
0.00
Failed attempts
0.00
Timeouts
0.00
Priority misses
0.00
Overload
0.00
Queue pressure
0.00
No provider attempt has failed in this run.
Queue depth
4
0 scheduled
In flight
0
0 settled
Success rate
—
No outcomes yet
Throughput
0.00
payments per tick
Provider details
Operational values are recalculated from the runtime after every tick.
Observed success
Awaiting outcome
configured target 100.00%
Current latency
210.00ms
210.00ms base · no congestion
Routed
0
0 settled
Attempts
0
0/0 attempts settled · 0 failed
Health
97.90%
provider online
Current fee
₦0.20
expected attempt cost ₦0.20
Measured latency
Awaiting outcome
0 completed attempts
Observed success
Awaiting outcome
configured target 100.00%
Current latency
260.00ms
260.00ms base · no congestion
Routed
0
0 settled
Attempts
0
0/0 attempts settled · 0 failed
Health
97.40%
provider online
Current fee
₦0.10
expected attempt cost ₦0.10
Measured latency
Awaiting outcome
0 completed attempts
Observed success
Awaiting outcome
configured target 100.00%
Current latency
300.00ms
300.00ms base · no congestion
Routed
0
0 settled
Attempts
0
0/0 attempts settled · 0 failed
Health
97.00%
provider offline
Current fee
₦0.15
expected attempt cost ₦0.15
Measured latency
Awaiting outcome
0 completed attempts
Task progress & pass contractThe exact requirements used to judge this visible run⌄
- Put every payment through — none left to expirenot run
allProcessed && lost == 0 - No failed paymentsnot run
allProcessed && failed == 0 - Keep total cost at or below ₦0.41not run
allProcessed && totalCost <= 0.41
Press Apply & Run to load your brain and start the simulation.