7 Business Rule Engine

This chapter describes the tasks that comprise the Business Rule Engine for IPOCS-Demand Forecasting, including:

Attributes Task

This section describes the Attributes task for IPOCS-Demand Forecasting.

Attributes Workspaces, Steps, and Views

The following table lists the workspaces, steps, and views for the Attributes task.

Table 7-1 Attributes Workspaces, Steps, and Views

Workspace Step Views

Attributes Workspace

Review Step

Location Attributes View

Product Attributes View

Product/Location Attributes View

Attributes Workspace

The Attributes workspace allows you access to all of the views listed in Attributes Workspaces, Steps, and Views.

The Attributes workspace allows you to review attributes that you can use in rules using the Business Rule engine. The attributes can be product specific, like brand or class. They can also be location specific, like store format, or number of stores an item is sold in. Finally, they can be product/location specific, like average sales, or the vendor from where the products were sourced for a specific store.

The attribute data types are:

  • String - examples are brand, region

  • Date - examples are store open date, forecast end date

  • Numeric - examples are historical average sales, coefficient of variance

The sources of the attribute information can come from various source. They can be loaded or calculated. IPOCS-Demand Forecasting GA has a set of calculated attributes that can be easily expanded to including any retailer-relevant attributes. For additional technical information on how the attributes are managed, refer to the Oracle Retail Inventory Planning Optimization Cloud Service-Demand Forecasting / Inventory Planning Optimization Cloud Service-Lifecycle Allocation and Replenishment Implementation Guide.

To build the Attributes workspace, perform these steps:

  1. From the left sidebar menu, click the Task Module to view the available tasks.

    Figure 7-1 Task Module

    Task Module
  2. Click the IPO Administration activity and then click Attributes Review to access the available workspaces.

  3. Click Weekly Forecast. The wizard opens.

    You can open an existing workspace, but to create a new workspace, click Create New Workspace.

    Figure 7-2 Weekly Forecast Wizard


    Weekly Forecast Wizard

  4. Enter a name for your new workspace in the label text box and click OK.

    Figure 7-3 Enter Workspace Label


    Enter Workspace Label

  5. The Workspace wizard opens. Select the locations you want to work with and click Next.

    Figure 7-4 Workspace Wizard: Select Locations


    Workspace Wizard: Select Items

  6. Select the products you want to work with and click Finish.

    Figure 7-5 Workspace Wizard: Select Products


    Workspace Wizard: Select Products

  7. The wizard notifies you that your workspace is being prepared. Successful workspaces are available from the Dashboard.

    Figure 7-6 Successful Workspace Build


    Successful Workspace Build

    The Attributes workspace is built. This workspace contains this step:

Review Step

The available views are:

Location Attributes View

The Location Attributes View view allows you to review attributes and their values that are location specific.

Figure 7-7 Location Attributes View


Location Attributes View

Measures: Location Attributes View

The Location Attributes View view contains the following measures.

Location Based Attribute String

This measure displays location based attributes that have a string value, such as region, or store format.

Location Based Attribute Number

This measure displays location based attributes that have a numeric value, such as number of products carried in a location, or average sales per store.

Location Based Attribute Date

This measure displays location based attributes that have a date value, such as a store open date.

Product Attributes View

The Product Attributes view allows you to review attributes and their values that are product specific.

Figure 7-8 Product Attributes View


Product Attributes View

Measures: Product Attributes View

The Product Attributes view contains the following measures.

Product Based Attribute String

This measure displays product based attributes that have a string value, such as brand, or class.

Product Based Attribute Number

This measure displays product based attributes that have a numeric value, such as number of locations carrying an item, or average sales per item.

Product Based Attribute Date

This measure displays product based attributes that have a date value, such as item start date.

Product/Location Attributes View

The Product/Location Attributes view allows you to review attributes and their values that are product/location specific.

Figure 7-9 Product/Location Attributes View


Product/Location Attributes View

Measures: Product/Location Attributes View

The Product/Location Attributes view contains the following measures.

Product/Location Based Attribute String

This measure displays product/location based attributes that have a string value, such as brand, or price tier.

Product/Location Based Attribute Number

This measure displays product/location based attributes that have a numeric value, such as average sales or error variance.

Product/Location Based Attribute Date

This measure displays product/location based attributes that have a date value, such as item start or end dates.

Business Rule Group Admin Task

This section describes the Business Rule Group Admin task for IPOCS-Demand Forecasting.

Business Rule Group Admin Workspaces, Steps, and Views

