BookmarkSubscribeRSS Feed
KumarT_SAS
SAS Employee

Credit card fraud is a relentless challenge for banks and consumers alike. It's a high-stakes game where speed, accuracy, and adaptability are crucial. Imagine being able to detect and act on fraud, not just react to it, all within a unified data and AI platform.

 

That's precisely what we're going to explore today: how SAS Decision Builder, integrated seamlessly with Microsoft Fabric, empowers organizations to build intelligent, automated decisioning pipelines to fight credit card fraud.

 

Challenge:

Every minute, millions of credit card transactions flow through financial systems. Buried within this colossal volume are fraudulent activities – from small-scale card testing to sophisticated identity theft. Relying solely on manual review or rigid rules is no longer sufficient. We need dynamic, data-driven decisions that can keep pace with evolving fraud tactics.

 

Solution:

Microsoft Fabric provides a powerful, end-to-end analytics platform. By bringing SAS Decision Builder into this environment, we unlock the ability to orchestrate complex decisions directly where your data lives – in OneLake. This means no data movement, faster processing, and a simpler architecture for your data engineers.

 

How it Works:

 

Step 1: Understanding the Data with Power BI

Before we build any intelligence, it’s vital to understand our raw transaction data. Power BI, integrated directly with OneLake, provides immediate insights.

 

KumarT_SAS_0-1759182332907.png 

 

 

KumarT_SAS_3-1759183149771.png

 

 

 

 

KumarT_SAS_1-1759182353503.png

 

 

 

KumarT_SAS_4-1759183237757.png

 

 

 

This dashboard gives us a quick pulse on our incoming transactions: the overall volume, peak hours, and the distribution of transaction amounts. It's our starting point for identifying what's "normal" before we look for anomalies.


Step 2: Building the Intelligent Decision Flow in SAS Decision Builder

This is where the magic happens. SAS Decision Builder on Microsoft Fabric allows us to visually construct a multi-layered decisioning pipeline. It's a canvas where rules, machine learning models, and custom code come together to make intelligent, auditable decisions.

 

 

2.1 Feature Engineering with Python and Rulesets

Modern fraud detection relies on rich features. Within the Decision Builder, we can embed Python Code Files to perform advanced feature engineering and Rulesets to add conditional business logic, categorization and much more. This includes creating ratios, temporal features (like transaction_hour or days_since_last_transaction), one-hot encodings (like payment_devide or transaction_day_of_week), and categorizing transactions based on time since last transaction. This leverages your existing Python expertise directly within the decision flow and out of the box rules builder for business rules.

 

Transaction date time, shipping and billing zipcode

 

KumarT_SAS_0-1759253811597.png

 

KumarT_SAS_1-1759253945552.png

 

Categorization and feature engineer calculated fields

 

KumarT_SAS_2-1759253962632.png

 

KumarT_SAS_3-1759254078904.png

KumarT_SAS_4-1759254087354.png

 

Payment device

KumarT_SAS_5-1759254110976.png

 

KumarT_SAS_6-1759254161484.png

 

Transaction groups

 

KumarT_SAS_7-1759254206259.png

 

KumarT_SAS_8-1759254281305.png

 

Encoding a week

 

KumarT_SAS_9-1759254296080.png

 

KumarT_SAS_10-1759254474796.png

 

2.2 ML Model for Initial Scoring (Primary Fraud Prediction)

Now for the brains of the operation! We integrate an ML Model node that houses our primary fraud detection model (e.g., a Random Forest Classifier). This model, trained in a Fabric notebook, quickly assesses the risk of each transaction and outputs a probability_class_1 score (the likelihood of fraud).

 

 

KumarT_SAS_12-1759254564235.png

 

 

2.3 Intelligent Branching for Tiered Analysis

Not all transactions are created equal. Based on the initial ML model's probability_class_1 score, we use intelligent branching to route transactions down different paths:

  • High Risk: Transactions with a high probability score (e.g., 0.8-1.0).

  • Medium Risk: Transactions with a moderate probability score (e.g., 0.5-0.79).

  • Low Risk: Transactions with a low probability score (e.g., 0.0-0.49).

KumarT_SAS_13-1759254576753.png

 

2.4 Policy Enforcement in Branches

This is where we transition from prediction to policy. The model gives us a score, but the subsequent Rulesets enforce the bank's non-negotiable policy and heuristics.

  • High Risk Path: Here, we add a business rule: if a high-risk transaction's amount is over $350, it's immediately flagged as fraud.

    KumarT_SAS_14-1759255023048.png

     

  • Medium Risk Path: A Ruleset checks for inactivity: if the account is flagged as 'Medium Risk' AND the days_since_last_transac is over 60, it forces a manual 'Review'.

KumarT_SAS_15-1759255040367.png

 

 

2.5 Generative AI for Explainable Decisions (LLM Integration)

This is where decisioning meets cutting-edge AI. For every high-risk transaction that's flagged, we use another Python Code File to integrate with a public Large Language Model (LLM). We feed the LLM key transaction details, and it generates a natural language explanation of why the transaction was flagged. This provides instant context for human analysts, turning a cryptic score into an understandable reason.

 

2.6 Final Aggregation & Output to OneLake

All paths converge to a final aggregation step, where we consolidate the decisions (Fraud_Detected: Yes/No/Review), risk scores, and generated explanations. The final output is then written back to OneLake, making it immediately available for reporting and downstream systems.


Step 3: Actionable Insights with Power BI Output Report

The true measure of a decisioning system is its impact. Our final Power BI dashboard, built directly on the output table in OneLake, provides a clear, actionable overview of the decisions made.

 

Screenshot Placeholder: Power BI Output Data Dashboard

  • *Image showing Power BI Dashboard 2: "Today's Fraud Decisions". This dashboard should feature:

    • Cards for "Fraudulent Transactions Detected" and "Total Transactions Reviewed".

    • A donut chart for "Fraud Decision Breakdown (Yes/No/Review)".

    • A histogram showing "Risk Score Distribution (0.0-1.0)".

    • A table listing specific fraudulent transactions with 'Final_Decision_Reason' and 'LLM_Explanation' (if enabled).*

 

KumarT_SAS_0-1759238484782.png

 

 

KumarT_SAS_1-1759238524115.png

 

KumarT_SAS_2-1759238544250.png

 

KumarT_SAS_3-1759238563417.png

 

 

 

This dashboard shows us the total fraud detected, the breakdown of decisions, and, crucially, provides human-readable explanations for why certain transactions were flagged. This full transparency is invaluable for auditing, compliance, and continuous improvement.


The power of this platform extends far beyond fraud detection. Imagine applying this composable, auditable decisioning to:

  • Banking & Finance: Dynamic loan origination, personalized credit risk assessment.

  • Insurance: Automated claims processing, predictive underwriting.

  • Retail: Real-time personalized offers, intelligent inventory management.

  • Healthcare: Proactive patient intervention, optimized resource allocation.


Get Started Today!

Ready to transform your data into intelligent, automated decisions? The SAS Decision Builder on Microsoft Fabric offers an unparalleled environment to build, test, and deploy powerful decisioning pipelines.

 

Sign up for free public preview today and start building your future-proof decision systems!

Sign up for free public preview

2 REPLIES 2
KumarT_SAS
SAS Employee

Attached input data csv file for the decision flow and to train the ML model.

 

Yough1967
Fluorite | Level 6
From my perspective, the coolest part is how it combines data from multiple sources—transaction history, location, device info—and gives you actionable insights. I’d personally focus on setting up clear rules for high-risk transactions, but let the system adapt over time for borderline cases. That way, you’re not manually chasing every weird transaction, but you’re still protected.