How should an integration between RetailVista and Magento2 be set up?
  • 03 Jul 2024
  • 3 Minutes to read
  • Contributors
  • Dark
    Light
  • PDF

How should an integration between RetailVista and Magento2 be set up?

  • Dark
    Light
  • PDF

Article summary

<span class="fr-marker" data-id="0" data-type="true" style="display: none; line-height: 0;"></span><span class="fr-marker" data-id="0" data-type="false" style="display: none; line-height: 0;"></span>This document describes the one-time setup of an integration between RetailVista and Magento2 websites. With this integration, RetailVista sends product data to Magento and retrieves orders.

Licenses 

In order to use the Magento2 integration from RetailVista, a license for 'Sales Orders Plus' and a license for 'Integration Magento2 webshop' must be present, along with a webshop CAL.

Webshop

In maintenance webshops, a new webshop must be created. The type must be set to 'Magento 2' and the API URL must be provided as the address of the webshop. The Magento2 integration assumes that the API REST services can be found in the subfolder /rest behind a webshop.

Magento2 can be accessed from RetailVista in 2 ways in terms of authentication. The first authentication method is based on basic authentication, which requires a username and password. This method of authentication is only usable if 2FA (Two Factor Authentication) is not used. If that is the case, token-based authentication must be used. In that case, an API key (access token) from Magento2 is required for RetailVista to perform communication. This token must not expire in terms of lifecycle. This API key must be added in advanced settings using the syntax ApiKey=<Token value>, where <Token Value> must be replaced with the access token from Magento. If an ApiKey setting is found, any specified username and password will be ignored.

Orders

The RetailVista Magento2 integration retrieves orders that have been created since the last synchronization.

When starting this integration for the first time, all orders located in Magento will be retrieved. If this is not desired, a date and time can be specified from which orders will be accepted using the advanced setting 'SkipCreatedBeforeDateTime'. The format is yyyy-MM-dd HH:mm and must be applied accurately, with 2 digits for the month, 2 digits for the day, and the addition of a time component.

An example of this setting to only accept orders created after January 24, 2022 at 15:12: SkipCreatedBeforeDateTime=2022-01-24 15:12

Payments

In Magento2, there are configurations where no payment type code is provided for a payment. The advanced setting 'PaymentTypeCode' can be used to specify a code to use in situations where this payment type code is missing.

Example:

PaymentTypeCode=Ideal

Furthermore, in Magento configurations, a 'prefix' code is sometimes added to a payment type code. This can make the code too long (RetailVista supports up to 20 characters) and sometimes fictitious. The setting 'PaymentTypeCodeRemoveLeader=<Code>' can be used to specify a value that will be automatically removed if a payment type code starts with it.

Example:

PaymentTypeCodeRemoveLeader=buckaroo_magento2_

Now, if a payment type 'buckaroo_magento2_ideal' is received, the final payment type code will be 'ideal' due to this setting. This code will ultimately be written in the RetailVista order message, and during processing, a deposit type with the code 'Ideal' will be searched for. Therefore, it is important to activate this setting before receiving an order message, as it determines the content of the message! If this setting is added afterwards, manually modify the content of the message if necessary.

Deposits

It is possible on webshops to choose payment for an order by bank transfer. Magento also makes such a payment, with the risk that RetailVista sees it as a normal deposit. By using the setting 'PaymentCodeToPrepaymentRequest=<Code>', this type of payment can be automatically converted into a deposit request during order processing.

Example:

PaymentCodeToPrepaymentRequest=banktransfer

This ensures that if a payment of type 'banktransfer' is found, the amount will be converted into a deposit request. The financial administration will have to use the received payments to offset against the outstanding deposit request.

Transport

Magento does not mention a chosen delivery/shipping method in the order. By using the advanced setting 'TransportTypeCode=<code>', a fixed transport type can be specified. All incoming orders will be assigned the specified transport type.

Example:

TransportTypeCode=Pakketpost

Products

The Magento2 integration also synchronizes product information. The synchronization updates the stock and price of products that exist in Magento2. This is done using the products marked as a webshop in RetailVista. For these products, the available stock and selling price are taken over during a mutation. If a product is removed from the webshop in RetailVista, the synchronization adjusts the visibility so that the product is no longer visible in Magento. The product synchronization with Magento2 is based on the standard barcode of the product. If the product cannot be found in Magento2 with that barcode, the product is ignored.

It is possible to cautiously start an initial synchronization with an existing Magento2 webshop.This is possible by using the advanced setting 'SyncProductNumber=<value>'. If that setting is active, only that product will be synchronized. If it turns out that the stock and price of that product are correctly transferred, then it is time to remove that setting and resend all product mutations since a specified date and time.


Was this article helpful?

Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.