Every enterprise integration eventually hits a fork in the road. "Should this invoice go to the CFO or the Department Head?" "Is this supplier risk HIGH, MEDIUM, or LOW?" "Should this employee's expense claim be auto-approved or flagged for review?" These are decisions — and in OIC Gen3, the Decisions feature gives you a dedicated, structured, auditable engine for making them, with or without AI assistance.
What changed in Gen3 is profound: Decisions are no longer just static rule tables. They can now call OCI Generative AI, read from Knowledge Bases, and incorporate LLM reasoning as one of the inputs into the decision output. Your business rules can be intelligently enhanced — a rule that used to say "if sentiment score > 0.7 then escalate" can now use a real AI sentiment analysis tool, not a hardcoded threshold you guessed three years ago.
ABC Corp processes 600+ supplier invoices per week in Oracle Fusion Accounts Payable. Manually reviewing each one for payment priority, fraud risk, early payment discount eligibility, and 3-way match exception handling takes 3 AP clerks 2 full days. They want to automate this using OIC Gen3 Decisions with AI — so the system makes routine decisions autonomously, and only genuinely complex or risky cases reach a human.
By the end of this guide, you will have built a complete AI-enhanced Decision service that classifies every invoice automatically, routes it to the right workflow, and explains every decision with a reason code — all inside OIC Gen3 Projects.
⚖️ OIC Gen3 Decisions — 5 Core Capabilities
📋 Section 1: What Is a Decision in OIC Gen3?
1.1 The Core Concept — Decision as a Reusable Microservice
In OIC Gen3, a Decision is a standalone, versioned, REST-callable component that lives inside an OIC Project. You define the logic once. Any integration — scheduled, event-driven, or AI Agent tool — can call it. It receives inputs, evaluates rules (and optionally AI analysis), and returns a structured output with the decision and reason code.
1.2 Decision vs If/Switch in a Regular OIC Flow — Critical Distinction
Finance changes the approval threshold from ₹10L to ₹15L. You must update 12 flows. Redeploy all 12. Miss one → inconsistent behaviour. Audit: which version was running on 15 March?
No audit trail of the decision logic itself. No versioning. No centralisation.
Finance changes the threshold: update ONE Decision. Activate new version. All 12 flows automatically use the new logic. Zero redeployment of integrations.
Full version history of every rule change. Who changed it. When. What it was before. Every decision logged with the exact rule version that made it.
1.3 The 3 Types of Decisions — When to Use Each
Before building, choose the right Decision type for your use case. Getting this wrong leads to overly complex trees when a simple table would do — or dangerously simple tables when sequential logic is required.
| Type | How It Works | Use When | Oracle Fusion Example |
|---|---|---|---|
| Decision Table | Grid of input conditions → output values. Like Excel VLOOKUP with multiple conditions. | Rules are clear, enumerable, business-owned (Finance team can read and edit) | Invoice amount + supplier tier → Approval Level required |
| Decision Tree | Sequential branching — each decision narrows the path until a leaf node gives the output. | Logic is hierarchical, sequential — "first check X then check Y" type | Is supplier active? → Is PO matched? → Is amount in budget? → Route decision |
| AI-Enhanced Decision | Combines rule table/tree with OCI GenAI calls, sentiment analysis, KB lookups as computed inputs. | Some inputs cannot be enumerated as rules — require AI to score or classify unstructured data | Invoice anomaly score (AI) + duplicate detection (AI) + amount rule (table) → final risk decision |
🔧 Section 2: Step-by-Step — Creating Your First Decision in OIC Gen3
2.1 Creating the Decision Component Inside an OIC Project
📋 Step 1 — Create the Decision Inside Your OIC Project
Click + Add → Select "Decision" from the component list.
Note: Decision is a Project-scoped component — it lives alongside your Integrations, Agents, and Knowledge Bases inside the same Project.
AP_Invoice_Routing_DecisionDescription:
Classifies AP invoices for priority, approval level, and routing action based on amount, supplier risk, match status, and AI anomaly scoreType: Select Decision Table (we will layer in AI inputs in Section 4)
Click Create.
• Input Schema — fields the caller sends to the Decision
• Output Schema — fields the Decision returns to the caller
• Rules Editor — the actual decision table, tree, or AI-enhanced logic
2.2 Defining the Input and Output Schema
This is the most important design step. Think carefully about what data the decision needs vs what it should return. Every caller of this Decision must provide exactly these inputs — no more, no less.
📋 Step 2 — Define Input and Output Schema
reason_code + reason_text output fields are not optional. Every enterprise Decision must explain WHY it made the choice — not just WHAT the choice was. Without these, you have black-box automation that no auditor, user, or compliance officer will accept.
INPUT SCHEMA — what callers send to this Decision: { "invoice_id": string, // e.g. "INV-2025-0441" "invoice_amount_inr": number, // e.g. 4500000 (₹45L) "supplier_id": string, // e.g. "SUP_0441" "supplier_risk_tier": string, // "A","B","C" (from Fusion supplier master) "three_way_match": string, // "MATCHED","PARTIAL","NOT_MATCHED" "days_outstanding": number, // days since invoice submission "early_pay_discount": boolean, // true if supplier offers early payment discount "is_duplicate_flag": boolean, // pre-computed by duplicate detection tool "invoice_description": string, // free text — used by AI analysis in Section 4 "business_unit": string // "IN_CORP","SG_CORP","US_CORP" } OUTPUT SCHEMA — what this Decision returns to callers: { "decision_id": string, // unique ID for audit trail e.g. "DEC-20250701-0441" "action": string, // "AUTO_APPROVE","MANAGER_REVIEW","CFO_ESCALATE"
,"REJECT" "priority": string, // "HIGH","MEDIUM","LOW" "approval_level": string, // "NONE","MANAGER","FINANCE_CTRL","CFO" "reason_code": string, // "AMOUNT_THRESHOLD","MATCH_FAIL","DUPLICATE",
"AI_ANOMALY" "reason_text": string, // human-readable explanation "confidence_score": number, // 0.0–1.0 (1.0 = rule-based certain,
<0.8 = AI-influenced) "rule_version": string, // "v2.3" — which version of this Decision fired "decision_timestamp": string // ISO 8601 timestamp }
2.3 Building the Decision Table — Rule by Rule
Now the actual rules. In the OIC Decision Designer, rules are entered as rows in a table. Each row defines a set of input conditions and the output values when those conditions match. Rules are evaluated from top to bottom — first match wins.
📋 Step 3 — The Complete Decision Table (AP Invoice Routing)
| Rule # | amount_inr | three_way_match | supplier_risk_tier | is_duplicate_flag | days_outstanding | → ACTION | → PRIORITY | → APPROVAL_LEVEL | → REASON_CODE |
|---|---|---|---|---|---|---|---|---|---|
| R1 | Any | Any | Any | = true | Any | REJECT | HIGH | FRAUD_TEAM | DUPLICATE |
| R2 | > 10,000,000 | Any | Any | = false | Any | CFO_ESCALATE | HIGH | CFO | AMOUNT_THRESHOLD |
| R3 | Any | = NOT_MATCHED | Any | = false | Any | MANAGER_REVIEW | HIGH | MANAGER | MATCH_FAIL |
| R4 | > 5,000,000 | = MATCHED | = C | = false | Any | MANAGER_REVIEW | MEDIUM | FINANCE_CTRL | HIGH_RISK_SUPPLIER |
| R5 | 500K – 5,000K | = MATCHED | = A or B | = false | <= 30 | MANAGER_REVIEW | MEDIUM | MANAGER | STANDARD_APPROVAL |
| R6 | < 500,000 | = MATCHED | = A or B | = false | <= 30 | AUTO_APPROVE | LOW | NONE | WITHIN_AUTO_LIMIT |
| R7 | Any | = MATCHED | Any | = false | > 30 | MANAGER_REVIEW | HIGH | MANAGER | OVERDUE_INVOICE |
| R8 (default) |
Any | Any | Any | = false | Any | MANAGER_REVIEW | MEDIUM | MANAGER | UNCLASSIFIED |
2.4 Testing Your Decision Table in the OIC Designer
📋 Step 4 — Testing in OIC Decision Designer (Before Activation)
Test Case 1 — Should trigger R1 (Duplicate):
Input: invoice_amount_inr=2000000, is_duplicate_flag=true Expected: action=REJECT, reason_code=DUPLICATE, confidence_score=1.0 Fired: R1 ✅
Input: invoice_amount_inr=300000, three_way_match=MATCHED,
supplier_risk_tier=A, is_duplicate_flag=false, days_outstanding=10
Expected: action=AUTO_APPROVE, priority=LOW, approval_level=NONE
Fired: R6 ✅
Input: invoice_amount_inr=1500000, three_way_match=NOT_MATCHED,
supplier_risk_tier=B, is_duplicate_flag=false, days_outstanding=5
Expected: action=MANAGER_REVIEW, reason_code=MATCH_FAIL (NOT STANDARD_APPROVAL)
Fired: R3 ✅ (R3 fires before R5 because of rule priority order)
v1.0 of your Decision and exposes it as a REST endpoint inside the Project scope.🔗 Section 3: Calling a Decision from an OIC Integration
Now that your Decision is live, every integration in your Project can call it. Here is the exact implementation for an AP Invoice processing flow that calls the Decision and routes the invoice accordingly.
🔧 AP_Invoice_Processor_Integration — Full Flow with Decision Call
Calls Fusion AP REST API:
GET /fscmRestApi/resources/latest/invoices?q=status=NEEDS_VALIDATIONReturns: list of pending invoices for this processing cycle.
Extract: invoice_id, amount, supplier_id, days_outstanding, invoice_description from Fusion payload.
Call: Fusion supplier API → extract supplier_risk_tier.
Call: Fusion PO match API → extract three_way_match.
Call:
OIC Integration: Duplicate_Detection_v1 → returns is_duplicate_flag.
In OIC Designer, add "Decision" Activity from the palette → Select Project Decision:
AP_Invoice_Routing_Decision.Map all inputs from Assign variables to Decision input schema.
Decision returns:
{action, priority, approval_level, reason_code, reason_text, confidence_score, rule_version}
Branch 1:
decision.action = "AUTO_APPROVE" → Invoke Fusion AP: approve invoice → Done.Branch 2:
decision.action = "MANAGER_REVIEW" → Invoke OIC Human Approval flow with decision context.Branch 3:
decision.action = "CFO_ESCALATE" → Invoke CFO Notification + OIC BPM Process.Branch 4:
decision.action = "REJECT" → Fusion AP: put invoice on HOLD + notify AP team.
Write to OCI Logging: invoice_id, decision_id, action, reason_code, rule_version, confidence_score, timestamp.
Update Fusion AP Invoice DFF field:
OIC_Decision_ID = decision.decision_id (for three-way audit trace).
3.1 The Decision Invoke — Exact XSLT Mapping
🔧 Input Mapping to Decision (OIC Mapper / Assign Activity)
/* In the Decision Invoke Activity mapper: */ decisionInput/invoice_id = $invoiceData/InvoiceId decisionInput/invoice_amount_inr = number($invoiceData/InvoiceAmount) * 100 /* Fusion returns amount in LPA — convert to INR units */ decisionInput/supplier_id = $invoiceData/SupplierId decisionInput/supplier_risk_tier = $supplierData/RiskTier decisionInput/three_way_match = fn:upper-case($matchData/MatchStatus) decisionInput/days_outstanding = days-from-duration( current-dateTime() - xs:dateTime($invoiceData/InvoiceDate)) decisionInput/early_pay_discount = $supplierData/EarlyPaymentDiscountAvailable = 'Y' decisionInput/is_duplicate_flag = $duplicateResult/IsDuplicate = 'true' decisionInput/invoice_description = $invoiceData/Description decisionInput/business_unit = $invoiceData/BusinessUnitName
🧠 Section 4: AI-Enhanced Decisions — OCI GenAI Meets Business Rules
This is the most powerful capability in OIC Gen3 Decisions. You can now use OCI Generative AI as a computed input to your Decision — meaning the AI produces a score or classification that the rule table then acts on. The result: decisions that combine the predictability of rules with the intelligence of AI.
Step 1 — AI Pre-Processing: Before the decision table runs, call OCI GenAI to analyse unstructured data (invoice description, supplier notes, historical patterns) and produce a structured score.
Step 2 — Rule Table Acts on AI Score: The AI score becomes an additional input column. Rules can now say "if ai_anomaly_score > 0.8 THEN escalate" — combining LLM intelligence with deterministic rules.
Step 3 — Explainability: The AI's reasoning is captured as reason_text — every decision has a human-readable explanation that combines the rule that fired AND the AI analysis that contributed.
4.1 Adding AI Anomaly Detection to the Invoice Decision
We will add two AI-computed inputs: an anomaly score (how unusual is this invoice compared to supplier's history?) and a description sentiment score (does the invoice description contain anything suspicious?).
🔧 AI Pre-Processing Integration — Called Before the Decision
Create a new OIC Integration: Invoice_AI_Scorer_v1 — called by AP_Invoice_Processor before the Decision invoke.
/* OIC Integration: Invoice_AI_Scorer_v1 Input: invoice details + supplier history Output: ai_anomaly_score (0.0-1.0) + ai_description_risk (LOW/MEDIUM/HIGH) */ STEP 1 — Build the OCI GenAI prompt (Assign Activity): aiPrompt = concat( "You are an AP fraud detection specialist for Oracle Fusion Finance.\n", "Analyse this invoice and return ONLY a JSON object — no other text.\n\n", "INVOICE DETAILS:\n", "- Invoice ID: ", $invoice/InvoiceId, "\n", "- Amount: ₹", $invoice/InvoiceAmount, " (supplier avg: ₹", $supplier/AvgInvoiceAmount, ")\n", "- Description: ", sanitise_field($invoice/Description), "\n", "- Supplier: ", $supplier/Name, " (Tier: ", $supplier/RiskTier, ")\n", "- Invoices in last 90 days: ", $supplier/InvoiceCount90d, "\n", "- Prior GRN mismatches: ", $supplier/GrnMismatchCount, "\n\n", "TASK: Score this invoice on two dimensions:\n", "1. anomaly_score (0.0-1.0): How unusual vs supplier history?\n", "2. description_risk (LOW/MEDIUM/HIGH): Suspicious language?\n\n", "Return ONLY this JSON (no markdown, no explanation):\n", '{"anomaly_score":0.0,"description_risk":"LOW",', '"anomaly_reason":"one sentence max","risk_indicators":[]}' ) STEP 2 — Call OCI GenAI (Invoke Activity): OCI GenAI Cohere Command R+ temperature: 0.1 // near-zero for scoring — not creative max_tokens: 200 // score output is tiny — don't waste tokens STEP 3 — Parse Response (Assign + XSLT): aiResponse = parse-json($genAIOutput/text) ai_anomaly_score = number($aiResponse/anomaly_score) ai_description_risk = fn:upper-case($aiResponse/description_risk) ai_anomaly_reason = $aiResponse/anomaly_reason STEP 4 — Confidence Guard (Assign): /* If AI returns invalid JSON or out-of-range score: default to safe values */ if (ai_anomaly_score < 0 or ai_anomaly_score > 1 or is-NaN(ai_anomaly_score)): ai_anomaly_score = 0.5 // safe default: treat as medium risk ai_description_risk = "MEDIUM" ai_anomaly_reason = "AI scoring unavailable — defaulting to manual review"
4.2 Updating the Decision Table with AI Inputs
📋 Updated Decision Table — v2.0 with AI Columns
| Rule | ai_anomaly_score | ai_description_risk | amount_inr | three_way_match | → ACTION | → REASON_CODE | → CONFIDENCE |
|---|---|---|---|---|---|---|---|
| R_AI1 | >= 0.85 | Any | Any | Any | CFO_ESCALATE | AI_HIGH_ANOMALY | ai_score (low) |
| R_AI2 | 0.6 – 0.84 | = HIGH | Any | Any | MANAGER_REVIEW | AI_SUSPICIOUS_DESC | ai_score |
| R_AI3 | 0.4 – 0.59 | = MEDIUM | > 1,000,000 | = MATCHED | MANAGER_REVIEW | AI_MEDIUM_RISK_LARGE | ai_score |
| R_AI4 | < 0.4 | = LOW | < 500,000 | = MATCHED | AUTO_APPROVE | AI_LOW_RISK_SMALL | ai_score |
🤖 Section 5: Decisions Inside OIC AI Agents
When a Decision is called from an AI Agent, it is registered as a Tool. The Agent's LLM decides when to invoke it, what inputs to provide, and how to interpret and communicate the output. This is where Decisions become conversational — users can ask "why was this invoice escalated?" and the Agent answers using the Decision's reason_code and reason_text.
🔧 Registering the Decision as an Agent Tool
Tool Definition in OIC Agent Studio: { "name": "classify_invoice_for_routing", "description": "Evaluates an AP invoice against ABC Corp's approval policy and AI risk scoring to determine: required approval level, routing action (AUTO_APPROVE, MANAGER_REVIEW, CFO_ESCALATE, REJECT), priority, and the exact reason for the decision. Use this tool whenever you need to decide what should happen to a Fusion AP invoice. Always call this before taking any approval or escalation action on an invoice.", "classification": "READ", // Decision only reads + analyses. No Fusion writes. "parameters": { "invoice_id": { "type": "string", "required": true, "description": "Fusion AP Invoice ID e.g. INV-2025-0441" }, "invoice_amount_inr": { "type": "number", "required": true }, "supplier_id": { "type": "string", "required": true }, "three_way_match": { "type": "string", "required": true, "enum": ["MATCHED","PARTIAL","NOT_MATCHED"] }, "invoice_description": { "type": "string", "required": false } }, "returns": "action, priority, approval_level, reason_code, reason_text, confidence_score, decision_id, rule_version" }
5.1 Complete Agent Conversation Using Decision — Runtime Trace
🎯 Live Execution Trace — Finance Agent + Decision
[CALL 1]
get_supplier_details("GlobalParts") → returns {supplier_id:"SUP_0441", risk_tier:"B"}[CALL 2] Memory read for GlobalParts → returns {grn_mismatch_flag:true, count:3}
AGENT ACT (Iteration 2):
[CALL]
classify_invoice_for_routing(invoice_id="INV-2025-0441", invoice_amount_inr=4800000, supplier_id="SUP_0441", supplier_risk_tier="B", three_way_match="MATCHED", days_outstanding=12, is_duplicate_flag=false, invoice_description="Hardware components - urgent delivery batch 7", early_pay_discount=false)
OCI GenAI analyses invoice: ₹48L is higher than GlobalParts' avg (₹22L), GRN flag active.
→ ai_anomaly_score = 0.64, ai_description_risk = MEDIUM
Rule evaluation: R_AI1 (score >=0.85)? No. R2 (>₹1Cr)? No. R3 (NOT_MATCHED)? No. R_AI2 (score 0.6-0.84 + description HIGH)? Score matches but description is MEDIUM not HIGH. R5 (₹5L–₹50L + MATCHED + A or B + <=30 days)? YES — R5 fires. AI anomaly score 0.64 is moderately high, so it is appended to reason_text.
{
"decision_id": "DEC-20250701-0441",
"action": "MANAGER_REVIEW",
"priority": "MEDIUM",
"approval_level": "MANAGER",
"reason_code": "STANDARD_APPROVAL",
"reason_text": "Invoice within standard approval band (₹5L-₹50L,
Tier B, matched,30 days). Note: AI anomaly score 0.64
(moderately elevated —invoice amount 2.2x
supplier average). GRN mismatch history
flagged. Recommend manager verify batch 7 delivery.",
"confidence_score": 0.72,
"rule_version": "v2.3"
}
"✅ Invoice INV-2025-0441 has been classified:
Action: MANAGER REVIEW required | Approval Level: Department Manager | Priority: MEDIUM
Reason: Invoice falls within the standard ₹5L–₹50L approval band with a completed 3-way match. However, our AI analysis flags this invoice as moderately anomalous — the ₹48L amount is 2.2× GlobalParts' average invoice size, and they have 3 prior GRN mismatches on record. I recommend the approving manager verify Batch 7 delivery quantities against the GRN before approving.
Decision Reference: DEC-20250701-0441 (Rule v2.3) | Confidence: 72%
Shall I send the approval request to the manager now?"
🔄 Section 6: Updating Decision Rules Without Redeploying Integrations
This is the single most powerful operational feature of OIC Gen3 Decisions. When Finance changes the auto-approval threshold from ₹5L to ₹8L in Q3, here is exactly how that change flows — with zero downtime.
🔧 Zero-Downtime Rule Update Process
Before:
amount_inr < 500,000 → AUTO_APPROVEAfter:
amount_inr < 800,000 → AUTO_APPROVEAlso updates R5 lower bound from 500,000 to 800,000.
🚨 Section 7: Common Mistakes — Decisions in OIC Gen3
Symptom: An invoice arrives with an unusual combination not covered by any rule. OIC throws a NO_MATCHING_RULE exception. The integration fails. Invoice stuck in limbo.
Fix: Always add a default rule as the last row — all conditions = "Any", output = MANAGER_REVIEW / UNCLASSIFIED. A human should always be the fallback for unclassified inputs. Never let the Decision throw an exception on real data.
Symptom: OCI GenAI returns malformed JSON, or a score of "N/A", or a number outside 0.0–1.0. Your XSLT tries to parse it. It fails. Rule R_AI1 fires incorrectly — NaN >= 0.85 evaluates unpredictably.
Fix: Always validate AI output before it enters the Decision: range check (0.0–1.0), type check (number), null check. On any validation failure: set safe defaults (anomaly_score=0.5, description_risk=MEDIUM) and add a flag to reason_text: "AI scoring fell back to defaults."
Symptom: You call OCI GenAI to score EVERY invoice — including clearly duplicate ones (is_duplicate_flag=true) that will be rejected by R1 before the AI score is even used. Unnecessary latency and token cost on every run.
Fix: In the OIC Integration, add a short-circuit check BEFORE calling Invoice_AI_Scorer_v1. If is_duplicate_flag=true OR amount > ₹1Cr → skip AI scoring entirely, call Decision directly with ai_anomaly_score=0.0. AI scoring should only run on invoices that will actually reach AI rules in the Decision table.
Symptom: Finance Controller updates R6 threshold without running the saved test suite. R5 and R6 now have an overlapping range. Auto-approvals that should be manual reviews slip through for 3 weeks until someone notices.
Fix: OIC Gen3 Decision test suites must be mandatory. Never activate a Decision version without running all saved test cases and achieving 100% pass rate. Save at least one test case for every rule and every boundary condition.
Symptom: Decision fires, invoice is auto-approved. Three months later, auditor asks: "Why was INV-2025-0441 auto-approved?" Your team cannot trace which rule version fired. The audit fails.
Fix: Every Decision output must write the decision_id and rule_version back to the Fusion source record using a DFF. In Fusion AP Invoice, create DFF: ATTRIBUTE1=OIC_Decision_ID, ATTRIBUTE2=OIC_Rule_Version. Now every Fusion record has its decision permanently embedded, queryable from Fusion directly.
🏗️ Section 8: Architecture Diagram + Interview Questions
OIC GEN3 DECISIONS WITH AI — COMPLETE ARCHITECTURE ═══════════════════════════════════════════════════════════════════ ORACLE FUSION AP INVOICE (Source of Truth) │ Pending invoices (every 15 min) ▼ ┌─────────────────────────────────────────────────────────────────┐ │ AP_Invoice_Processor (OIC Scheduled Integration) │ │ │ │ ForEach Invoice: │ │ 1. Fetch supplier_risk_tier (Fusion REST) │ │ 2. Fetch three_way_match (Fusion REST) │ │ 3. Check duplicate (OIC Duplicate_Detection_v1) │ │ │ │ Short-circuit: if duplicate OR amount > 1Cr │ │ → Skip AI scoring (save tokens/latency) │ │ ↓ │ │ Else: Call Invoice_AI_Scorer_v1 (OIC Integration) │ │ → OCI GenAI analysis (temp=0.1, max_tokens=200) │ │ → Returns: ai_anomaly_score, ai_description_risk │ │ → Confidence guard: validate + fallback on AI error │ └──────────────────────┬───────────────────────────────────────────┘ │ All inputs ready ▼ ┌───────────────────────────────────┐ │ DECISION ENGINE │ │ AP_Invoice_Routing_Decision │ │ (OIC Project Decision v2.4) │ │ │ │ Input: 10 fields │ │ Rules: 12 rows (R1–R8 + AI) │ │ Output: 8 fields + reason │ │ │ │ Example: R5 fires │ │ action: MANAGER_REVIEW │ │ reason: STANDARD_APPROVAL │ │ + ai note: anomaly 0.64 │ └──────────────┬────────────────────┘ │ Decision output ▼ ┌────────────────────────────────┐ │ SWITCH — Route by action │ └──┬──────────┬─────────┬────────┘ │ │ │ AUTO_APPROVE│ MANAGER │ │CFO_ESCALATE / REJECT ▼ REVIEW ▼ ▼ Fusion AP OIC Human OIC BPM + CFO approve() Approval Notification (Manager) ALWAYS (all branches): → Write decision_id to Fusion Invoice DFF → Log to OCI Logging: invoice_id, decision_id, action, rule_version, confidence_score, ai_score → OCI Audit: immutable record AVAILABLE TO AI AGENT AS TOOL: → classify_invoice_for_routing(invoice_id, ...) → Decision + AI analysis returned as tool output → Agent communicates reason to user in natural language
🎤 Interview Questions — Decisions in OIC Gen3
Switch Activity is flow-level conditional logic — it lives inside one integration, is version-controlled with that integration, and has no separate test harness, audit trail, or change management. If 10 integrations need the same routing logic, each has its own copy. Decision is a Project-level reusable service — one source of truth for business rules, independently versioned, with its own test suite, activation lifecycle, and audit log. All 10 integrations call the same Decision endpoint. Changing the rule updates all 10 simultaneously with zero redeployment. Decision also exposes: rule version in every output, reason codes for explainability, and AI integration that Switch Activity cannot do.
Non-determinism is managed at three levels. (1) Temperature = 0.1 in all scoring prompts — minimises variation to less than 0.03 score delta across runs. (2) Log the complete AI output (ai_anomaly_score, ai_reason, model_id, timestamp) alongside the Decision output in OCI Logging — every Decision has a permanent record of exactly what score the AI returned at that specific moment. (3) The Decision Table is deterministic — given the same AI score as input, the same rule always fires. For maximum auditability: store the full AI prompt + response in OCI Object Storage keyed by decision_id.
Keep v2.4 (current rules) active. Create v2.5 (proposed rules) as a draft — do not activate as default. In AP_Invoice_Processor, add an A/B routing Assign Activity: for every 10th invoice (counter mod 10 = 0), set decision_version="v2.5", otherwise "v2.4". Decision Invoke calls the versioned endpoint accordingly. Both versions log their decision_id with the version tag in OCI Logging. After 2 weeks, run a comparison query in Logging Analytics: v2.4 vs v2.5 — how many AUTO_APPROVE vs MANAGER_REVIEW, false positive rate, average confidence score. Present findings to Finance for go/no-go. Zero downtime. Full statistical evidence for the rule change.
📌 Quick Reference Card — Decisions in OIC Gen3
- Lives inside OIC Projects alongside Integrations
- 3 types: Table, Tree, AI-Enhanced
- Independently versioned + activated
- Called by ANY integration or AI Agent tool
- Always include reason_code + reason_text in output
- Always add a default (catch-all) rule
- AI pre-processing runs before Decision table
- Use temperature=0.1 for scoring prompts
- Always validate AI output (range, type, null)
- Confidence guard: safe defaults on AI failure
- Short-circuit AI for obvious cases (duplicate, huge amounts)
- Log full AI prompt+response by decision_id
- Rule update = new Decision version only
- Zero integration redeployment on rule change
- Run full test suite before every activation
- Save 15–20 test cases covering all rules + boundaries
- Document every version change in version notes
- A/B test new rules via versioned endpoints
- Write decision_id + rule_version to Fusion DFF
- Log: invoice_id, decision_id, action, rule_version, confidence, ai_score
- Immutable OCI Audit trail per decision
- 3-way link: Agent session ↔ OIC tracking ↔ Fusion record
- OCI Object Storage: full AI prompt+response archive
OIC Gen3 Decisions are not a small feature — they are a fundamental shift in how you manage business logic across an Oracle integration platform. Every time you find yourself copy-pasting a Switch Activity across multiple flows, or hardcoding a threshold in an Assign Activity, or wondering "which version of the approval rule was running last Tuesday at 3pm?" — that is the signal that your project needs a Decision component.
Combine Decisions with AI scoring and you move from rigid rules to intelligent rules — rules that adapt to the nuance of unstructured data, supplier behaviour patterns, and anomaly signals, while remaining fully deterministic, auditable, and business-owned.
Rules without AI are predictable but brittle. AI without rules is intelligent but ungovernable. OIC Gen3 Decisions give you both. ⚖️ 🧠
Comments
Post a Comment