The following table lists the workspaces, steps, and views for the Business Rule Group Admin task.

Table 7-2 Business Rule Group Admin Workspaces, Steps, and Views

Workspace Step Views

Business Rule Group Admin Workspace

Setup Step

Rule Group Info View

Rule Group Active Attribute View

Rule Group Scope View

Business Rule Group Admin Workspace

The Business Rule Group Admin workspace allows you access to all of the views listed in Business Rule Group Admin Workspaces, Steps, and Views.

The Business Rule Group Admin sets up the framework to efficiently use the Business Rule Engine. Here you can enable or disable Rule Groups, or can assign attributes to certain rule groups. The workspace is not intended to be used by the forecast analyst on a regular basis. It is more for the Administrator of the solution.

The rule groups can have associated certain types of items to them. For instance, Spring fashion items. For these items, you may not want to enable rule groups.

To build the Business Rule Group Admin workspace, perform these steps:

  1. From the left sidebar menu, click the Task Module to view the available tasks.

    Figure 7-10 Task Module

    Task Module
  2. Click the IPO Administration activity and then click Demand Forecast to access the available workspace.

  3. Click Business Rule Group Admin.

  4. There is no wizard for this task. Successful workspaces are available from the Dashboard.

    Figure 7-11 Successful Workspace Build


    Successful Workspace Build

    The Business Rule Group Admin workspace is built. This workspace contains this step:

Setup Step

The available views are:

Rule Group Info View

The Rule Group Info View view allows you to review attributes and their values that are location specific.

Figure 7-12 Rule Group Info View


Rule Group Info View

Measures: Rule Group Info View

The Rule Group Info View view contains the following measures.

Rule Group Type

In this measure you can assign a type to your rule groups. Available options in GA are:

  • Approval— assigns business rules to the approval rule groups to decide what product/locations are approved and which need to be reviewed

  • Navigation — the product/locations that were not approved are assigned to Navigation rule groups and you decide on the priority that they need to be reviewed.

  • CustomApproval and Navigation are very useful in the approval workflow of the solution. However, the scope of the rule groups in the context of the Business Rule Engine can be expanded to many areas.

Rule Group Description

This measure allows you to type a meaningful description for each rule group, depending on its purpose.

Priority Lowerbound

The rules inside a rule group need to have a priority assigned to them in case of conflicts. This measure sets the lower bound for rule priorities.

Priority Upperbound

The rules inside a rule group need to have a priority assigned to them in case of conflicts. This measure sets the upper bound for rule priorities.

Enable Rule Group

This measure allows you to enable rule groups, or disable them if they became out of scope.

Rule Group Active Attribute View

The Rule Group Active Attribute view allows you to enable attributes for rule groups. The number of attributes can be very high and not all attributes are relevant for all types of merchandise. For instance, you have little use of the flavor attribute when it comes to fashion, or Neckline when it comes to hard-line merchandise.

Once you know what type of merchandise is associated with every rule group, you can decide what attributes is relevant to each rule group. This makes the workflow around the business rules more efficient and user friendlier.

Figure 7-13 Rule Group Active Attribute View


Rule Group Active Attribute View

Measures: Rule Group Active Attribute View

The Rule Group Active Attribute view contains the following measure.

Rule Group Active Attribute

This measure allows you to select the attributes relevant for every rule group.

Rule Group Scope (Weekly Forecast) View

The Rule Group Scope (Weekly Forecast) view allows you to define the scope of a rule group in terms of what product/locations may be associated with it.

Figure 7-14 Rule Group Scope (Weekly Forecast) View


Rule Group Scope View

Measures: Rule Group Scope View

The Rule Group Active Attribute view contains the following measure.

Rule Group Scope

In this measure you can assign products and locations to certain rule groups.

Business Rule Setup Task

This section describes the Business Rule Setup for IPOCS-Demand Forecasting.

Business Rule Setup Workspaces, Steps, and Views

The following table lists the workspaces, steps, and views for the Business Rule Setup task.

Business Rule Setup Weekly Forecast Workspace

The Business Rule Setup sets up the framework to efficiently use the Business Rule Engine. Here you can enable or disable Rule Groups, or can assign attributes to certain rule groups. The workspace is not intended to be used by the forecast analyst on a regular basis. It is intended for an Administrator for br-engine.fm.

