Magento 1.x 

Integration Document

About Magento

Magento is an ecommerce platform built on open-source technology which provides online merchants with a flexible shopping cart system, as well as control over the look, content, and functionality of their online store. Magento offers powerful marketing, search engine optimization, and catalogue management tools.

Magento is written in PHP. It uses multiple other PHP frameworks such as Laminas and Symfony. Magento source code is distributed under Open Software License v3.0. Magento was acquired by Adobe Inc in May 2018 for $1.68 Billion.

Magento's ability to scale allows shops with only a few products and simple needs to easily expand to tens of thousands of products and complex custom behaviour without changing platforms. It offers a variety of plug-ins and themes which can easily enhance a customer's experience.

Types of Integration:

  • 1.x, i.e., 1.8, 1.9 etc. follow SOAP based APIs
  • 2.x, i.e., 2.0, 2.1.................2.4 is the latest

Starting from Magento 2.3, Magento Supports Multi-location/Multi-store inventory updates. For all the versions before 2.3, multi-store inventory is managed by using custom Plugins that can be installed in Magento.   

  • SOAP - Simple Object Access Protocol is a function-driven API that works only with XML formats.
  • REST - Representational State Transfer is a data-driven API that works with plain text, XML, HTML, and JSON formats.

Vin eRetail Integration with Magento Supports 2 custom plugins:

1. Amasty multi warehouse inventory for Magento 2

2. Advance Inventory by Wyomind Supports Magento 1.x

 In this document, we will discuss about the Integration of 1.x version.


Specifics of Magento Integration:

In Magento Integration, we have: 

  • SKU Pull 
  • Order Pull (consolidated and store-wise) 
  • Order Status Update (supports custom order status updates also) 
  • Order Shipment includes (Order Invoice, Invoice capture (for Prepaid orders), and Order Shipment Update include Tracking info Update)
  • Inventory Push (Both Single and multi-location/multi store) 
  • Inventory Reconciliation (manual)
  • Order Fetch
  • Order Cancellation Pull and Push 


Prerequisites for Channel Configuration

For 1.x integration with Vin ERP, the client must have the below information ready:

1.  API URL: The Base API URL of the Magento for SOAP/1.x version would be like: https://www.clientbackendadmin.com/index.php/api/soap https://www.clientbackendadmin.com/api/soap

2. Username: This is the login Username of Magento backend/Magento Admin portal

3. Password: This is login Password of the Magento backend/Admin portal. This username and password will also be used to generate the API tokens.

4. API Key: This is the API Key (for SOAP/1.x Magento users) generated by the client as per the process mentioned below. (how to generate API key)

5. Pull Order on Store Id:  Choose “Yes” to enable the store wise order pull for Magento. 

Process: If the client has 5 stores, then 5 channels must be created in Vin e-Retails. API credentials of these channels will remain the same.  We need to enable “Pull Order Flag” by selecting “Yes” from the dropdown and mention the store Id of that location in the Store ID field. 

Note: If this config is not enabled, orders of all stores will be pulled in 1 channel only.

6. Store Id:  If the “Pull order on Store Id” config is enabled, then put the correct store Id in this field. If the Pull order on the Store Id config is not enabled, then put the store ID value as 1 (1 is the default store Id of Magento).

7. Custom Inventory Push URL (If Any): If there is an extension or plugin is used by the client to update inventory, this field is used to Update the API URL of the inventory Update. Example: for Advance inventory plugin, it is: https://www.clientwebsite.com/eretail/EretailWarehouseInventory.php 

8. Enable In stock for inventory (For SOAP only): This flag is used to mark the product status as “In Stock” on Magento even If the inventory is zero. 

9. Enable Shipment/Invoice Capture-Y/N (For SOAP only): This Flag is used to enable the Invoice Capture API (API used to update the payment captured for Prepaid orders) for Magento 1.x/SOAP users. 

10. Pull Tax from Magento: This flag is used to pull tax from Magento and is applicable to International Magento users. 

