Best Practices for Item Variants - Solar Panels

tl;dr - What’s the best way to set up inventory for an Amazon-like experience?


We are creating a demo using a fake company that assembles, manufactures, sells, and installs Solar Panels. This is an exercise to learn ERPNext as well as prepare to bring ERPNext more fully to the North American market., in case you want to follow along with the home game.

We have downloaded a spreadsheet with about 20,000 items, in four product classes: Solar Panels, Inverters, Controllers and Hardware.


The question is, what’s the best way to configure ERPNext to support this use case?

What I’ve tried:

My intuition is to create four item templates, one each for panels, inverters, controllers, and hardware, since each has a distinctive set of attributes.

Solar Panels, for example, have four attributes: power rating, family, safety rating and material. I wrote some Python to massage the data into data import format. There are 17k+ records that look like this:

I set up an Item template called “Solar Panel” and checked the “Has Variants” flag, and added an attribute for Safety Certification, Nameplate Pmax, Family and Technology.

There are 17k+ Solar Panels and I am able to run the import, but that only results in 544 unique Solar Panel variants, and the rest are rejected because of duplicate variant settings.

Possible Approaches

Some experiments I’m going to run, and I welcome commentary on each approach:

  1. Make “Manufacturer” and possibly “Model” into variant attributes so that every solar panel has a unique set of attributes, but they are still variants of the “Solar Panel” template.

Can I define variant attributes so that they can contain any arbitrary value, not just a predefined list?

  1. Dig deeper in to ways of setting variants based on manufacturer.

If I base variants on Manufacturer, how do I store attributes? Docs are unclear about the use case, and how to specify the Manufacturer in the import file.

  1. Don’t use variants at all and create regular item (not a template item) for each Solar Panel.

How do you store custom attributes for those items? Creating a custom Item DocType for each kind of item (Solar Panel, Inverter…) doesn’t seem right, since you should be able to store all kinds of different items with different lists of attributes for each kind of item.

Eventually, I want to model the entire product lifecycle, including assembling product bundles, manufacturing products as well as reselling them on an e-commerce site.

I’m grateful in advance for any insight from the community.



Take a look at Item groups for things like manufacturer or item type.

You can also move some info to the Batch doctype. For instance PMax attribute. Create a field in Batch and make it mandatory. So when creating Batch it will also ask PMax.

Thanks for the suggestion.

It looks like Item Groups provide a way to define a taxonomy for items. At least that’s what they look like from a superficial perspective. They can serve a similar function as the Amazon navigation menu.

Screen Shot 2022-09-13 at 7.06.53 AM

That hint gets me part of the way to defining a classification metadata to items. The rest of the way would be something like an “Attributes” doctype that could be linked to any item, even if it is not a Variant. Or, at least make the variants more flexible so that they could contain any arbitrary value.

I’m thinking specifically of dimensions. Every physical object has dimensions, yet there doesn’t seem to be a built-in way to capture that information (other than weight). Am I missing something fundamental?

Thanks for the reply @TurkerTunali.

I’m not sure how batches will help in this circumstance.

When you say “Create a field in Batch” and make it mandatory, do you mean customize the Batch Doctype, or is there a feature in batches that will allow me to assign arbitrary metadata to an item or batch?

At this time, we are not enabling the Stock Ledger, so that we can simplify manipulating stock without having to synthesize transactions for purchasing and moving stock around in the system. We will turn that feature on as we get closer to the demo phase so that we can demonstrate more fully how items move through the value chain.

Perhaps I didn’t understand what you are suggesting?

I agree with Smino and TurkerTunall and I want add extra tips.
I would try dividing the attibutes between the diferents options checking witch one fits best.
Some attributes on Item Groups,
some on Items Variants,
some as on custom fields added to Batch doctype and
some as a code on Batch number that the user enters at
the time of creation of the Bath)
For instance: 60x80-UL1701-270-00001
where each Batch number section means:
length x width - Safety Certification - Nameplate -
Purchase Recipt Number

In the example I used Purchase Recipt Number if “Solar Panel” is purchase item but it can be Work Order Number or Stock Entry Number if manufactured or repacked.

This approach I guess is better than have hundreds o thousands of variants for a product.

I did it for a demo to a custom window maker that used large, width, material, glass thickness, curtain fabric and more and he said it was the first usable option that saw after check many ERPs.

I hope it helps.


1 Like