To build the Business Rule Setup workspace, perform these steps:

  1. From the left sidebar menu, click the Task Module to view the available tasks.

    Figure 7-15 Task Module

    Task Module
  2. Click the Business Rule Setup activity to access the available workspaces.

  3. Click Rule Setup. The wizard opens.

    You can open an existing workspace, but to create a new workspace, click Create New Workspace.

    Figure 7-16 Wizard


    Wizard

  4. Enter a name for your new workspace in the label text box and click OK.

    Figure 7-17 Enter Workspace Label


    Enter Workspace Label

  5. The Workspace wizard opens. Select the Business Rule Group type you want to work with. It is important to click only one of the available options, otherwise you will get a warning and cannot proceed to the next step. Click Next.

    Figure 7-18 Workspace Wizard: Select Business Rule Group Type


    Workspace Wizard: Select Business Rule Group Type

  6. Select the Business Rule Groups you want to work with and click Next.

    Figure 7-19 Workspace Wizard: Select Business Rule Groups


    Workspace Wizard: Select Business Rule Groups

  7. Select the products you want to work with and click Next.

    Figure 7-20 Workspace Wizard: Select Products


    Workspace Wizard: Select Products

  8. Select the locations you want to work with and click Finish.

    Figure 7-21 Workspace Wizard: Select Locations


    Workspace Wizard: Select Locations

  9. The wizard notifies you that your workspace is being prepared. Successful workspaces are available from the Dashboard.

    Figure 7-22 Successful Workspace Build


    Successful Workspace Build

The Business Rule Group Admin workspace is built. This workspace contains this step:

Setup Step

The available views are:

Rule Enable View

The Rule Enable view allows you to review attributes and their values that are location specific.

Figure 7-23 Rule Enable View


Rule Enable View

Measures: Rule Enable View

The Rule Enable view contains the following measures.

Enable

In this measure you can enable or disable the rule. Note that although you decide to enable the rule, other factors also need to hold true. For instance the time you want to enable the rule needs to be within the start and end dates.

Priority

The rule conditions used to assign product/locations may result in product/locations been assigned to more than one rule. The rule priority decides which rule takes precedence. A lower number denotes a higher priority.

Start Date

The date when the rule becomes active. Rarely used in IPOCS-Demand Forecasting, but may be very helpful for planning or replenishment solutions.

End Date

The date when the rule stops being active. Rarely used in IPOCS-Demand Forecasting, but may be very helpful for planning or replenishment solutions.

Rule Description

Here you can enter a description for a rule. For instance if a rule condition is to check for high sellers with stable demand, the rule description could be: High demand / low variability.

Rule On/Off

This measure displays the status of a rule.

Rule Condition Setup View

The Rule Condition Setup view allows you to assign items to business based on the conditions you specify.

For the purpose of reviewing the forecast, you may want to group together key items as well as high sellers.

Examples of rule conditions can include:

  • If an item is a key item and recent sales are larger than 50 items per week, then group together

  • Group all coffee items together, except for private label.

  • If class is Coffee and brand is not Private Label, then group together.

IPOCS-Demand Forecasting GA has up to four conditions per rule. How to change this, and for more examples and technical details, refer to the Oracle Retail Inventory Planning Optimization Cloud Service-Demand Forecasting / Inventory Planning Optimization Cloud Service-Lifecycle Allocation and Replenishment Implementation Guide, as well as the Appendix: Business Rule Engine.

Figure 7-24 Rule Condition Setup View


Rule Condition Setup View

Measures: Rule Condition Setup View

The Rule Condition Setup view contains the following measures.

Attribute Selected

This measure allows you to select the attribute for the condition. The attributes for the rule are assigned in the Attributes workspace.

Between Condition AND/OR

If multiple conditions are set up for a rule, this measure allows you to specify if the operator is AND, or OR.

Condition Operator

This measure compares the attribute value with a condition value.

Table 7-4 Condition Operators

Possible Operators Descriptions Example

==

Checks if the attribute value is equal with the Condition Value

brand == Private Label

!=

Checks if the attribute value is different from the Condition Value

average sales != 0

>

Checks if the attribute value is larger than the Condition Value

>=

Checks if the attribute value is larger or equal to the Condition Value

<

Checks if the attribute value is less than the Condition Value

<=

Checks if the attribute value is less or equal to the Condition Value

contain

not contain

match

not match

Condition Value (string)

This measure is used when the type of the attribute is a string. Example: brand == Private Label

Condition Value (numeric)

This measure is used when the type of the attribute is numeric. Example: average sales > 10

Condition Value (date)

This measure is used when the type of the attribute is a date. Example: today >= 02/30/2024"

Condition Value (measure)

