Magento 2.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 the Integration of 2.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 REST/2.x version would be like: https://www.clientwebsite.com/rest/V1

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

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

4. API Key: The API Key for REST/2.x Magento users are its “User Name.”

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 eRetail. 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): Mark it as “No” or Leave it blank.

9. Enable Shipment/Invoice Capture-Y/N (For SOAP only): Mark it as “No” or Leave it blank.

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 eRetail to Magento.  If B2B Flag is enabled, Vin eRetail 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


How to Add new Integration?

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

Step 1. Open your Magento 2 backend. 

a. On the Admin Panel, Click “System.” In the “Extensions” section, select “Integrations.”

b. In the upper-right corner, click the “Add New Integration” button and complete all the information.

Step 2. In the “Integration” section, do the following:

a. Name: Enter the name of the Integration.

b. Email: Enter the contact email address.

c. Callback URL: Leave it blank.

(Note: Enter the Callback URL where OAuth credentials can be sent when using OAuth for token exchange. We strongly recommend using https://.)

d. Identity link URL: Leave it blank.

(Note: Enter the Identity Link URL to redirect the users to a third-party account with these Magento integration credentials.)

e. In the panel, on the left, choose “API” and do the following:

f. Resource Access: Choose “All.” 

(Note: If you choose “Custom” mark the checkbox for each resource that is needed.)

Step 3. Save “Configuration” and check the results. When complete, click on the “Save” button.

To change the API guest access security setting

a. On the Admin panel, click “Stores.” In the Settings section, select Configuration.

b. Select “Magento Web API” under Services in the panel on the left.

c. Open the Web API Security Setting section, and continue with the following:

d. In Allow Anonymous Guest Access, select “Yes.” 

e. When complete, click on “Save Configuration.”

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 eRetail instance, the user can get the advantage of using multiple features of Vin eRetail:


 

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 eRetail 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 eRetail 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 eRetail 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.