Problem Statement:
For a lot of our clients are configuration items can apply to 99% of their applicants, or certain changes in the application require a slightly different workflow.  The rules engine will allow us to configure changes to default configurations or create a new workflows based on different inputs and the conjunctions of inputs.  It will accommodate the “if this and this and this and this then that logic”. 

Terms:
Input:
This will be a database field value in our system.  It is a singular database field that can be used in conjunction with other database field to build a rule

Output:
This will be what occurs if all inputs are met.  This may mean making an account ineligible, changing the APR rate charged, or creating an assignee workflow.  Outputs will determine our Templates we make.

Templates:
A template will be created based on the output used.  As a result, it will have its set defaults and fixed outcomes.  It can contain numerous rules.  It will also dictate what stage a rule can be run at. 

Versions:
You can have multiple versions of the same template with different rules.  Only one can be active at a time.

Rules:
Rules will be a combination of one or more inputs that then has a set outcome. A rule can be run at one or multiple stages of the application.  

Default Rules:
These will be rules hardcoded to the template to accomodate if a configured set of rules does not cover a use case. 

Conjunction: 
The method to combine multiple inputs.  “AND” will be the only conjunction offered and assumed as the method to combine multiple Inputs. 

Inputs
Inputs Available

Functions Available:

Options for Selection

Estimated Lending Value

>,<,=, <=, >=

any numeric

Market Value

>,<,=, <=, >=

any numeric

Eligible Collateral

>,<,=, <=, >=

any numeric

LTV %

>,<,=, <=, >=

any numeric

Account Eligibility Flag

in

Eligible, Restricted, Ineligible

Lending Value

>,<,=, <=, >=

any numeric

Any Account Type Pledged

in

Individual, Joint, Trust, Business

Any Trust Type

in

Irrevocable, Revocable

Any Business Type

in

LLC, LP, LLP, LLLP, GP, Corp

Any Borrower Type

in

Account Types/ Registration Type fields

Any Borrower Legal Address State

in

list of all states/ territories

Any Borrower Organization/ Incorporation State

in

list of all states/ territories

Any Borrower Country of Residence

in

List of all countries

Any Borrower Country of any Citizenship

in

List of all countries

Primary Borrower Legal Address State

in

list of all states/ territories

Primary Borrower Organization/ Incorporation State

in

list of all states/ territories

Primary Borrower Country of Residence

in

List of all countries

Primary Borrower Country of any Citizenship

in

List of all countries

Any Pledgor Legal Address State

in

list of all states/ territories

Any Pledgor Organization/ Incorporation State

in

list of all states/ territories

Any Pledgor Country of Residence

in

list of all countries

Any Pledgor Country of any Citizenship

in

list of all countries

Purpose Type

in

Business, Personal

Use of Proceeds

in

list of all proceeds

Requested Amount

>,<,=, <=, >=

any numeric

Operating Business

in

Yes, No

Custodian

in

list of custodians

Securities Intermediary

in

list of security intermediaries

Rep Code

in

free form labels

Cost Center

in

free form labels

Channel

in

list of channels

Firm

in

list of firms

LOC Product

in

list of LOC Product ID

Margin Flag

in

True, False

Margin Amount

>,<,=, <=, >=

any numeric

Holding Source

in

Upload, batch, API

Line Risk Rating

in

List of LRR values

Borrower Risk Rating

in

List of BRR Values

Business a non profit

in

Yes, No

Rule Check Locations
Stage

Rule Check Actions

Login

First Time Login

Estimate

Saving an Estimate

Estimate

Creating a Proposal

Estimate

Starting an Application

Application

Application Submission to Underwriting

Application

Refreshing an Application

Application

Adding/ Deleting Collateral Accounts

Application

Adding/ Deleting Borrowers

Application

Selection of Primary Borrower

Underwriting

Refresh in Underwriting

Generate Docs App

Generate Documents in Application

Underwriting

Underwriting Page Sign Off

Underwriting

Primary Borrower Editing

Underwriting

Refreshing Collateral Accounts in Undewritng

Underwriting

Uploading a CSV in Underwriting

Underwriting

Credit Approval

Generate Docs UW

Document Generation in Underwriting

Set Line Live

Set Line Live

Outputs
Template Name

Output Results

Available Stages

Level Available

Template Name

Output Results

Available Stages

Level Available

Account Eligibility

Account Eligibility

estimate, application, UW,  Set Line Live

Channel

Application Eligibility

Application Eligibility

estimate, application, UW, Set Line Live

LOC Product

Approvers

Approver(s)

Underwriting

Lender

Assignee

Assignee

Underwriting

Lender

Disclosures

Disclosures Provided

Application

Channel

Loan Amount

Loan Amount

Estimate, Application, UW

LOC Product

Loan Docs

Loan Documents Provided

Generate Docs App, Generate Docs UW

LOC Product

LOC Product

LOC Product

Estimate

Channel

Wire Fee

Wire Fee Applied

Set Line Live

LOC Product

Interest Capitalization (Cap and Roll)

Cap and Roll allowed

Set Line Live

LOC Product

Ceiling

Applied Value

Estimate, UW, Set Line Live

LOC Product

Floor

Applied Value

Estimate, UW, Set Line Live

LOC Product

Discount

Discount Applied

Estimate, UW, Set Line Live

LOC Product

Accrual Basis Calculation

Accrual Basis Calculation

Estimate,UW, Set Line Live

LOC Product

Supplemental Docs- Templates Provided/ Docs Collected

Supplemental Documents Requested

Application

LOC Product



This is how a rules engine is configured. 
I need to generate disclosure based rules templates. 
Here are the details, can you help me generate some templates for rules - 
Problem Statement:
The template will be used to determine if additional disclosures need to be provided to a client based on any specific input. These can be the disclosures show at login or Disclosures and Submit

Template Design

Requirements

Stages Available

First Log In/ Disclosure and Submit Tab

Outputs Available

List of Configured Disclosure Codes

Display Methods

Disclosure Pop Ups at Login

Disclosures in the Disclosures and Submit

Default Rules based on Configs:

Terms Configurations

Level

Channel

Application Eligibility Rule Set Page:
Rule Name (this will be client facing)

Up to 8 unique inputs allowed

Only conjunction available is “and”

Outputs available are Disclosure Codes

Application Eligibility Display Through Stages
First Login
If the rule is triggered and the disclosure code linked is a login type code, the disclosure should be one of the pop up disclosures requiring acceptance

Application- Disclosure and Submit Page:
If the rule is triggered and the disclosure linked is a disclosure type disclosure code, the disclosure should be one of the available hyperlinks

Sample Template