The scoring component in a scoring engine uses a select statement or a function to return a score value. For example, a scoring component can determine the total number of delinquencies for a customer or how long a customer has been doing business with your company. Every scoring engine must have at least one scoring component.
The values calculated by a scoring component are then assigned scores based on the ranges of values defined for each scoring component in the scoring engine (defined in Step 2 of Create Scoring Engine). Score range numbers can be positive or negative numbers to two decimal places, and must account for scores from -999,999,999 to 999,999,999. In Oracle Advanced Collections a higher score is generally considered good and a lower score is considered bad.
When creating scoring components, you must specify whether to use a select statement or a function to retrieve data. You will need to have your DBA or other technical staff create the value or code to enter when creating a scoring component.
Select Statement: A SQL select statement.
Function: A function must have a minimum of two input variables (object ID and score component ID). The object ID represents the data level scored and can be party_id, cust_account_id, billtositeuse_id, payment_schedule_id, or other database object. The score component ID is the scoring component the function is associated with. Include a result ID in a function if the return value from the function is to be used in the scoring engine.
Here is an example of a function. In this example, the object ID is p_party_id and score component ID is p_score_component_id.
FUNCTION simple_score_component(p_party_id IN NUMBER, p_score_component_id IN NUMBER) returns number is l_param_value; l_return_value; begin select value into l_param_value from IEX_SCORE_COMP_PARAMS where score_component_id = p_score_component_id and code = amt_delinquency return l_return_value; end
When you create the scoring component, add a call statement for the function. Here is an example of a call statement:
Call simple_score_component(party_id, :score_component_id) into :raw_score
You can define parameters for a function to extend its ability to capture data. Parameters are name:value pairs, such as amt_delinquency, 10 or days_past_due, 14. Parameters are stored in the IEX_SCORE_COMP_PARAMS table. You can identify parameters for any or all of the function scoring components you add to a scoring engine. On the Parameter tab in Step 2 of Create Scoring Engine, enter the name of the parameter in the Code field and the value for the parameter. Once you define function parameters, you can easily update a scoring engine by changing the parameter values.
In the function example above, amt_delinquency is the function parameter.
Note: To successfully use a function scoring component in a scoring engine, be sure to:
Create the function in the database
Create a scoring component and add the Call statement.
Create a scoring engine and add the component to the engine.
On the Parameters tab, define the parameters for the function.