This measure is used when you want to refine the condition value. For instance, for coffee items, except Private Label, you want to assign items to the rule that sell more than 50 per week. For Private Label items you may want the value to be 100.

You need to populate your Condition measure with a value of 100 for all Private Label items, and the rest of the coffee items with 100.

Total Eligible Items

Total number of items that are brought in the workspace and are eligible to be managed using business rules.

Condition Count

Number of items that are attached to each condition.

Rule Count

Number of items that are filtered to each rule.

Condition Error

In case an error occurs, this measure displays the reason. For instance, an attribute was of type string, and was compared to a Condition Value of type date.

Business Rule Process

Perform the following steps to run the business rules.

  1. Once the conditions are setup, click Calculate. Then run the custom menu Validate Rule Setup. If any rules were set up incorrectly, a message appears in the Condition Error measure.

  2. Correct the conditions until the error message no longer appears.

  3. Run the Assign Membership custom menu. This runs the conditions in the rules, and assigns product/locations to the designated rules.

  4. To make sure that conditions and assignments are successful, check the Condition Count and Rule Count measures. They show you how many product/locations are assigned to each rule. Once you see the count and membership you can commit and after running the batch the business rules will take effect.

Rule Membership View

The Rule Membership view displays the condition and rule a product/location is assigned to.

Figure 7-25 Rule Membership View


Rule Membership View

Measures: Rule Membership View

The Rule Membership view contains the following measures.

Rule Membership

This measure displays what rule a certain product/location is assigned to.

Condition Membership

This measure displays what condition a certain product/location is assigned to.

Parameters for Approval View

The Parameters for Approval view allows you to manage the approval exception setting based on the business rules you set up. For instance, if a rule has assigned high margin items, you may want to tighten the Error threshold, to make sure the forecast is in line with your expectations.

Figure 7-26 Parameters for Approval View


Parameters for Approval View

Measures: Parameters for Approval View

The Parameters for Approval view contains the following measures.

Approval Method at Rule

This field is a list from which you select the default automatic approval policy for forecast items. Valid values are:

  • Manual

    The system-generated forecast is not automatically approved. Forecast values must be manually approved by accessing and amending the Forecast Review view

  • Automatic

    The system-generated quantity is automatically approved as is.

  • By Alert

    This list of values may also include any Forecast Approval alerts that have been configured for use in the forecast approval process. Alerts are configured during the implementation and can be enabled to be used for Forecast Approval in the Enable Alert for Forecast Approval view. Refer to the Oracle Retail Predictive Application Server Configuration Tools User Guide for more information on alerts. The Alert Parameters view contains a list and descriptions of available alerts, and for which level (causal/baseline) that they are designed for.

Alert - Average Sales Threshold at Rule

Threshold used in deciding if average sales are high or low, depending on how they compare against the value. It overrides the values set up in the Forecast Setup workspace.

Alert - Calculation Periods at Rule

The number stored in this field defines the number of calculations periods used in generating exceptions. It overrides the values set up in the Forecast Setup workspace.

Alert - Error Threshold at Rule

This field stores the value that determines if a forecast error is acceptable, or if it needs to be flagged as exception. It overrides the values set up in the Forecast Setup workspace.

Alert - Causal Peak Factor at Rule

This measure is relevant for promotional forecasting. The current forecast values are divided by the maximum historical demand. If the result is larger than the value of this measure, the forecast may be too large and an exception is triggered. It overrides the values set up in the Forecast Setup workspace.

Parameters for Navigation View

The Parameters for Navigation view allows setup for what forecasts are approved and which ones need review

The forecast approval process is two prong.

  • First, you set up business to decide what forecasts are approved and which ones need review.

    The setup occurs in the Rule Condition Setup View and the Parameters for Navigation View. After the batch is run, there will be a pool of approved product/locations, and a pool of product/locations that need review. However, not all product/locations in this pool have the same criticality.

  • Secondly, navigation exceptions come in the picture.

    The unapproved product/locations are run thru the business rules for navigations and assigned to different navigation buckets.

    For instance, key items and high margin items will always be Urgent. High sellers, but lower value can be Required. The next tier can be Optional.

    Finally, unapproved product/locations that are not as important for the business as the ones already assigned to the top tiers can be assigned to Informational.

Figure 7-27 Parameters for Navigation View


Parameters for Navigation View

Measures: Parameters for Navigation View

The Parameters for Navigation view contains the following measure.

Navigation Buckets at Rule

In this measure you assign the product/locations assigned to the navigation business rules to the Navigation Buckets, which represent the urgency they need review.