Magento 2.0 Integration

The integration between Magento 2.0 and DEAR Inventory allows users with Magento 2.0 stores to synchronise inventory, pull sales information, and synchronise products from their stores to DEAR Inventory and vice versa. DEAR supports up to Magento 2.3.


Magento 2.0 can also be used to process payments without managing inventory.


For information on integrating DEAR Inventory with Magento 1.0, see Magento Integration.


NOTE: If using translation or localisation apps in Magento, ensure that base attribute values (colour, etc.) are in English. Base attribute values not in English can cause problems when listing products.


Prerequisites


Table of Contents

  1. Magento Integration Setup
  2. Catalogue
  3. Bulk Listing
  4. Orders and Sales


Magento Integration Setup

[back to top]


The first step involves connecting DEAR to your Magento store. You will need admin access to Magento to set up the integration. DEAR provides two free external integrations with the standard subscription plan; however, additional external integrations must be purchased from the My Subscription page.


Setup in Magento

[back to top]


Before integrating your Magento 2 store with DEAR Inventory, the following must be performed:

  1. Create a new role for users who will be given access to DEAR Inventory
  2. Either create a new user and assign them to the new role or assign an existing user to the new role
  3. Add integration settings for DEAR Inventory in Magento.


To Create a New User Role
[back to top]

  1. Log on to the Admin Panel of your Magento store.



  2. On the Magento Admin Panel, click System > User Roles.



  3. On the Roles page, the list of roles in your Magento shop is displayed. For a new installation, this list will be empty.
  4. Click Add New Role.



  5. On the Role Info tab, name the role and enter the admin password.



  6. Click the Role Resources tab, then set Resource Access to All. Click Save Role.



    After adding the new user role, you can either 1) create a new user and assign them to the new role, or 2) assign an existing user to the new role


To Create a New User and Assign them to the Role
[back to top]

  1. On the Admin Panel, click System > All Users.



  2. Click Add New User.



  3. On the User Info tab, enter the user info. User Name will be required to integrate with DEAR Inventory. All the other fields are just general information required for Magento user registration.



  4. Under the Current User Identity Verification section, enter the admin password.
  5. Click the User Role tab, select the newly created role for the user, then click Save User.


To Assign an Existing User to the Role
[back to top]


You may also assign an existing user to the new role. To do this:


  1. On the Admin Panel, click System > All Users.



  2. On the Users page, the list of existing users is displayed. On this list, search for the user to be assigned to the new role.
  3. Click the user record once found.
  4. On the User Information page, click the User Role tab, then select the newly created role for the selected user.
  5. Click Save User.


Adding Integration Settings for DEAR Inventory in Magento

[back to top]


Next, you will need to add and activate the integration settings for DEAR Inventory in Magento. 

  1. On the Magento Admin panel, click Systems > Integrations.



  2. Click Add New Integration.

     
  3. On the Integration Info tab, enter a name for the integration, then enter your admin password under the Current User Identity Verification section.



  4. Click Save to add the DEAR Inventory settings to the list of integrations for your Magento Store on the Integrations page.
  5. You will then need to activate the integration. To do this, click the Activate link.



  6. On the next page, click Allow. Magento then generates the integration tokens for DEAR Inventory.



  7. Copy the Consumer Key, Consumer Secret key, Access Token key and Access Token Secret key, and store them in a secure place. You will need these keys when you start connecting Magento to DEAR.



  8. Click Done.


Connecting Magento to DEAR

[back to top]


It is possible to link several Magento stores to a single DEAR account. Each linked store has an independent catalogue, logs and settings. DEAR provides two free external integrations with the standard subscription plan, however, additional external integrations must be purchased from the My Subscription page. 


To connect Magento to DEAR:  

  1. Navigate to Integration > Magento.
  2. Click + to connect a new store. 
  3. Enter your Magento shop details, including the Consumer Key, Consumer Secret key, Access Token key, and Access Token Secret key you generated in Adding Integration Settings for DEAR Inventory in Magento (described above).
  4. Click Connect to Magento.


Upon successful connection, you will be redirected back to DEAR. Repeat the procedure to connect as many Magento accounts as you require.


Integration settings

[back to top]


On the Setup tab, the shop website box is prefilled with the URL of the Magento store that has been integrated with DEAR. Other than this, several integration settings can be customised.


Order Capture

This option specifies when a Magento order will be captured in DEAR – when it is created, when it is paid or when it is in any the following states:

  • Processing
  • Complete
  • Refunded
  • Closed.


This setting is also taken into account when downloads of historical orders from Magento are triggered.


Consolidate Orders