11. Is B2B: This flag is used to enable the Item Cancellation push from Vin e-Retails to Magento.  If B2B Flag is enabled, Vin e-Retail performs the below actions on orders:

  • The partial line on Magento is closed, to do this Vin e-Retail will call the invoice API first and then call the Credit memo API for that line item whenever an item is closed in ERP
  • Updating the Shipment No./Builty No. of that order Shipment to Magento


Process to generate an API key

The client must share the API credentials of Magento. It can also be obtained by following the below steps:

1. Login to Magento Admin with the Username and Password.

 

2. Create New API Role

a. Go to System > Web Services > SOAP/XML – RPC roles

b. This page shows a list of existing roles OR you can create a new role by choosing “Add new Role.”

Note: Every role needs a name. Just ensure it is descriptive enough for use.

c. Next, insert the role you want to add, in this step, you need to insert your admin password again to confirm.

d. The second tab on the left (Role Resources) allows you to select which resources should be available for users with this role. While you can select exactly which privileges are given, it enables the new role to pull information from your website. 

e. You may choose to give “All” access or You can “Customize” it by manually clicking to each access.

f. Once you are done, click on “save roles” to save your configuration.

3. Create a New API User: Once the role is created, you can add a user that makes use of this role. To create a new API User, follow below steps:

a. In Magento back end, go to System > Web Services > SOAP/XML – RPC Users

b. On this page, the existing users are listed. Go to the “Add New User” button on the top right. You need to insert the information for the following fields: 

  • User Name (e.g. Vinculum)
  • First Name 
  • Last Name 
  • Email 
  • Current Admin Password
  • API Key and confirm the key again in the API Key Confirmation field. In this field, choose a verification key or password. 


Note: The fields First Name, Last Name, and Email just need to be filled in with any value you like. Make sure the Username and API Key are secure enough and you must note/remember them for future use. If any third party wants access to your Magento store, you are required to provide them a USER ID in a similar way.

 

c. The second tab on the left is called User Role, and that is where you select the role earlier created. Then, Save User.

This is how you can configure and find your API Key in Magento 1.x website. Copy the API Key and Username and input this information in the channel configuration step in Vin ERP.

 

Channel Configuration

 

Follow the below process to configure Magento on the Vin ERP instance.

1. Once the required information is gathered, login to your Vin ERP instance and go to “Manage channels” under Sales Section.

 2. Go to the top right-hand side of the window and click on “Add New.”

 

 

3. Pick the channel from the list.

4. Fill in all the details like Channel Name, order Source WH, Order Sync from date, Return Sync from Date, Inventory Sync Method, Enable Inventory Reconciliation, etc. as per the Channel Maintenance window. (Given in the table below)

5. Click on “Configure Interface.” Fill in the information as the details are provided in the “Prerequisites” section.

6. Click on “OK” and click on “Save.” A new channel will be created with channel code.



Channel Maintenance

Channel Maintenance setup helps the client to reduce manual intervention and avoid the multiple usages of the website. With the selection of below options at the Channel Maintenance window (Sales > Manage Channels > Add New > Select Magento) in Vin E-retails instance, the User can get the advantage of using multiple features of Vin E-retails:


S.No.

Feature(s)

Where to Click

Dropbox/Checkbox option

Details

1.

SKU Pull

Channel Maintenance>

Channel SKU>SKU Sync>Pull/Push

 

 

 

 

SKU Sync: SKU Sync between Channel and e-Retails can be done via PULL & PUSH.


Users can choose to Pull the SKU’s from the channel to the e-Retail panel.

And User can choose Push to send the SKU data or changes from e-Retail to the channel.

 

2.

Order Pull/Order Pack/Invoice/Order Shipment/Shipping label generation

Channel Maintenance > Orders > Order Sync > Yes/No

 

Order Pull: The user can choose to sync the order from the channel to e-Retail by managing this option. If this is disabled, the Order pull will not happen also the shipping label/Invoice and manifest will not get generated.

3.

Inventory update

Channel Maintenance > Inventory Sync

 

 

Automatically pull and update the inventory


Channel Mappings

There is no ChannelProductId required. Only Magento SKU code needs to be mapped in Channel SKU code, and if the channel SKU code is Null or Blank, we are using Vin-eRetail Display SKU code.