Item code from Customs Authorities HS codes


Has anyone worked on HS codes for the Customs Authorities? It seems that the item code doctype logic is identical with the logic used by Customs Authorities logic for categorizing products in a global scale. Actually HS codes are used globaly and the HS code for a specific product in India, is the same code with France, US, etc…

Just thinking out loud, is there any script concerning the Customs Authorities for the specific business?



Hello Nick,

When creating new Item, you can set value in the Item Code field based on HS Code. Also, you can write add a custom logic for Item Code generation using Custom Script feature.

@adityaduggal your guidance on this will be very helpful.

Hello Sir,

Thanks for the info provided.

Yes this is the way i was thinking to go…

Just an idea was for ERPNext to have a button (or link) to search the HScode online. There are douzens of websites doing this, so the user does not switch between tabs.

Hope it makes sence :wink:

Can you please create Github Issue for this feature suggestion?

Something on the similar lines, we have ERPNext HUB as a dedicated project on our roadmap. It will be standard items listing from where you will be able to generate Item Code for your ERPNext account.

Thanks :slight_smile:
Just did


We are using HS Code as one of the Variant in the Item Variants.

Have look at the below screenshot for the same:

@adityaduggal - Hello, I would like to generate item codes for item variants that include the parent # and all the attributes with a separator in-between. Could you give me step by step direction hence i am new to the system?

Any help would be appreciated, thanks,