|  Both sides previous revision Previous revision Next revision |  Previous revision | 
| en:mobile:setup:server_side:create_store [2020/03/01 23:53]  – [Create store for existing customer name using store_create_from_name]  lou_lomas | en:mobile:setup:server_side:create_store [2021/07/15 23:01] (current)  – [3. Create the Store]  Mark Glover | 
|---|
| ====== 3. Create the Store ====== | ====== 3. Create the Store ====== | 
 |  | 
| After the sync sites have been set up, there are three approaches to creating and configuring the store that will be operated on that site.  | <WRAP center round important 60%>  | 
|   | This step is best carried out using the [[https://docs.msupply.org.nz/synchronisation:site_wizard|Sync site wizard]].  These instructions are retained here for reference only.  | 
|   * This can be done 'manually' as described in the first method below.  This method is suitable if you are creating only a handful of stores.  | </WRAP> | 
|   * If you are creating a larger number of stores, then it is more appropriate to use one or both of the two footrunner code methods.  As of 2019-10-24 there are two pieces of footrunner code that can expedite this process - see:  |  | 
|    *[[https://sussol.net/wiki/doku.php/msupply:specifications:admin:sync#creating_data_files_for_multiple_new_remote_sites|Creating data files for multiple new remote sites]].  They can **//not//** be used together for the same store, but it may be appropriate to use   |  | 
|     * [[https://sussol.net/wiki/doku.php/msupply:specifications:admin:sync#store_create_from_name|store_create_from_name]] for creation of one store, and then use   |  | 
|     *[[https://sussol.net/wiki/doku.php/msupply:specifications:admin:sync#sync_clone_sync_site|sync_clone_sync_site]] to create subsequent stores. |  | 
 |  | 
|   | After the sync sites have been set up, there are three approaches to creating and configuring the store that will be operated on that site. | 
 |  | 
|   |   * **[[en:mobile:setup:server_side:create_store#manually_create_store|Manually create a store]]** - this method is suitable if you are creating only a handful of stores | 
|   |   * **[[en:mobile:setup:server_side:create_store#create_store_for_existing_customer|Create a store for an existing customer]]** | 
|   |   * **[[en:mobile:setup:server_side:create_store#create_stores_by_cloning_another_sync_store_using_sync_clone_sync_site|Create stores by cloning another sync store]]** - if you're creating a larger number of stores, then it is more appropriate for the mSupply Support Team to use footrunner code | 
| ==== Manually create store ==== | ==== Manually create store ==== | 
|   - On mSupply desktop go to **Special > Stores > New Store**{{ :mobile:mob2_001.jpg?600 |}}{{ :mobile:newstore.jpg |}} |   - On mSupply desktop go to **Special > Stores > New Store**{{ :mobile:mob2_001.jpg?600 |}}{{ :mobile:newstore.jpg |}} | 
|   * The Store Name needs to be something that users will recognise.\\  ''Mobile Store 1'' is not likely to be a good name to use. ;-) |   * The Store Name needs to be something that users will recognise.\\  ''Mobile Store 1'' is not likely to be a good name to use. ;-) | 
| </WRAP> | </WRAP> | 
|   - [[en:mobile:setup:server_side#making_items_visible_to_the_new_store_according_to_a_master_list|Configure items visibility for the store]]  |   - [[en:mobile:setup:server_side:config#making_items_visible_in_the_new_store_using_master_list_s|Configure items visibility]]  | 
|   - [[en:mobile:setup:server_side#setting_up_correct_synchronisation_settings|Configure synchronisation settings]]  |   - [[en:mobile:setup:server_side:config#setting_up_the_correct_synchronisation_settings|Configure synchronisation settings]]  | 
|   - [[en:mobile:setup:server_side#configure_visibility_to_other_stores|Configure store visibility to other stores]] |   - [[en:mobile:setup:server_side:config#make_the_store_visible_to_other_stores|Configure store visibility to other stores]] | 
 |  | 
| ==== Create store for existing customer name using store_create_from_name ==== | ==== Create a store for an existing customer ==== | 
 |  | 
| This method is only useful if you already have a customer that you want to convert to a store.\\ | This method is only useful if you already have a customer that you want to convert to a store.\\ | 
 |  | 
| === Cloning the existing customer to a store === | === Cloning the existing customer to a store === | 
|   - The mSupply Support Team will use the footrunner code  [[https://sussol.net/wiki/doku.php/msupply:specifications:admin:sync#store_create_from_name|''store_create_from_name'']] footrunner code to **clone** the original store.  You will need to provide: |   - The mSupply Support Team will use the footrunner code  [[https://sussol.net/wiki/doku.php/msupply:specifications:admin:sync#store_create_from_name|''store_create_from_name'']] to **clone** the original store.  We will need to provide: | 
|     - ''Name **ID**'' (not name **Code** :-() to create the store for (must not be blank or already a store) |     - ''Name **ID**'' (not name **Code** :-() to create the store for (must not be blank or already a store) | 
|     - Store mode for new store (one of ''store'', ''dispensary'' or ''report'').  Almost always, this should be ''store'' |     - Store mode for new store (one of ''store'', ''dispensary'' or ''report'').  Almost always, this should be ''store'' | 
|     - ''Sync ID'' for site on which the new store will be Active (optional; if left blank, will default to the current site ID) |     - ''Sync ID'' for site on which the new store will be Active (optional; if left blank, will default to the current site ID) | 
|   - [[en:mobile:setup:server_side#making_items_visible_to_the_new_store_according_to_a_master_list|Configure items visibility for the store]]  |   - [[en:mobile:setup:server_side:config#making_items_visible_in_the_new_store_using_master_list_s|Configure items visibility]]  | 
|   - [[en:mobile:setup:server_side#setting_up_correct_synchronisation_settings|Configure synchronisation settings]]  |   - [[en:mobile:setup:server_side:config#setting_up_the_correct_synchronisation_settings|Configure synchronisation settings]]  | 
|   - [[en:mobile:setup:server_side#configure_visibility_to_other_stores|Configure store visibility to other stores]] |   - [[en:mobile:setup:server_side:config#make_the_store_visible_to_other_stores|Configure store visibility to other stores]]  | 
|   | === Merging the new store with the existing customer ===  | 
|   | Using the mSupply Desktop User Guide [[https://docs.msupply.org.nz/names:merging_names|merge the new store name with the existing customer name]].  There is some footrunner code that can facilitate this for multiple sites. | 
 |  | 
| === Merging the new store the existing customer ===  | **Before merging** all unfinalised Customer Invoices from supplying stores to the existing customer must be finalised.  On a system with supplying stores on multiple sync sites, this can take a long time.  Start early, and if possible, ask the supplying stores to refrain from creating any new Customer Invoices until the merging is done... | 
| Using the mSupply Desktop User Guide [[https://docs.msupply.org.nz/names:merging_names|Merge the new store name with the existing customer name]].  There is some footrunner code that can facilitate this for multiple sites. |  | 
 |  | 
| __NOTE:__ Before merging any unfinalised Customer Invoices from supplying stores to these existing customers need to be finalised first.  On a system with supplying stores on multiple sync sites, this can take a long time.  Start early, and if possible, ask the supplying stores to refrain from creating new Customer Invoices until the merging is done...  | If you try to do the merge before finalising all customer invoices, you will get an error message, and the merge will not proceed | 
|   |  | 
| If you try to do the merge before finalising unfinalised customer invoices, you will get an error message, and as that message indicates, the merge will not proceed |  | 
| {{ :en:mobile:pasted:20200116-222550.png  ?500 }} | {{ :en:mobile:pasted:20200116-222550.png  ?500 }} | 
| ==== Create store by cloning another sync store using sync_clone_sync_site ==== | ==== Create store by cloning another sync store using sync_clone_sync_site ==== | 
| Use the footrunner code [[https://sussol.net/wiki/doku.php/msupply:specifications:admin:sync#sync_clone_sync_site|sync_clone_sync_site]].  Under this method:  |   | 
|   - Manually create and appropriately configure a single store.  | First [[en:mobile:setup:server_side:create_store#manually_create_store|manually create and appropriately configure a single store]].  | 
|   - Make //**sure**// the relevant sync sites have been created (above) and then, for **EACH** store:  |   | 
|   - Run ''sync_clone_sync_site'' to clone the original store.  You will need to provide:  | Make //**sure**// the relevant [[en:mobile:setup:server_side:create_sync_site|sync sites have been created]] and then, for **EACH** store:  | 
|     - Sync ID for source sync site  |   - The mSupply Support Team will use the footrunner code ''[[https://sussol.net/wiki/doku.php/msupply:specifications:admin:sync#sync_clone_sync_site|sync_clone_sync_site]]'' to clone the original store.  We will need:  | 
|     - Sync ID for clone sync site  |     - ''Sync ID'' for source sync site\\ \\  | 
|     - sync version (v1 for desktop, v3 for mobile)  |     - ''Sync ID'' for clone sync site\\ \\  | 
|     - Decision on whether the cloned store will have 'group' store visibility (visible to all other stores with the same supplying store) or not  |     - ''Sync version'' (v1 for desktop, v3 for mobile)\\ \\  | 
|     - Decision on whether to also clone locations, transactions, stock, requisitions.  (almost always **NO**!)  |     - Decision on whether the cloned store will have 'group' store visibility (visible to all other stores with the same supplying store) or not\\ \\  | 
|     - new **store** code //and// name for each cloned store  |     - Decision on whether to also clone locations, transactions, stock, requisitions.  (almost always **NO**!)\\ \\  | 
|     - new **user** name //and// password for the each cloned store's default user  |     - new **store** code //and// name for each cloned store\\ \\  | 
|   - If there are actually existing customers for each of these stores, you will need to [[https://docs.msupply.org.nz/names:merging_names|merge the existing customer name with the new store]]  |     - new **user** name //and// password for the each cloned store's default user\\ \\  | 
|   - The store will have the same item visibility configuration as the store that has been cloned.  Review, and if necessary, [[en:mobile:setup:server_side#making_items_visible_to_the_new_store_according_to_a_master_list|Configure items visibility for the store]]  |   - If there are actually existing customers for each of these stores, you will then need to [[https://docs.msupply.org.nz/names:merging_names|merge the existing customer name with the new store]]\\ \\  | 
|   - The store will have the correct 'basic' sync settings.  Review, and if necessary, [[en:mobile:setup:server_side#setting_up_correct_synchronisation_settings|Configure synchronisation settings]]  |   - The new store will have the same item visibility configuration as the original store.  Review, and if necessary, [[en:mobile:setup:server_side:config#making_items_visible_in_the_new_store_using_master_list_s|configure items visibility]]\\ \\  | 
|   - The store will have the correct 'basic' store visiblity settings, including, if you have selected it, 'group' store visibility.  Review, and if necessary, [[en:mobile:setup:server_side#configure_visibility_to_other_stores|Configure store visibility to other stores]] |   - The new store will have the correct 'basic' sync settings.  Review, and if necessary, [[en:mobile:setup:server_side:config#setting_up_the_correct_synchronisation_settings|configure synchronisation settings]]\\ \\  | 
|   |   - The new store will have the correct 'basic' store visibility settings, including, if you have selected it, 'group' store visibility.  Review, and if necessary, [[en:mobile:setup:server_side:config#make_the_store_visible_to_other_stores|configure store visibility to other stores]] | 
 |  | 
| \\ | \\ | 
| \\ | \\ | 
| |  //  Previous:  **[[en:mobile:setup:server_side:create_sync_site]]** | | Next: **[[en:mobile:setup:server_side:config]]** //  | | |  //  Previous:  **[[en:mobile:setup:server_side:create_sync_site]]** | | Next: **[[en:mobile:setup:server_side:config]]** //  | |