This article covers the case of a company that is already using the Magento eCommerce software and has all its data entities (products, product categories, clients etc.) in the Magento database. The Megaventory account is empty of data (either new or after a reset operation). If you already have an active Megaventory subscription and want to start using the Magento ecommerce software please move on to this article.
NOTE: If you use Magento 2.x your user interface might look different than the screenshots below.
Preliminary Step – Necessary settings in Magento
The following Magento settings need to be correctly set for the correct interoperability between Megaventory and Magento:
Cron Job (Unix)
Cron jobs, or scheduled tasks, must be enabled in order for the Megaventory extension to operate properly. By default if the Magento installation is running on a UNIX OS the OS should automatically recognize Magento's requests to use the CRON TAB service. The crontab service command can be used if shell access is granted to the server or added through cPanel or a similar admin tool. The crontab should have rows that look similar to one of these:
* * * * * /bin/sh /[mage_dir]/cron.sh * * * * * /bin/bash /[mage_dir]/cron.sh * * * * * php -f /[mage_dir]/cron.php * * * * * /usr/bin/php /[mage_dir]/cron.php * * * * * /usr/local/bin/php -f /[mage_dir]/cron.php
The Inventory Settings in the Magento software can be found by navigating to System > Configuration > [Catalog > Inventory (left menu)]. If you use Magento 2.x, you can find the setting at Stores > Configuration > Catalog > Inventory. The Decrease Stock When product in Placed option (see figure below) will control whether non-shipped items in Sales Orders (a Pending Sales Order in Magento is equivalent to a Verified Sales Order in Megaventory) will be accounted for in the Global Stock. If this option is set to Yes, the Global Stock will decrease immediately when a Sales Order is placed. If this option is set to No, Global Stock decreases only when items are shipped against the Sales Order. The Manage Stock option (see figure below) should be set to Yes.
Step 1 - Signing up for a Megaventory account
A new Megaventory account should be created here.
After signing up for the first time the user will see the initial Setup page (Admin > Account Setup) as shown in the figure below.
Extra help while filling out the form can be obtained by hovering with the mouse over the bubble icon next to each specific field.
The Enable Sales and Purchase Orders option should be set. The Enable Works (Manufacturing) option should be set if at least one product of type Bundle exists in the Magento store.
Finally, it is strongly recommended that the Numbering Scheme of the Sales Order document is set to automatic numbering. By doing so, all the Sales Orders coming from Magento will receive an Order Reference Number (the sales order number of Magento) and the sales order numbering scheme of Megaventory will be independent from the sales order numbering scheme of Magento. This also makes Megaventory ready to accept Sales Orders from other sales channels as well (other e-commerce software, manual sales orders through phone, etc.). If the Numbering Scheme of the Sales Order document is set to manual numbering, the Magento Sales Order number will be used also in Megaventory. The latter option should be selected if your Megaventory account will receive orders from the Magento store only. After completing the initial Setup the user should click Save and then navigate to Profile Icon > Company & Billing (Admin) > Users.
The administrator username should be clicked. This action will bring up the definition of the user as seen in the figure below.
Clicking on the key icon will generate a new random key for the specified user entity. The reader shall keep a record of the generated key; it will be used in Step 5 later on. Finally, the Update button should be clicked to save/update the user entity.
The API key grants access to Magento so as to update the data of the Megaventory account. Therefore, the API key should be treated as a password.
The trial account of Megaventory supports up to 5000 product SKUs and 5000 customers. If your Magento store has more than 5000 products or customers, please contact Megaventory support at firstname.lastname@example.org to raise those limitations for the evaluation period of the Megaventory account.
Step 2 - Activating the Magento integration in Megaventory
To use the Magento eCommerce software, the appropriate flag has to be set in the Account Integrations module of Megaventory. This module lies under Profile Icon > Company & Billing (Admin) > Integrations and handles the few settings involved in integrating Megaventory to any 3rd party software. Extra help while filling out the form can be obtained by hovering with the mouse over the bubble icon next to each specific field.
When ready, the user should save the form by clicking the Save option.
Step 3 - Installation & Activation of the Megaventory extension in Magento
If you are using Magento 1.x
You need to register and login into the Magento Connect store and then get the key for the Megaventory Magento extension. To get the key you need to visit the Megaventory Magento extension page in the Magento Connect store and click at Install Now. Click at the checkbox to accept the license agreement and click at Get Key. Then click at Select Key and copy it to your clipboard (Ctrl+C).
Then log into your Magento store and in the main menu under System > Magento Connect > Magento Connect > Magento Connect Manager enter your key under 'Install New Extensions' and in 'Paste extension key to install'. Then click 'Commit Changes'.
If you are using Magento 2.x
You need to Start the Component Manager in your Magento v2 store first. To do this follow these simple, official instructions by Magento.
You then need to 'purchase' the free Megaventory Magento extension from the Magento Marketplace. To do that visit the Megaventory Magento extension page in the Magento Marketplace and click at Add to Cart. Follow the steps for the checkout process (you may need to create an account in the Magento Marketplace and login if you haven't already).
When you have completed the checkout, go back to your Magento site and install the Megaventory Magento extension by following these simple, official Magento instructions.
Step 4 - Synchronizing the initial data from Magento to Megaventory
After the extension is successfully installed, a new Megaventory menu item appears. Under the Settings tab the user will find the Connectivity panel as well as the Setup Wizard panel that starts the synchronization process with the newly created Megaventory account.
If the Megaventory Extension option is set to Enabled, then the Magento installation will send and receive data with every Magento action that needs to communicate data to Megaventory. Setting the Megaventory Extension option to Disabled will effectively disable all the functionalities the module. For the Setup Wizard to finish successfully, the option should be set to Enabled.
The API URL should be set to: https://api.megaventory.com/v2/json/reply/ and finally, the API Key is the key generated at step 1 above.
When the user clicks the Update button, a success notification icon appears when all settings have been correctly inserted and connection between Magento and Megaventory has been established. When a proper connection between Magento and Megaventory cannot be established, a Connectivity Failed icon appears and an explanation message of the error(s) is displayed. All errors have to be corrected before starting the Data Initialization process.
The Order Synchronization checkbox is initially disabled and will be automatically enabled when the Setup Wizard ends successfully. While this option is unchecked, no sales orders are sent to Megaventory from Magento. This option should be enabled only when the inventory quantities of Magento and Megaventory are synchronized (after the Setup Wizard ends successfully).
Setup Wizard Tab
The Setup Wizard module is displayed in the figure below. Before starting the process, the user has to choose codes for a Shipping Product SKU and a Discount Product SKU (for example: “shipping001” and “Discount001”). These “virtual” products will be added in Megaventory with infinite quantities and will handle the Magento shipping charges and order discounts respectively. The Discount Product SKU will be added in the sales order form of Megaventory (as a product with negative price) if there is a discount in a Magento order.
As soon as the user clicks the Start button, the synchronization process starts. The process automatically sends and receives the following entities to and from Megaventory:
- Inventory Locations (for example stores, warehouses etc.)
- Supporting entities (creates a virtual ‘shipping’ and ‘discount’ product and a default ‘Magento Guest’ client to handle those clients that use the Magento shopping cart without subscribing as a registered user)
- Product Categories
In case some entities fail for any possible reason (for example, connectivity is temporarily lost etc.) a log is written to the event database of the Megaventory extension. The log is available under the Log option under the Megaventory menu tab in the Magento software. If for any reason, the setup does not finish successfully, the user may refresh the page and start over.
When the synchronization process ends, the user should click on Yes in order to import the Magento global stock (inventory quantities) to Megaventory. This process will generate a CSV file containing the Magento product quantities which can then be uploaded to Megaventory.
After clicking Yes, the Inventory Location of Megaventory (that will initially receive the Magento quantity information) has to be selected. Note that, since Megaventory supports multiple Inventory Locations, product quantities can be later distributed between Inventory Locations from the Megaventory software; inventory information will always be synced to the Magento software in any case.
Finally, by clicking Export Initial Stock CSV, a CSV (text) file will be generated by Magento. The user should download the file and save it locally in his/her computer. The file contains a snapshot of the current Magento inventory information (global stock: products with their associated inventory quantities) (see Step 6).
The file should be imported/uploaded to Megaventory as soon as it is generated. That will ensure that no Sales Orders are created from Magento front end users during this period and therefore no stock discrepancies will be generated. Ideally, the Magento front-end must be temporarily disabled to ensure no orders are placed by front-end users during this period.
Step 5 - Importing the current Magento quantities in Megaventory
The CSV file is handled by the Inventory Taking module (under the Inventory tab) of Megaventory.
The process usually starts by downloading the excel file and filling it with data. Since the file has been automatically generated by Magento in the previous step, the user should directly proceed to the last step of the Inventory Taking process.
Once the file is uploaded to Megaventory the quantities are adjusted in the selected Inventory Location. The quantities are now synchronized.
Step 6 - Setting up final data
As soon as the inventory file is uploaded to Megaventory, the user shall navigate to the Megaventory > Settings menu tab in the Magento back-end and enable the Order Synchronization checkbox. While this option is unchecked, no sales orders are sent to Megaventory from Magento. When this option is checked, the Magento Sales Orders are sent to Megaventory and Megaventory will send back to Magento the inventory quantities. The Order Synchronization option should be enabled immediately after the quantities of Magento and Megaventory are synchronized. If the Magento front-end was previously temporarily disabled it can now be re-enabled.
This is the last step of the whole set-up process. See here for information regarding the extra features that the Magento extension has to offer.