Import Items in Quotations Phase


In the Quotation Part, or Opportunity of the ERPNext, is there anyway to just upload the items associated with the Quotation or the Opportunity. Our line items for Quotation, etc is around 1500 line items on average, so adding them one by one would be a royal pain.

I have looked at the Data Import Function, but this is more focused on the master, and not for the specific items per quotation or opportunity.

Look forward to your response

You can import Quotations through the Data import Function, but I’m not sure that it can handle 1500 lines at once.

Your best bet is to create a sample quotation through the online system (with just a few items), then download it using the Data Import Tool (select the document, then clcik Download with Data). This will give you the format needed to import the quotation.

To be clear, those items you import in a Quotation need to exist as Items. If these are new items, you’ll need to import them as Items first, then you can reference them in the Quotation. As well, you don’t need to fill in all the item details when importing. Typically just Item code and quantity is enough, the rest gets filled in when the Data Import CSV gets processed.

Hi Ben,

Thanks for this. How exactly do you do that, because when I looked at the Quotations in the Data Import Tool (Download with Data), it just shows me a list of Quotations, but nothing with items persay.

Appreciate your quick response btw!



The Data Import with Data for Quotation should give a list of quotations, but if you scroll to the right in the CSV you will see for each quotation a list of the Quotation Items.

Awesome Danke Ben! Much Appreciated.

Another question, is there a way to add a margin to the prices in the form when it is a Quotation stage? At this moment, we are using a negative -3% in the Taxes, etc. (Also want to hide this field, so the customer doesn’t see our margin)

I would suggest looking at the Price Lists feature. You can have buying and selling price lists, as well as pricing rules that can give % markups or have set prices for any item (different ones for buying and selling if you want).

I’ve checked the price list features, but is there anyway we can include this at the quotation stage? This way we can change our margins as and when required (we are traders), and work on variable margins rather than fixed margins.



There are two ways you can work out the rate based on your price list.

  1. Custom Script:
    -Add a new field ‘margin’ to your doctype (In this case it would be Quotation Item, and not Quotation).
    -Build a custom script to calculate the rate based on the price list you’ve entered, and the margin you’ve entered.

  2. Discount field: ERPNext has a discount field available which is deactivated by default. You can activate it under: Setup>Features Setup under the ‘Sales and Purchase’ tab. You can use negative values here to calculate margins, and can also customise whether it should show up on print, independent of taxes.