DEAR - Magento Integration allows two options for order consolidation:

  • No Consolidation

  • Daily Consolidation.


No Consolidation indicates that sales will be captured from Magento as they occur. 

Daily Consolidation will consolidate all orders from that day into a single order. When Daily Consolidation is chosen, an additional setting becomes available: Consolidation Time. This is your local time when all pending orders aggregated during the day will be processed.


See Pending Order Processing section below for more details.


Customer

For the pending order processing to be successful, an existing customer must be selected.


When the Consolidation Type is Daily Consolidation, this customer is used to create a new sale task which will combine all daily sales. A customer can be created in DEAR just for this purpose.


Use Company as a Customer

In Magento, each sale order has an optional Company field which can be filled in by the customer. 

If you would like DEAR to create a customer using the company name (as opposed to the Customer name attached to the sale order in Magento), select this option.

This parameter only has an effect when the No Consolidation option is selected.


Price Tier

Choose which Price Tier to use as the default price when DEAR syncs products with Magento. Its default value is set to Tier 1.


Sale Price Tier

Choose which Price Tier to use as the sale price when DEAR syncs products with Magento. Its default value is set to Tier 1.


Pick, Pack and Ship Processing Mode

When pending orders are processed by DEAR, new sale tasks are created. This setting tells DEAR if it should try to Auto Pick, Auto Pick + Pack, and Auto Pick + Pack + Ship these tasks. 


This field is set to Draft Order by default. If there is not enough stock on hand to fulfil the order, then Pick will remain as a Draft Order and Pack and Ship won’t be completed. 


If Auto Ship is selected, DEAR does not pick up shipment information from, nor will it create fulfilment in Magento.


This setting can also be set to No Picking.


Location 

Choose the location that will be used to fulfil sales from Magento. Each Magento store may have a dedicated Location within DEAR. The default option, All Locations, will display consolidated stock quantities across all of your locations.


Invoice Status

You can control Invoice Status for Sale tasks created as a result of pending order processing. By default, an invoice will not be authorised and will be in Draft state, adjustable and waiting for authorisation. However, if this setting is changed to AUTHORISED, the invoice will be automatically authorised and created. It can then be synced with your preferred accounting application.


Gift Card Liability Account

DEAR will use this Liability account instead of a Revenue account for Gift Card sales. This account should have the ability to accept payments. If a sale containing a gift card is made, this sale will remain in the Pending Orders area until a Gift Card Liability Account is specified. 


Optional revenue account

This is the revenue account to be used for all sales downloaded from Magento. This will override settings at the Product/Customer level and any other Account mapping. 


Sales Representative Name

This option allows the shop name to be used as the Sales Representative for the sales task.


Update Stock Levels in Magento

By default, DEAR does not automatically update stock levels in Magento. This may be useful if you are manually managing stock levels in Magento and do not want DEAR to update stock levels. Ensure you have the correct stock quantities entered in DEAR before you turn on this option as these values will override the stock quantities in Magento. 


Use Magento as Master source for DEAR products

By default, products are manually maintained in DEAR. This means that product categories and brands from DEAR are uploaded to Magento, updating the information in Magento in the process. Turn on this option if you want Magento to push product categories and brands to DEAR. 


Automatically import stock operations from Magento

Set this option to Yes to automatically import stock operations like transfers from Magento every 10 minutes. 


Export shipping information to Magento

Set this option to Yes to export shipping information from DEAR to Magento.


Send email from Magento

When enabled, this sends an email to the customer from Magento when shipping has been authorised. By default, this is set to No.



Tax Rule Mapping

When a pending order is processed by DEAR, a sale task is created. Each order and invoice line is assigned a tax rule. The tax rules specified in these settings will be used to create these lines. 


DEAR does not apply the tax rule to recalculate tax and is simply using the actual tax amount from the Magento order. This means that if certain products are not Taxable or with varying taxes in Magento, all data and totals in DEAR will look identical to Magento, but with the DEAR tax rule name selected in this setting.


The Tax Free tax rule mapping specified in this setting is used to create these lines for non-taxable products. This tax mapping could be useful for accounting.


In case of tax recalculation, the tax amount will be overwritten with the value calculated by the DEAR Taxation rule.


NOTE:  For US Magento stores, the provided Sales Tax is used instead of Tax Rule mapping.


IMPORTANT: Orders will be loaded from Magento but cannot be processed if tax rule mapping is not yet finished. 


Payment Account Mapping

DEAR can capture payments made against orders in Magento and is able to automatically add payments to a created sale invoice. To do this, Payment Account Mapping must be completed on this integration settings screen. You must choose an account which is able to receive payments from the chart of accounts. 


