17.13. Importing stores
We strongly recommend:
* You take a backup of your datafile before attempting any imports.
* You test any import on a copy of your data before you do it on the real data.
Don't say you haven't been warned
The Import stores function allows you to import stores into your datafile. If the store does not exist already it will be created, if it does already exist it will be updated with the contents of the import file.
This function is currently not available to general users and is not available from the standard user interface. You can create the import spreadsheet of course, but the actual import will need to be done by The mSupply Foundation staff.
Import file format
- The import file must be an “.xlsx” (Excel) type file.
- The first row must contain the column headers shown in the Column heading column in the table below.
- The store code is used to check whether a store exists already. If it does not exist in the datafile it will be created with the values in that row of the spreadsheet. If a store with the store code does exist in the datafile already, its values will be updated with the values contained in that row of the spreadsheet (blank cells will be ignored so values will not be updated with empty cells).
- The currently logged in user (the one doing the import) is given login permission to the store.
- The table below details the fields you should have in each row of the file.
Column | Column heading | Description |
---|---|---|
1 (A) | store_name | Mandatory, Text. The name of the store . |
2 (B) | code | Mandatory, Text. The code of the store. |
3 (C) | store_mode | Optional, Text, one of “store” or “dispensary”. The mode of the store. |
4 (D) | site_code | Optional, Integer. The synchronisation site the store belongs to. Leave empty if this is not part of a synchronisation setup. Will be set to 1 by default if not provided. |
5 (E) | organisation_name | Optional, Text. The name of the organisation this store belongs to. No functional value but can be included in reports etc. |
6 (F) | address_1 | Optional, Text. The number of packs (containing the number of units in column 4) in this stock line. Equal to the total quantity if the Pack size is 1 . |
7 (G) | address_2 | Optional, Text. The first line of this store's address. |
8 (H) | address_3 | Optional, Text. The first line of this store's address. |
9 (I) | address_4 | Optional, Text. The first line of this store's address. |
10 (J) | address_5 | Optional, Text. The first line of this store's address. |
11 (K) | postal_zip_code | Optional. Text. The store's postal or ZIP code. |
12 (L) | phone | Optional, Text. The phone number of the store in no particular format. |
13 (M) | tags | Optional, Text. The tags belonging to the store. Separate individual tags with a space. |
14 (N) | copyStorePrefFromStoreCode | Optional, Text. The code of the store to copy store preferences, custom data, master list associations and user permissions from (for the user in column 19 (S)). If none is provided the store is given a default set of preferences, empty custom data, no master list associations and no user permissions. |
15 (O) | Type | Optional, Text. . |
16 (P) | Create Date | Optional, . |
17 (Q) | Server | Optional, Not used. |
18 (R) | Version | Optional, Not used. |
19 (S) | User | Optional, Text. The name of the user to copy permission from to give to the currently loggfed in user for this store. |
Here is a blank spreadsheet you can use with the right columns: importstores.xlsx
Previous: 17.12. Importing supplier quotes into Tenders | | Next: 17.14. Importing tenders |