Skip to content

Supplier Performance Evaluation KPIs (SRM)

The purpose of this page is to provide product specific tailoring guides for workflows related to Supplier Performance Evaluation KPIs (SRM component).

Prior to editing the Workflow, you should fully avail yourself of the capabilities described under:

You should also understand how to set parameters and filters as per standard SQL functions.

This Workflow can be used to automatically calculate the KPI value per supplier in a Supplier Performance and Evaluation Rating. By modifying the existing workflow, you can introduce new KPI's or modify the calculation/definition of existing KPI's.

In this page following topics will be covered:

Getting Started

We have provided the workflow template for the following KPIs.

The above mentioned KPIs have been created in the page KPIs. Therefore, you can include these in the relevant KPI groups and setups for Supplier Performance Evaluation. If new KPIs are to be added, follow Modifying the Workflow Template.

To get the workflow up and running, you should enable the projections actions and the event action. For this workflow, two projection actions and one event action was used.

Follow the below steps,

To enable the projection actions:
  1. Go to page Workflows.
  2. Search for srmGetAutomatedKpiValues.
  3. In the Projection Action Information click on the edit icon.
  4. Change the Action Enabled field to true for both projection actions.
  5. In your Supplier Performance Evaluation page, two commands will be visible if the projection actions are enabled.

The below shown projection action was defined to run the flow for a selected KPI, when the Get Automated KPI Value command in Supplier Performance Evaluation page is clicked.

This below shown projection action was defined to run the flow for all the automated KPIs available in the supplier performance evaluation, when the Get All Automated KPI Value command in Supplier Performance Evaluation page is clicked.

To enable event action:
  1. Go to page Event Action.
  2. In the Perform upon Event filter, search for SUPP_EVAL_SETUP_APPROVAL.
  3. Change the Enable Event Action toggle to true.

The event action shown below was defined to trigger the workflow when a Supplier Evaluation Setup is approved with the Generate Automated KPIs set to true.

**NOTE: **

Access control of the user who triggers the workflow will be applied, therefore only the data that the executing user have access to will be considered. For instance data from the sites that the user have access to.

Modifying the Workflow Template

To add or modify existing automated KPIs, follow the below steps:

  • To clone the workflow, click on the version which will show you a clone icon at the top.

  • After cloning, you will see a new version of the workflow diagram which is editable.

  • Click on the Design icon at the top, which will navigate to the workflow diagram as shown below.

  • Inside the box(which is a loop), add new tasks after the Divider and make sure to connect the end of the line to the EndEvent. You can also copy the flow for a existing KPI and edit the information of the boxes, according to the new scenario.

  • Click on the first arrow after the Divider and provide the expression to identify the KPI ID as shown below.

    Here in this example, WF-DEFECT-RATE is the KPI ID.

  • Keep adding task according to your KPI Value calculation scenario. (Please refer the Example KPIs section in this document to get a better understanding on the available workflow tasks).

  • The last task Update KPI Value would be the same except for the variable that is to be updated as the KPI value.

  • Deploy the new version of the workflow ( The deployment name should be the Process ID ).

  • Make sure the projection actions are enabled.

Trigger Workflow as a Background job (For Projection Actions)

User has the possibility to run the workflow as a background job if the process is too bulky. In order to do this, follow the below steps:

  • In the Projection Action Information list, click on Edit Action.

  • The execution type should be Process Enrichment (Make sure there are no user interaction tasks present in the workflow diagram).

  • Set the timing to Asynchronous.

Note: User is capable of editing projection actions to change the execution type to User Interaction or Process Enrichment according to their preference.

  • Only for process enrichment, you can set the timing to asynchronous to execute the flow as a background job for a bulky process.

  • For User interaction, you can get an input from the User at the point of triggering the workflow to add more customizations to the flow. But this might have a certain impact on the performance of the flow.

Example KPI Workflows

1. Defect Rate

A detailed explanation on the diagram below will be provided in this section :

The above diagram (starting from No. 1) is the dedicated flow defined for Defect Rate.

Note: All these steps are done within the loop which is represented as a box in the workflow diagram.

Step 1: Arrow is added after the Divider in the existing diagram, which is used to identify the correct KPI. An expression is added to this arrow as mentioned above in step 5.

Step 2: This is a Projection READ task that is used to fetch records from QualityStatistics entity set in PurchaseQualityStatisticsAnalysis projection subjected to below filters.

(vendor_no = '${VendorNo}'    
 AND real_arrival_date >= TO_DATE('${SuppPerformEvalSetupSet_Set[0].FromDate}', 'DD/MM/YYYY')   
 AND real_arrival_date <= TO_DATE('${SuppPerformEvalSetupSet_Set[0].ToDate}', 'DD/MM/YYYY')  
 AND (('${DomainType}' = 'Global')  OR  ('${DomainType}' = 'Company'  AND company = '${DomainCompany}')   OR  ('${DomainType}' = 'Site' AND  contract = '${DomainContract}')))

Above code snippet is added in the Define a filter box which you can find in the properties of Step 2 task.

The provided example, filters out the records according to the below conditions:

  1. For the specific supplier in the Supplier Performance Evaluation. (Mandatory)

  2. The real arrival date being in between the Evaluation Period mentioned in the Supplier Performance Evaluation.

  3. Domain Type can be Global, Company or Site based on the Supplier Performance Evaluation. If Domain Type is Company or Site the data retrieved from this task is filtered to that specific site or company respectively.