This setting is not mandatory – if payment mapping is not completed, orders are still captured and downloaded from Magento, but payments must be manually added to invoices in DEAR. Some customers prefer to keep invoices open and then reconcile them with payouts from Magento. 


Disconnect from Magento store

When you disconnect from the Magento store, DEAR removes all associations between DEAR objects and Magento, including Log and Product Catalogue.


Catalogue

[back to top]


The DEAR Magento Catalogue page allows the user to Download products from Magento, list DEAR products in Magento, break the link between a DEAR product and its Magento listing, and update quantities in Magento based on the available stock in DEAR.


Downloading Products

[back to top]


Products can be loaded from Magento to DEAR in the Catalogue tab by clicking Load Products. This operation may take some time, depending on the number of products in your store's catalogue.



Each product variation in Magento must have a unique SKU. Configurable products require individual simple products for each variation. These simple products will have individual SKUs in DEAR.


When downloading products, DEAR tries to match existing products first to avoid creating duplicates. Matching is performed by item or variant SKU.


Data mapping for products between DEAR and Magento is as follows:


DEAR
MAGENTO 2

ProductInfo

Product

EcsFamilyID    id
ProductIDid
VariantIDid
Namename
SKUsku
Categorycategory_id
Type    type_id
Option1NameproductAttribute.options.label
Option2NameproductAttribute.options.label
Option3NameproductAttribute.options.label
Option1ValuesproductAttribute.options.value
Option2ValuesproductAttribute.options.value
Option3ValuesproductAttribute.options.value
Weightweight
Quantitystock_item.qty
MinimumBeforeReorderextension_attributes.stock_item.min_qty

PriceTier1tier_prices.value
PriceTier2tier_prices.value
PriceTier3tier_prices.value
PriceTier4tier_prices.value
PriceTier5tier_prices.value
PriceTier6tier_prices.value
PriceTier7tier_prices.value
PriceTier8tier_prices.value
PriceTier9tier_prices.value
PriceTier10tier_prices.value
CustomField1custom_attributes.attribute_code
CustomField2custom_attributes.attribute_code
CustomField3custom_attributes.attribute_code
CustomField4custom_attributes.attribute_code
CustomField5custom_attributes.attribute_code
CustomField6custom_attributes.attribute_code
CustomField7custom_attributes.attribute_code
CustomField8custom_attributes.attribute_code
CustomField9custom_attributes.attribute_code
CustomField10custom_attributes.attribute_code
CustomFieldName1custom_attributes.value
CustomFieldName3array configurable_product_options
CustomFieldName7int status


Manage the Catalogue 

[back to top]


There are two possible statuses for products in the Catalogue: Not Listed and Listed. To be listed, every item needs to have a description, item image, and default location specified. 


NOTE: Updating products from the catalogue will update the stock level in Magento regardless of the Update Stock Levels in Magento setting status. 


To list a product on Magento:

  1. Under the Catalogue tab, click the product on the list.
  2. Specify an Attribute Set for the product. It is required to specify the Magento Attribute Set in order to create a product in Magento. DEAR products must have an Attribute Set specified to be listed.
  3. Enable or disable stock level syncing at the individual product level.
  4. Click Update on Magento.
  5. Save your changes.


To unlist a product on Magento:

  1. Click on the product in the Catalogue tab. 
  2. Click Unlink to unlist the product. This also deletes the link between the products in Magento and DEAR, although the items remain in both systems.
  3. Save your changes.


To remove a product from Magento:

  1. Click on the product in the Catalogue tab. 
  2. Click Remove from Magento.
  3. Click Save.

 

Bulk Listing

[back to top]


All products in DEAR can be bulk-listed to Magento through the Bulk Listing tab. If products are already listed, this action will update them.


To list products on Magento in bulk:

  1. Go to the Bulk Listing tab.
  2. Select products to upload in bulk. You can select products by Category, Family, Product Tag, Attribute Set, and Listing Status, and through manual search.

NOTE: If you have multiple stores in another sales channel, e.g. two different Shopify stores, these will be displayed separately in the list of sales channels from which products can be selected for upload.


  1. To automatically enable products in Magento after the bulk listing, set the Create products in enabled status button to Yes.
  2. Specify an Attribute Set for the product. It is required to specify the Magento Attribute Set in order to create a product in Magento. DEAR products must have an Attribute Set specified to be listed.
  3. Click Start to upload all selected products.



Orders and Sales

[back to top]


Processing Pending Orders

[back to top]


When a Magento store is connected to DEAR, automatic notifications are triggered when orders are created, when their status is changed, and when they are cancelled or deleted. 


