Integration between MRPEasy and Magento

1. Disclaimer

Installation of Magento extension is a serious process that contains some risks to the e-shop. It must be fulfilled by a person with IT knowledge, and experience with Magento. This person must:

  1. know how to install Magento extensions,
  2. make full backup of the website, and be able to restore it, if needed,
  3. have full access to the server (FTP or SSH and MySQL).

As a negative consequence of the installation, the website can become unavailable to visitors. In this case this person must be able to rollback all changes and turn the maintenance mode OFF.

MRPEasy does not provide this service.

It is strongly advised that installation would be performed by the company or person, who has installed the Magento website initially.

2. Installation

Create a backup of the website before installing the extension. Also, make sure that you have full access to the server (FTP or SSH and MySQL).

In Magento 1, go to Magento -> System -> Magento Connect -> Magento Connect Manager and upload the extension file.

In Magento 2:

  1. Upload the extension file to Magento [root_folder]/app/code. If this folder does not exists, create it.
  2. Open server terminal (console).
  3. Extract the file:
    tar -xzf MRPEasy-Integration-2.0.0.tgz
  4. Change the access permissions of files and folders:
    find MRPEasy -type d -exec chmod 755 {} \;
    find MRPEasy -type f -exec chmod 644 {} \;
  5. Go to Magento root folder.
  6. Run the following commands:
    ./bin/magento module:enable MRPEasy_Integration
    ./bin/magento setup:upgrade

During the installation, the following changes are made:

  1. The extension is placed into
    • Magento 1 [root_folder]/app/code/community/MRPEasy;
    • Magento 2 [root_folder]/app/code/MRPEasy;
  2. In Magento 1, a configuration file [root_folder]/app/etc/modules/MRPEasy_Integration.xml is created;
  3. Order statuses ‘In manufacturing’ (mrpeasy_posted) and ‘Ready for shipment’ (mrpeasy_ready) are created and assigned to state ‘processing’;
  4. Columns ‘mrpeasy_cust_ord_code’ and ‘mrpeasy_cust_ord_id’ are added to the table ‘sales_flat_order’ (Magento 1) or ‘sales_order’ (Magento 2);
  5. columns ‘mrpeasy_cust_ord_id’, ‘mrpeasy_cust_line_id’ and ‘mrpeasy_shipment_id’ are added to the table ‘sales_flat_order_item’ (Magento 1) or ‘sales_order_item’ (Magento 2).

After the extension is installed, it must be configured in Magento 1 -> System -> Configuration -> Services -> MRPEasy Integration or Magento 2 -> Stores -> Configuration -> Services -> MRPEasy Integration.

The following settings must be set:

  • MRPEasy API key – API key from MRPEasy -> Settings -> System settings -> Integration -> API access.
  • MRPEasy Access key – Access key from MRPEasy -> Settings -> System settings -> Integration -> API access.
  • Send sales orders – how to send sales orders from Magento to MRPEasy:
    • Separately – each sales order from Magento becomes a separate customer order in MRPEasy;
    • Group orders – all sales orders from Magento are posted to MRPEasy as one customer order, each line from sales orders is a separate line in the customer order;
    • Group products – all sales orders from Magento are posted to MRPEasy as one customer order, each product is a separate line in the customer order and quantity is a total amount of that product, sold in all sales orders.
  • Update inventory levels in e-shop – if ‘Yes’, then Magento imports inventory levels of products from MRPEasy.

Integration between MRPEasy and Magento runs in the background once per hour. The extension requires the Magento cron job to be configured.

3. Functionality

When posting products, SKU is used to match stock items (‘SKU’ in Magento must match ‘Part Number’ in MRPEasy).

Posting sales orders from Magento to MRPEasy

Sales orders in status ‘Processing’ are posted from Magento to MRPEasy. Order’s status in Magento is changed to ‘In manufacturing’.

Thus, a customer order in status ‘Confirmed’ is created in MRPEasy -> CRM -> Customer orders. This order must be processed as usually: items must be booked.

If sales order in Magento contains an item with SKU that does not match any part number in MRPEasy, then this item is ignored.

It is advised to check Magento list of orders. If there are sales orders in status ‘Processing’, that have been received before the last synchronization, then it means that they could not be posted to MRPEasy, and they must be handled manually.

Updating of statuses of sales orders in Magento

When all items of a sales order are ready to be shipped, status of the sales order in Magento is changed to ‘Ready for shipment’.

Subtracting shipped items from the stock in MRPEasy

Items must be shipped in Magento.

When sales orders that were posted to MRPEasy, are shipped, items are subtracted from the stock in MRPEasy:

  1. a shipment for the customer order in MRPEasy is created;
  2. all items are picked.

If some shipment in MRPEasy is in status ‘Ready for shipment’, then it means one of the following:

  1. Items cannot be picked automatically because serial numbers must be specified. Please pick items manually.
  2. Item’s quantity in the shipment in MRPEasy does not match the quantity in Magento. In this case please turn to MRPEasy support.

Updating inventory in Magento

The integration extension can update inventory levels in Magento by fetching stock item quantities from MRPEasy.

If the setting ‘Update inventory levels in e-shop’ in Magento -> System (Stores) -> Configuration -> Services -> MRPEasy Integration is turned ON, then quantities of products are updated in Magento.

Products are matched using ‘SKU’ field in Magento and ‘Part Number’ field in MRPEasy.

‘Available’ quantity from MRPEasy is set as a quantity in Magento.