[New Feature] Supplier Scorecard

Hi everyone,

I’ve developed a new feature and I want to discuss some of the functionality before creating a pull request on GitHub.

The feature is a Supplier Scorecard, which is used to evaluate the performance of all your suppliers, and potentially to warn suppliers when they are not meeting their obligations or prevent them from quoting or being issued new Purchase Orders.

Here’s a breakdown of the documents:

  • Supplier Scorecard
  • This is the main point of reference when reviewing suppliers. This is where you establish the scoring criteria and standings, as well as can see what actions have been imposed on the supplier.
  • Supplier Scorecard Period
  • This is a scorecard calculation for a given supplier and scoring period. It provides more details into how the supplier performed in the given period.
  • Supplier Scorecard Standing
  • A template document for supplier standings (e.g. poor, average, excellent)
  • Supplier Scorecard Criteria
  • A template document for supplier evaluation criteria (e.g. Delivery, RFQ, Quality)
  • Supplier Scorecard Variable
  • A template document for supplier performance variables (e.g. how many items have been delivered late in the period, how many days it takes to respond to an RFQ)

Supplier Scorecard
Here’s a screenshot of the Supplier Scorecard document:

In this main view, you can see how your supplier is doing on a daily basis in the heat map. You can also see their score, and you have a link to the Supplier Scorecard Period. You also have the ability to set the evaluation period for the supplier (‘Per Day’, ‘Per Week’, ‘Per Month’, ‘Per Year’), which determines how often a supplier is evaluated. Clicking the Generate Missing Scorecard Periods will create Supplier Scorecard Period documents from when the supplier was first entered into the system until today.

If you expand the Criteria Setup, you’ll see this:

What you can see here are the criteria that the supplier is evaluated based on, and the variables that are used to calculate the score on each criteria. These are all able to be defined by the user, but will probably have some baseline ones so that there is a starting point to work from. The idea is that there will be a large number of variables (which probably aren’t all needed for everyone). You can just use the default ones, but if you have special ones, you can code the calculation in python and provide a link to it in the variable (more on this later).

Criteria

Each criteria is evaluated based on a formula which you can define yourself, and each criteria has a weight which decides how important it is to the final score.

Variables

Each variable is defined like this. The parameter name is what’s used to refer to it in the criteria formula. The path is the python path to get to the function that calculates this value. This can be a function name if the function is in the supplier_scorecard_variable.py file, or a dotted path to whatever function you want. This allows for companies to come up with their own variables and map them to their own app python files.

Actions
The scorecard actions currently are:

  • Prevent RFQs
  • Prevent POs
  • Notify Supplier (through email)
  • Notify other Employee (through email)

The idea with this is that if a supplier gets a really bad score (or a really good one), they can be penalized or praised.

Supplier Scorecard Period

Here’s the supplier scorecard period document, which gives all the calculations the explain the suppliers score in a period. There’s the period score, the bounding dates of the period. The score on each criteria, and the value of each of the variables used. This is really useful for tuning the evaluation criteria, and also for explaining to suppliers why their score is the way that it is. It can also help clear up user input issues (if you enter a supplier quotation very late and all of a sudden they have a really bad Quotation Response score).

Discussion
So I’m uncertain about a number of things, so I want to get some input from the community and people that will be using this:

  1. Does having actions that affect suppliers make sense? If we have buttons like Prevent RFQs or Prevent POs, will they ever get used? Do you want this to be a warning that comes up when trying to submit one of these documents, or a hard prevent these documents from being submitted?
  2. Are the criteria formula (using frappe.safe_eval) too complicated for the average user to use? I’m envisioning that there will be templates provided so that there is a starting point to work from, but I want to avoid making things overly complicated.
  3. Should the creation of new supplier scorecards be automated to happen at every period, or is it something that should be manually triggered by the user?
  4. Are there any other features that need to be considered?

Thanks for any feedback you can provide!

29 Likes

First off, this is fantastic work. Have you run this feature by someone who is versed in procurement processes and supply chain management? I have a procurement guy I’ll run this across and provide feed back here.