Depending on the Order Capture setting, DEAR will capture a Magento Order and save it as a pending order when it is created, paid, or in any of the following states: Processing, Complete, Refunded, Closed. It may take up to 10 minutes for the order to be picked up by DEAR because Magento may send notifications with some delay.


Whenever a sale is captured from Magento, it is first placed into Pending Orders, and stock is allocated immediately. 


If integration setting = No Consolidation, DEAR imports new orders immediately as individual sales orders. 


If integration setting = Daily Consolidation, DEAR imports new orders once daily as a consolidated sale order. 


If No Consolidation is selected, each Magento sale is converted into an identical sale in DEAR, keeping the same customer and shipping information. If Daily Consolidation is selected, the single daily sale task will use the customer selected in the integration settings, and customer, billing and shipping information imported from Magento will be ignored. 


When a Magento order is cancelled or deleted, DEAR automatically finds and voids the corresponding sale task, if created. If the order has not yet been processed, DEAR removes the associated pending order.


When processing orders, the logic is identical to that of the DEAR UI. DropShipping, Kitting and other important scenarios are implemented in the same way as through the DEAR UI.


Pending Orders can be processed manually by clicking Process, which writes the orders into DEAR as sales tasks. They can then be viewed under the Log tab.



Loading Customers

[back to top]


The Load Customers button can be found next to Load Products. 



This function downloads all customers from Magento to DEAR. If the customer already exists in DEAR, this function updates any details that have been changed in Magento. As DEAR automatically creates customers when processing sales orders (if the No Consolidation option is selected), this function is generally only used for testing purposes. 


This function creates a customer in DEAR with Contact, Billing and Business addresses captured from Magento. It is not possible to upload Customers from DEAR to Magento. 


Downloading Orders and Payments

[back to top]


Orders are automatically downloaded if their status in Magento is changed (for example, a customer pays for an order). 


NOTE: Generally, you do not need to trigger manual downloading of orders. However, if an order was not captured by DEAR or if you want to load historical sales, you can click the Load Orders button to manually load the orders from Magento.


All loaded orders are saved to the Pending Orders section, which serves as temporary storage of all sales and payments in DEAR. If an order already has an entry in the Log, i.e. it was imported previously, it will be skipped. This guarantees that no duplicate sales will be created by DEAR.


While saving orders, DEAR captures customer information, billing and shipping addresses. All line items are captured together with quantities, prices and totals. Total order discounts are applied as are additional charges to the whole order, without distribution by lines to reduce the chance of discrepancy.


Shipping and handling are also saved as additional charges in the Sale invoice under Shipping.


If a Payment Account has been specified in Setup, DEAR will always assign associated payments to the captured Magento orders.


When a Magento order is cancelled, DEAR automatically finds and voids the corresponding sale task if already created as a Sale Order or just removes the associated pending order if not yet processed.


The final step in the order download is to trigger the update of stock levels in other Magento stores and other connected eCommerce channels. This is performed by clicking Update Quantities in Magento from the Catalogue tab.



Updating Fulfilment in Magento

[back to top]


When a shipment is authorised in DEAR and the carrier is specified, DEAR will try to create order shipment information in Magento. This will only work in the No Consolidation processing mode.


Logs

[back to top]


Each captured Magento order, once saved to Pending Orders, creates a Log entry to track the link between the Sale in DEAR and in Magento. This eliminates the possibility of creating duplicate orders when capturing the same order several times during manual order load.


Each Log entry has a link to the sale task in DEAR. Depending on the settings selected by the user in the Setup tab, this sales task could be draft or authorised, one or more of the Pick, Pack and Ship tabs could be authorised, and payment could have been applied to the invoice. 


Log entries allow you to see which Sale task reflects a particular Magento sale. You also have the option to delete a Log entry manually. This will allow reprocessing of the order if required. Deleting a log entry will not void or delete its associated sale task.

To view the details of a specific sale task log record, click the Sale Task no. This opens the Sale Task Details in another browser window or tab.



To delete a specific log record, click the Delete icon. This allows the sale task to be reprocessed if required.



Reloading Orders from Magento

[back to top]


If for any reason you need to reload an order from Magento, this can be managed from DEAR.


To reload an order from Magento:

  1. Void the sale task. A record of this will be kept in DEAR for reconciliation purposes but the transactional data will be deleted. 
  2. Return to the Magento integration Log tab and delete the Log entry. This will allow the order to be recaptured from Magento.
  3. Navigate to the Pending Orders tab and click Load Orders, making sure the date is set to before the order to reload was made.


Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.