BookmarkSubscribeRSS Feed

How to Create a Rule Set and Use It in a Decision Flow in SAS Decision Builder

Started ‎11-11-2024 by
Modified ‎12-11-2024 by
Views 1,325

Creating rule sets is an essential part of automating business decisions in SAS Decision Builder. This guide will walk you through setting up a rule set, defining variables, adding rules, incorporating the rule set into a decision flow, and viewing the results. Let’s get started!

 

Want to see these steps in action? You can also watch our video guide to creating a rule set and using it in a decision flow in SAS Decision Builder. The video walks you through each stage, making it easy to follow along and get started. Watch the video first if you prefer a visual guide before diving into the written steps!


Step 1: Create a New Rule Set

 

  1. In the SAS Decision Builder interface, click on ‘New Item’ and select ‘Rule Set’.
  2. Name your rule set according to the purpose it serves (e.g., ‘Eligibility_Check’ or ‘Approval_Criteria’).
  3. Once you’ve named your rule set, open it to begin configuring variables and adding rules.

 

KumarT_SAS_0-1731630293691.png

 


Step 2: Define Variables for the Rule Set

 

Variables are essential for defining the data inputs and outputs in your decision logic.

  1. Navigate to the Variables Tab: In the rule set editor, go to the Variables tab.
  2. Add New Variables:
    • Click on ‘Add Variable’ and name each variable (e.g., STATUS, BAD, JUSTIFICATION, OFFER_RATE).
    • Specify whether each variable is an Input (data coming from an external source) or an Output (data generated as part of the decision outcome).
    • Assign the appropriate data type to each variable (e.g., integer, character, decimal).

Defining variables first provides a clear structure for creating rules and avoids potential validation issues.

 

KumarT_SAS_1-1731630343526.png

 


Step 3: Add Rules to the Rule Set

 

Now that you’ve defined the variables, it’s time to create the rules that will drive your decision-making process.

  1. Return to the Home Screen: Go back to the main screen of the rule set editor.

  2. Add a New Rule: Click on ‘Add Rule’ to create the first rule.

    Example Rules:

    • Initial Status Assignment:
      • Set STATUS to ‘REVIEW’ initially, indicating that all applications start in review.
    • Denial Criteria:
      • Create an IF condition to automatically deny certain applications.
      • IF BAD = 1 (indicating bad credit history),
      • THEN set STATUS to ‘Denied’,
      • AND set JUSTIFICATION to ‘Automatic Denial Criteria Met’.
    • Additional Denial Conditions:
      • Add more OR and AND conditions to capture other scenarios that should result in denial. For example, conditions based on debt-to-income ratio or credit score thresholds.
    • Approval Criteria:
      • Define approval rules for applications meeting all eligibility criteria.
      • For example, if an applicant’s credit history is clean and their loan request is within acceptable limits, set STATUS to ‘Approved’.
    • Calculate Offer Rate for Approved Applications:
      • If the application is approved, calculate OFFER_RATE based on a predefined variable like Rate_Low.
      • This rule can adjust the offer rate dynamically, providing a customized rate for each approved applicant.
KumarT_SAS_2-1731630413462.png

 

 


Step 4: Add the Rule Set to a Decision Flow

 

Now that your rule set is complete, you can add it to a decision flow to automate the decision process.

  1. Open the Decision Flow Editor: In SAS Decision Builder, navigate to the decision flow where you want to use the rule set.
  2. Add the Rule Set to the Flow:
    • Right-click on the Start decision step in the flow.
    • Select ‘Add’, then choose ‘Rule Set’.
    • Choose the rule set you created (e.g., ‘Eligibility_Check’).
  3. Review and Configure Flow Variables:
    • Add variables to the decision flow to ensure that data flows correctly into and out of the rule set.
    • Mark each variable as Input or Output, depending on whether it’s coming from an input dataset or generated as part of the decision outcome.
KumarT_SAS_3-1731630470330.png

 

 

KumarT_SAS_4-1731630492547.png

 


Step 5: Run the Decision Flow and View Results

 

With the rule set added to the decision flow, you’re ready to test it and view the outcomes.

  1. Run the Decision Flow:
    • Click Run in the Decision flow editor.
    • A dialog will prompt you to select an input dataset. Choose the dataset with relevant data (e.g., loan applications).
    • Specify a destination in your lakehouse where the results will be saved.
  2. Review the Results:
    • After running the decision flow, navigate to the lakehouse table to view the decision outcomes.
    • The results will show how each application was processed, displaying statuses (Approved, Denied, or Review) and justifications based on your rule set.
KumarT_SAS_5-1731630522080.png

 


With these steps, you’ve successfully created and configured a rule set in SAS Decision Builder, added it to a decision flow, and viewed the outcomes. This process allows you to automate complex decision-making, making it more efficient, consistent, and data-driven.

 

Explore additional options in SAS Decision Builder to further refine your decision flows, adjust rules as business needs change, and incorporate advanced logic. Watch this guide to build a complete decision flow.

Version history
Last update:
‎12-11-2024 10:20 AM
Updated by:
Contributors

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

SAS AI and Machine Learning Courses

The rapid growth of AI technologies is driving an AI skills gap and demand for AI talent. Ready to grow your AI literacy? SAS offers free ways to get started for beginners, business leaders, and analytics professionals of all skill levels. Your future self will thank you.

Get started

Article Labels
Article Tags
OSZAR »