2 Likes

I haven’t - mostly because we haven’t really got someone like that with any experience in our organization. I’d be really happy to get any feedback though.

1 Like

Great work! I’ll respond as per your points -

  1. Warnings should be good. Prevent RFQ’s/PO’s will be useful for management level, but that could be done outside this module also.

  2. Criteria formula looks do-able, with documentation/ tutorials. However, if we are able to make a library/database of functions like in excel, this could be used in multiple. I am thinking of defining functions in a file like a header file in C programs and then using those universally around ERPNext.

  3. Automated! with optional trigger for whenever required? We would like to share feedback with vendors automatically end of every month for quality system (ISO9001) requirements. However I could think of scenarios to see updated quality/supplier score trend before placing orders, but this is not something I would use regularly.

  4. I discussed this with a friend who works for an electronics multinational. Here are few things that he suggested as per what they do -
    A) Target vs achieved quality rating per period.
    B) Cost increase and decrease over time. Comparing costs over multiple periods & other suppliers. They give business on basis of costs saved, etc.
    C) Audits - They have audit plan for new supplier approval and then quarterly/annual audits which also come into the annual score for vendors. For this we will have to create an “audit scorecard” and then use the score in the “supplier scorecard”.

2 Likes

I had my procurement expert look this over. All seemed good from his perspective. I also agree with @LifeP comments. Will need some good reporting to go along with this. Not sure if you captured that in your requirements. Definitely warning and not prevent. Would be good to see the warning in the buying (e.g. po or pinv) area when said supplier is selected.

Thanks for contributing this.

1 Like

+1

even on “request for quotation” would be useful

@Ben_Cornwell_Mott When would you be able to share the code for this?
I think this would be such a neat template for employee scorecard (useful for appraisals) or even customer scorecards(useful to determine order priority)! excited :grinning:!

1 Like

I can PR it to ERP today, but there are still features to be worked out

I was wondering if there is a way to add cost to criteria.

Would like to compare if the cost provided is competitive for products with multiple suppliers
or if the supplier has done some cost reductions compared to previous average.

So you could add whatever criteria you wanted to by doing a custom app, writing the python code to calculate the value, and creating new Supplier Scorecard Variables that link to these python functions. You can add as many criteria as you’d like, and the formula for each criteria is adjustable.

I envision other users adding their own variable functions to the core code so that everyone can use it going forwards.

With respect to cost, I’m not exactly sure how you’d do that. Maybe looking at all the items purchased during the period, then looking back a given time (1 year for example) and and seeing what those same items would have costs, then doing a score based on the current period costs vs effective period costs using pricing from 1 year ago. Is that what you’ve getting at?

Yes exactly! This has great potential. I think the above would be possible with Goals quite easily.
(Manage Goals in ERPNext · Issue #8777 · frappe/erpnext · GitHub)

Also, if we are able to generalize this, it could be used to create leaderboards (Dashboards · Issue #5204 · frappe/erpnext · GitHub) for any doctype as per requirements - items, suppliers, customers, employees, etc.

Hi @Ben_Cornwell_Mott , first of all incredible contribution.

We wanted to try it out and there are mandatory fields hidden inside quick entries that we can’t modify.

Are we forgetting something?

Thanks

hello everybody, I wanted to ask you if any of you managed to make this new functionality work?

Thanks

It needs more testing.

On Criteria Formula, error while creating one.
When creating Supplier Scorecard, criteria and standings do not pick default values setup earlier.
Variables are mandatory, but do not pre-populate with default values too.

Couldn’t progress on it

I did a pull request to fix those errors (even though i don’t remember the one in Criteria Formula, if you can explain it, maybe i can fix it or see if it’s already fixed), but it’s delayed because of some errors in the tests of the ERPNext code. Maybe they merge it when they fix the errors.

This is when creating a criteria formula, even when one copies the examples on the manual.

That’s because the one in the manual does not work, he seems to forget to put the variable names between curly brackets { }. Try it and it will work.

Ok. Thank you. Will do so.

1 Like