Try ERPNext Buy Support Partners Foundation

[New Feature] Config to order: ERPNext version of SAP's variant configuration -- APP published, testing needed

Config to order: ERPNext version of SAP’s variant configuration

Background

For product with lot of configuration options(item with variants) such as computer, the current system does not support creating master/super BOM with all possible components,instead variant item with assigned attribute values and corresponding BOM to be created, then it can be selected/used in sales and production process, creating a large number of item variants for each combination of attribute values in advance is inherently not efficient and practical, because on one hand it will generate a lot of redundant items and BOM master data which is difficult to manage when relevant changes happened, on the other hand, without knowing the real customer’s requirement (configuration) on the configurable product, most of the item variants and BOM created in advance will never be used in the end.

Proposed solution: order based variant configuration

  1. Define configuration template(like menu in restaurant): adding needed attributes/fields, and define rules( mandatory, conditional mandatory, dynamic dropdown list base on other field value
    (Hint: used the custom doctype feature, which can be easily linked to sales order item as dynamic link field, support out of box mandatory, depends on, mandatory depends on feature, and form layout, most importantly support complex logic by custom script)

  1. create configurable item: in item master mark it as is configurable and assign the configuration template

  2. Create configurable item’s super BOM with all possible components(options), assign selection condition(either by link field(item as option) or python expression), quantity field to configurable components, leave selection condition empty to denote a default component.

  1. Make configurable item as valid/sellable item in relevant transactions(quotation,sales order,work order),force user to complete the configuration by filling the configuration template.
    Generate order BOM based on the configuration details and super BOM(selection condition), calculate the configurable item’s sales price based on order BOM component

  1. Auto assign a serial number to the configurable sales order item, thus enable it to be booked and tracked by various stock movements.

Benefits

  1. No redundant item and BOM data
  2. R&D can focus on production definition: item, super BOM and configuration template, while business users focus on choose the options per customer requirement, system will enforce configuration rule (mandatory, dynamic dropdown list etc) and auto generate order BOM accordingly, also calculate the price.

Design Highlight
Meta (data structure)

  1. Item doctype
    New fields: is configurable(check),configuration doctype(depends on and mandatory depends on eval: doc.is_configurable)
    Script Validation: if is_configurable, auto activate has_serial_no

  2. BOM doctype
    New Fields: configuration doctype(readonly,fetch from item.configuration_doctype)

  3. BOM Item/Explosion Item Doctype
    New fields:select condition(code field), item from configuration, qty from configuration(Data field with options: custom query)
    *enhance the base control.js needed
    depends on parent item is configurable
    show only the valid configuration doctype’s fields for item from configuration, qty from configuration

  4. quotation item, sales order item, purchase order item, work order,
    purchase receipt item, delivery note item, stock entry item doctypes:
    New fields: configuration doctype(fetch from item, readonly/hidden), configuration docname(dynamic link, mandatory depends on configuration doctype),
    *fix the mandatory depends on child table bug
    config(button field, to directly invoke the config detail screen), configuration print template
    after create/select configuration, return back to the orginal form after save and auto fill the docname field

    • fix the create new doc from link field dropdown menu return back to original form, only return to main form
  5. serial number doctype
    New fields: add sales order item field

  6. new doctypes
    dynamic selection dropdown list per selected value on other attribute
    conditional mandatory
    conditional default value
    conditional display/hide

    configuration rules: name, rule type(
    configuration rule details

Business logic

  1. Item
    script set configuration doctype filter by custom
    frappe.ui.form.on(‘Item’, {
    onload(frm) {
    frm.set_query(‘configuration_doctype’, function(){
    return{
    filters:{‘custom’: 1}
    }
    })
    }
    })
    configuration doctype change auto set has serial

  2. sales order
    ensure quantity is 1.
    ensure only based on produced serial number.
    generate configurable item’s description based on configuration doc’s print layout
    calculate configurable item’s price based on configuration detail.
    price logic: get item variant price, if not get template item price

  3. work order
    modify make bom , only copy bom item when config.item_field=current item or selection condition is true
    (frappe.safe_eval(“doc.name==‘nongye’ and doc.idx”, None,{“doc”:doc} ) )
    overwrite quantity by config.qty_field
    ensure qty is 1

  4. BOM
    ensure quantity is 1
    custom script to set query based on configuration doctype for item from configuration, qty from configuration

  5. when goods receipt against work order and create delivery note for sales order, auto create and assign serial number
    when submit, auto create serial number=so-item(or wo)+configuration doctype+configuration docname

APP is now available for testing and feedback

GitHub

szfisher/config_to_order

Config To Order, ERPNext’s SAP variant configuration - szufisher/config_to_order

any comments, ideas are welcomed, if enough interest and positive feedback

16 Likes

Anyone interested in this topic or would like to contribute are welcomed

2 Likes

@szufisher I have did various discussions with @adityaduggal, about that subject, him works with drills manufacturing.

@adityaduggal, I bilieve the proposition of @szufisher can be an gamer changer for companies like you

@szufisher I do have one behavior much more simpler in mind, that was associate the inner configuration table into the Batch of ERPNext, because it will allow us to segment the Stock by Batch.

For example one laptop production scenario.

An manufacturer produces 3 laptop models:

Model X, Model Y and Model Z

The difference between Model X, Y and Z is under the chassis, but they can have internally all the configurations.

So when Maxwell decide to buy an computer from this seller, him pick

  • Model Y
  • Memory - 16Gb
  • 1 Ssd
  • 1 Graphic Nvidia Cuda
  • 1 HDD 1Tb
  • 1 Keyboard with Backlight
  • 1 Screen with 15’’
  • 1 Power Adaptor in Brazil Standard (110v, 220v 3 pins)
  • Wireless Network Card

All that configuration is identified with the Batch No MDL-Y-120384

So these are the configuration of the computer that will be produced to Max.

In therms of BOM, we do have an Major bom for the Model Y with Screen of 15’’, where the chassi size is define.

In the operations table we do have one operation called assembly boards, where the Inner BOM basedly on the configuration Max pick will be placed, and this will split one sub Work Order, for this operation, basedly on that Sub-BOM.

When the manufacturing is finished, and it enter on stock, it enters associated with the Batch No MDL-Y-120384.

So, when the producer looks the stock of Model Y him identify that, him have in hands 30 units.

But, him find in these 30 units how many units matchs one specific configuration, using one auxiliar report.

But also, him is able to determine how much is the cost of the general production of the Model Y, and how much is costing the Model Y with one specific configuration.

I believe that to solve that problem, we will need some kind of BOM Variant Generator, where we can associate the possible variations with one Master BOM and the Inner BOM’s where each inner BOM is directly linked with the Batch No.

1 Like

CPQ : Configure Price Quote could be a huge value addition for sellers of custom furnitures, kitchen assembly companies or other companies.

1 Like

Well as @max_morais_dmm has rightly pointed out that we are looking for a way to manage alot of different variants but can’t seem to find a perfect solution. But going by the text I was not fully able to understand that how could it be beneficial at our end.

I have no issues in getting into a new line for item naming as long as it makes life easier for us to manage the items and especially the BOM since due to the complexity of the BOM at our end mainly due to the options available the BOM is never defined at our ERPNext instance for our usage.

I would love to use BOM but not in its current avataar and if this update does improve the BOM definition process them I am all for it and would be happy to contribute to the same.

well, my draft solution description is not clear enough to you?
what do you mean contribute? invest money? as trial run user to test? hire developer to coding?

Initial version of the solution development has been done, updated with screen shot and design highlight, any comments?

1 Like

I think it is a very good idea. We manufacture welding rods and will manufacture corrugated plastic pipes. Variants do no work for us because that would create a lot of never used (redundant) items. However, the approach is the same, we just need to be able to set the configuration based on customer’s specification.

I went through the design specs, looks solid. If you need testing, I am ready.

1 Like

Is this an APP or this is going in a as a pull request? Thanks

I am considering to make a new app,but need some small bug fix to the core. if core team accept this design I can submit PR also,but per experience so far,PR is never easy to be merged in the end.

For the example of the computer, you will probably have to support the Item Type -> Manufacturer -> Model heirachy.

For example

Monitor -> Samsung -> SM402W
Hard Drive -> Western Digital -> WD200-16-SC

seems a new link control which supports tree structure navigation needed

@szufisher we started out with close to 1 million item codes and BOMs.
We have now come down to around 400K Item codes and BOMs on our system. We are doing fine with this approach.

The config to order may have certain limitations:

  • It will take longer to complete a Sales Cycle once it is live
  • Selecting a valid configuration applying constraints will require to set up, update and maintain some script.
  • The above requires a skilled set of people.
    I think even if you have unused item codes, BOMs lying around it does not really make a difference.
    Even if there is some cost in updating BOMs and Item codes when we make changes, it outweighs making a configuration every time a Sales Engineer has to quote.
  • Generating a BOM will only be possible for simple straight forward conditions.

However there is merit in a two pronged approach, where once you have created most your item codes and BOMs, creating the next few could be more simple.

1 Like

thanks for your valuable feedback.

@szufisher Thanks for your message, I think this could be a good way to solve the config problem.

For my case, there are 2 relevant options, I didn´t see in your post:

  1. Is there a way to generate automatically the name for the product?

Example: You config a computer with a Samsung HDD, 2x 16GB Ram, Standard monitor and keyboard type 2.
The places for the options will every time the same, so you could generate a “code” like:
MASTER-ITEM/OPTION1/OPTION2/QTY-OPTION2/OPTION3/OPTION4

Is there a way to generate automatically a code like this -> COMP/SAM/16G/2/SM/K2

(Set a “short name” for every item and separate them with a “/”. A “-” for separation isn´t a good solution, because in some configs you have select a range or you have to select a negative value)

  1. Is there an option to “reconfig”? (I think it will work, but not sure)

Is you have 20+ Options and a costumer would like to order a device similar to the last order, but 2 options are different, it would be nice to select a code from one of the last orders for this costumer and only edit the 2 options.

In our case, we would like to monitor, which configs are ordered most of the time and with a code like this, it will be easy to set a filter. Also you can set an alert, if the same code are requested from 2 or 3 customers. In case a request come from one costumer for an item with this config an 2-3 days later you will get a request for the same config from a reseller costumer. So you can check, if it´s maybe for the same end user and set the discounts correct.
Also an option to select configs for this customer, which ordered in the past, would be nice.

Thank you for your time and sharing your solution.

Best wishes from Vienna,
Matthias

currently the configuration docname is generated based on auto name rule which is format:{field1}-{field2}…, of course it can be easily changed to format:{field1}/{field2}…, and copy this configuration docname to the configurable item’s item name field via custom script as needed.

as of now re-config is not supported, because the standard dynamic link field is used, so there is only 2 options: create a new config and re-use existing config, if use the existing config and change options, it will impact the old order linked to the configuration.

anyway, I think re-config is good feature per stated business scenario, will consider to develop this feature.

FYI
the core team thinks my proposed solution is too complex, it will not be possible to accept this into the core, so I am trying to pack it as an independent APP.

APP is now available for testing and feedback

2 Likes