(Please note that the last two conditions were only added as an example and if you want to add other conditions, those can be added here as well)

Step 3: This is a script task. Here the overall sums of quantity arrived, quantity returned and scrapped quantity is calculated and function is applied as shown below. The code for the calculation is done in JavaScript.

​ *DefectRate = ((ReturnedQuantitySum + ScrappedQuantitySum)/QuantityArrivedSum)100; **

var i;
var QuantityArrivedSum=0;
var ReturnedQuantitySum=0;
var ScrappedQuantitySum=0;
// If Supplier Quality table has no value this will be updated as the KPI Value.
var DefectRate='No Result';

// A loop to get the total of all the sums needed for equation.
// SupplierQualitySet_Set is the collection variable returned from Step 2.
if (SupplierQualitySet_Set.length) { 

    for (i=0; i < SupplierQualitySet_Set.length; i++){
        QuantityArrivedSum = QuantityArrivedSum + SupplierQualitySet_Set[i].QtyArrived;

        ReturnedQuantitySum= ReturnedQuantitySum+ SupplierQualitySet_Set[i].QtyReturnCredit +         
        SupplierQualitySet_Set[i].QtyReturnRework;

        ScrappedQuantitySum= ScrappedQuantitySum+ SupplierQualitySet_Set[i].QtyScrappedCredit +             
        SupplierQualitySet_Set[i].QtyScrappedNoCredit;
    }

    // Calculating Defect Rate
    DefectRate = 100*((ReturnedQuantitySum + ScrappedQuantitySum)/QuantityArrivedSum); 
}

// Setting up an execution variable to save the Defect Rate value.
execution.setVariable("DefectRate", DefectRate);

Step 5: This is a projection UPDATE task, which will update the calculated Defect Rate value into the KPI Value. The parameter configuration is shown below.

KpiList is used as a prefix, as the entire KPI flow is inside a loop, where the loop variable is KpiList. Therefore make sure the prefix is there as shown below, to insert the correct values to fetch the record.

2. On-Time Delivery

The below figure illustrates the dedicated flow for Delivery Perfection

Step 1: Similar to the first example this arrow contains the expression to identify the record with the correct KPI ID.

Step 2: Projection read tasks is added to fetch all the records from DeliveryStatistics entity set in PurchaseDeliveryStatisticsAnalysis projection subjected to the below filters.

(vendor_no = '${VendorNo}'   
 AND promised_delivery_date >= TO_DATE('${SuppPerformEvalSetupSet_Set[0].FromDate}', 'DD/MM/YYYY')  
 AND promised_delivery_date <= TO_DATE('${SuppPerformEvalSetupSet_Set[0].ToDate}', 'DD/MM/YYYY') 
 AND (('${DomainType}' = 'Global') OR  ('${DomainType}' = 'Company'  AND company = '${DomainCompany}')  OR  ('${DomainType}' = 'Site' AND  contract = '${DomainContract}')))

Above code snippet is added in the Define a filter box which you can find in the properties of Step 2 task.

The provided example, filters out the records according to the below conditions:

  1. For the specific supplier in the Supplier Performance Evaluation. (Mandatory)

  2. The promised delivery date being in between the Evaluation Period mentioned in the Supplier Performance Evaluation.

  3. Domain Type can be Global, Company or Site based on the Supplier Performance Evaluation. If Domain Type is Company or Site the data retrieved from this task is filtered to that specific site or company respectively.

(Please note that the last condition was only added as an example and if you want to add other conditions, those can be added here as well)

Step 3: This is the script task that consists of the below code to perform the Delivery Perfection calculation.

var i;
var OntimeQty=0;
var TotalQty=0;
var gracePeriod=0; // tolerance period for late or early deliveries (days).
var millisecToDay = 1000 * 3600 * 24; //covert milliseconds to days
var OntimeDelivery='No Result'; //Add any string to show as the KPI Value when there are no records fetched from step 2. 

if (DeliveryStatistics_Set.length) {
    for (i=0; i < DeliveryStatistics_Set.length; i++){   
        TotalQty= TotalQty + 1; 

        // fetched date is in the format of dd/mm/yyyy but javascript considers date in mm/dd/yyyy format
        // below code switched mm with dd
        var RealDeliveryDateTemp= DeliveryStatistics_Set[i].RealDeliveryDate.replace(/(\d+[/])(\d+[/])/, '$2$1');
        var PromisedDeliveryDateTemp = DeliveryStatistics_Set[i].PromisedDeliveryDate.replace(/(\d+[/])(\d+[/])/, '$2$1');

        // saving the date string as a date object
        var RealDeliveryDate = new Date(RealDeliveryDateTemp);
        var PromisedDeliveryDate = new Date(PromisedDeliveryDateTemp);

        // condition to check ontime deliveries
        if ((Math.abs(RealDeliveryDate - PromisedDeliveryDate)/millisecToDay) <= gracePeriod) {
            OntimeQty= OntimeQty+ 1;
        } 
   }
   // Calculation for Delivery Perfection
   OntimeDelivery= 100*(OntimeQty/TotalQty); 
}
execution.setVariable("OntimeDelivery", OntimeDelivery);

Step 4: It is same as the last step in the Defect-Rate example. Only the parameter that is updated as the KPI Value has changed to OntimeDelivery.