import_and_export:importing_items

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
import_and_export:importing_items [2023/08/16 00:20] – [Import new item codes] Mark Gloverimport_and_export:importing_items [2026/02/27 13:03] (current) – [Import file format] Gary Willetts
Line 4: Line 4:
  
 <WRAP center round important 80%> <WRAP center round important 80%>
-  * This command only imports (creates) items.  You will need to do this when you are configuring mSupply for the first time, or when you are wanting to create a number of new items to your system.+  * This command only imports (creates) items.  You will need to do this when you are configuring mSupply for the first time, or when you are wanting to create a number of new items to your system or amend a number of existing items.
   * <wrap em>This process does not introduce stock.</wrap> If you would like to import stock, see the [[import_and_export:import_items_and_stock|]] page.   * <wrap em>This process does not introduce stock.</wrap> If you would like to import stock, see the [[import_and_export:import_items_and_stock|]] page.
 </WRAP> </WRAP>
 +
 +You can download the {{ :import_and_export:msupply_item_import_template.xlsx |mSupply Item Import template}} as a starting point for creating your item list. **Reading through this document before proceeding with the import process is highly recommended.**
  
 During import you can specify a number of things including: During import you can specify a number of things including:
Line 91: Line 93:
 | 4              | D              | reference pack size                  | integer                                                                                                                                                                                                                                                    | | 4              | D              | reference pack size                  | integer                                                                                                                                                                                                                                                    |
 | The above fields are mandatory, while the following fields are optional and may or may not be included\\  as per your requirements                                                                                                                                                                                               |||| | The above fields are mandatory, while the following fields are optional and may or may not be included\\  as per your requirements                                                                                                                                                                                               ||||
-| 5              | E              | Default shelf location code          | 60 alphanumeric characters. The code of the shelf location that stock of this item is normally placed in. Will be offered by default when stock of the item is received on a goods received note or supplier invoice.                                                                                                                                                                                                                                  |+| 5              | E              | Default shelf location code          | 60 alphanumeric characters. The code of the shelf location that stock of this item is normally placed in. Will be offered by default when stock of the item is received on a goods received note or supplier invoice. The location will be created if it doesn't exist.                                                                                                                                                                                                                              |
 | 6              | F              | user field 1                         | 30 alphanumeric characters                                                                                                                                                                                                                                 | | 6              | F              | user field 1                         | 30 alphanumeric characters                                                                                                                                                                                                                                 |
 | 7              | G              | user field 2                         | 30 alphanumeric characters                                                                                                                                                                                                                                 | | 7              | G              | user field 2                         | 30 alphanumeric characters                                                                                                                                                                                                                                 |
Line 107: Line 109:
 | 19             | S              | Default sell price                     | | 19             | S              | Default sell price                     |
 | 20             | T              | Category                             | Category 1. This category is hierarchical and has 3 levels. You can enter different levels separated by :: (for example “Pharmaceuticals::Controlled::Anti-depressants” or “Controlled::Anti-depressants”) or just the lowest level with no separator (for example “Anti-depressants”). mSupply will look for an existing category with the levels you define, if it doesn't find one then it will create it and assign the category to the name. If you enter only the lowest level category (for example “Anti-depressants”), mSupply will look for any lowest level category “Anti-depressants” with any or no parent. If it finds one, it will assign the first one it finds to the name being imported, otherwise it will create it with no parent and assign it to the name.\\  We strongly recommend you use the WHO EDL categories for this field  | | 20             | T              | Category                             | Category 1. This category is hierarchical and has 3 levels. You can enter different levels separated by :: (for example “Pharmaceuticals::Controlled::Anti-depressants” or “Controlled::Anti-depressants”) or just the lowest level with no separator (for example “Anti-depressants”). mSupply will look for an existing category with the levels you define, if it doesn't find one then it will create it and assign the category to the name. If you enter only the lowest level category (for example “Anti-depressants”), mSupply will look for any lowest level category “Anti-depressants” with any or no parent. If it finds one, it will assign the first one it finds to the name being imported, otherwise it will create it with no parent and assign it to the name.\\  We strongly recommend you use the WHO EDL categories for this field  |
-| 21             | U              | Category 2                           | 60 alphanumeric characters  +| 21             | U              | Category 2                           | 60 alphanumeric characters. If the category does not exist, it will be created. Can use value "none" to remove an existing category. 
-| 22             | V              | Category 3                           | 60 alphanumeric characters  |+| 22             | V              | Category 3                           | 60 alphanumeric characters. If the category does not exist, it will be created. Can use value "none" to remove an existing category  |
 | 23             | W              | VEN category                         | The WHO VEN category of the item. One character only, must be V, E or N, will be ignored of it is neither of these. | | 23             | W              | VEN category                         | The WHO VEN category of the item. One character only, must be V, E or N, will be ignored of it is neither of these. |
 | 23             | X              | Weight                               | The weight per default pack size (column D) in kg  | | 23             | X              | Weight                               | The weight per default pack size (column D) in kg  |
Line 119: Line 121:
 | 30             | AE             | Default outer pack size              | The number of default packs that fit in a carton. Filled in by default when receiving goods but can be simply overridden. | | 30             | AE             | Default outer pack size              | The number of default packs that fit in a carton. Filled in by default when receiving goods but can be simply overridden. |
 | 31             | AF             | Default outer pack volume            | The volume of an outer pack in m<sup>3</sup>, filled in by default when receiving goods but can be simply overridden. | | 31             | AF             | Default outer pack volume            | The volume of an outer pack in m<sup>3</sup>, filled in by default when receiving goods but can be simply overridden. |
 +| 32+            | AG+            | Item custom fields                   | After column AF (31), any custom item fields set up in the preferences (see the [[preferences:custom_fields|]] section for details) can be added. The column header must be exactly the name of the custom field (case **in**sensitive). The values entered in these columns will be saved to the item's appropriate custom field. |
  
 All these are in this handy template: {{ :import_and_export:msupply_item_import_template.xlsx |mSupply Item Import template}} All these are in this handy template: {{ :import_and_export:msupply_item_import_template.xlsx |mSupply Item Import template}}
Line 142: Line 145:
 ==== Import new item codes ==== ==== Import new item codes ====
  
-If you need to change the item codes for a selection of items, it is a technically challenging process that is easy to get wrong if done manually, especially if you intend to re-use existing codes (not recommended!).  Custom code has been developed to do this in bulk.  Please contact Sustainable Solutions on support@msupply.org.nz to discuss this.  Include a link to this heading [[https://docs.msupply.org.nz/import_and_export:importing_items#import_new_item_codes|Import new item codes]] :-).+If you need to change the item codes for a selection of items, it is a technically challenging process that is easy to get wrong if done manually, especially if you intend to re-use existing codes (not recommended!).  Custom code has been developed to do this in bulk.  Please contact Sustainable Solutions on <support@msupply.foundation> to discuss this.  Include a link to this heading [[https://docs.msupply.org.nz/import_and_export:importing_items#import_new_item_codes|Import new item codes]] :-).
  
 The relevant details are: The relevant details are:
  • Last modified: 2023/08/16 00:20
  • by Mark Glover