Tips for successfully integrating Magento
As we do more Magento integration work, we thought we’d put together a list of tips, tricks and the various issues we’ve faced.
Use the API! Others may disagree, but working with the API is far easier than ‘integrating’ at the database level. There are many reasons to use the API:
- The database schema is an awful Entity-Attribute-Value (EAV) design, resulting in rather awful queries and transaction statements.
- Magento Extensions hooking onto events within the API will work. For example, sending Sales/Transactional emails when an order is changed to a particular status (see Workflow below).
- Better security, since you’re not opening the database to the internet.
There are a few points to be aware of:
- Slowness: An issue common to all is the lack of performance of the API. For normal day-to-day integration this is not an issue, but be careful of master data takeon for items, inventory and customers using the API. For large amounts of data it may be better to use the Import/Export functions.
- If you’re planning a new integration you should use REST over the Xml-RPC.
- Be careful of product differentiation between the Community and Enterprise editions. Some fields such as ‘Gift Comment’ are not available through the API in Community edition.
- Shipping data is located in the Order Header of the Magento schema. Accounting/ERP typically record shipping data as an item line, so you will need to transform the Magento order data accordingly.
One of Magento’s key strengths is the ability to handle configurable products.
- Because there are two ways of handling configurable products, there are different methods within the Magento API to access the configurable product information. These resources need to be queried in order to get pricing, description and quantity if you plan to download this data as part of an order import into your Accounting/ERP system.
- You will need to address how configurable products will be handled/mapped to the items in the ERP/Accounting system. Consideration needs to be given to how an order line is to be imported i.e. just the primary item, or all items, and for the same reasons how inventory will be uploaded from the accounting system to Magento.
Master Data Considerations
- Since most ERP/Accounting systems don’t have facility to store the extended data required for eCommerce, you will most often have to dual manage item master setup in both the ERP system and Magento.
- Conversely, pricelist management is probably best performed within the ERP/Accounting system and uploaded to Magento.
One of the great things about Magento is the breadth and depth of third party add-ons or extensions.
Workflow & Order Status
Another of the useful parts of functionality within Magento is the ability to control order workflow through the use of Order Statuses.
- One of the great extensions for Magento is the Amasty Order Status extension which allows you to send transactional emails against any order status.
I am sure there are probably others, so we’d be interested to hear other people challenges or tricks.