How do I initiate an integration between RetailVista ERP and a Woocommerce webshop?
  • 25 Jun 2024
  • 4 Minutes to read
  • Contributors
  • Dark
    Light
  • PDF

How do I initiate an integration between RetailVista ERP and a Woocommerce webshop?

  • Dark
    Light
  • PDF

Article summary

 

This document describes the necessary settings to allow RetailVista to communicate with a Woocommerce webshop.

In order to use this integration, it is necessary to have a 'Woocommerce integration' license, along with a webshop CAL. The Woocommerce integration is also part of 'Sales Orders Plus'. The integration with Woocommerce supports sending article information and receiving orders. Sending article information involves updating the sales price, purchase price, and stock of articles. The webshop articles marked in RetailVista are used as the basis for this.

API communication settings

In webshop maintenance, Woocommerce must be created as a webshop type. In practice, the API URL has been found to be the same as the webshop URL. However, there may be configurations where this differs. In Woocommerce, an API token can be created under 'WooCommerce/Settings/Advanced', sub-tab 'REST API'. Assign it the name 'RetailVista ERP'. The token must have 'Read/Write' permission.

Now create a webshop in RetailVista using the API tokens generated by Woocommerce. The API URL is the same as the webshop URL. Enter the consumer key as the username and the secret as the password.

In addition to creating the Woocommerce webshop, it is necessary to have a task schedule for sending data to the webshop and retrieving orders from the webshop. Check if this task schedule is present. Starting from the spring 2023 update of RetailVista, these task schedules will be automatically created.

Retrieve orders

A challenging characteristic of Woocommerce is that orders are created immediately when a customer fills a shopping cart. Another difficult problem is that there is no clear order status when an order is completed.

The only useful filtering at the moment is that RetailVista checks whether an order has been paid. Another problem in WC is that the filter for retrieving orders by last modification date simply does not work. For this reason, filtering is currently done based on the creation date of an order, but that is the date and time when a customer started creating a shopping cart. RetailVista currently looks back 48 hours in terms of creation date. Shopping carts that were started more than 48 hours ago are not included in the import. Perhaps future versions of WC will no longer have the bug regarding filtering by last modification date, then retrieving orders will work more reliably.

Regarding payments, Woocommerce only supports 1 payment per order, meaning that only a 'date paid' is received via the API, the paid amount does not seem to be available. Once the 'date paid' field is filled, the total order amount is considered as the payment. 

Send Products

In webshop maintenance, advanced settings can be specified. Some of these settings are default and apply to any webshop integration, see QA833 for example. The settings described in this document only apply to a Woocommerce integration.

ProductIdentifierPrefix=<value>

This setting only applies to so-called 'fallback' article searches. In the webshop settings of RetailVista, it can be configured whether a fallback may be used, and which article field that would be. By default, a search is always performed based on the barcode to find a match in the webshop article data. With the fallback setting, a second way of searching for an article is used, for example from the search text of an article in RetailVista. With this setting, it is possible to indicate that a prefix is used in RetailVista, which obviously does not exist in the webshop itself.An example is the search text value 'WS1234' where the productIdentifierPrefix is set to 'WS'. This code is then removed from the fallback value, leaving only 1234 to search for as a product in Woocommerce. This prefix can be useful to use in RetailVista to make webshop products searchable. If in the above example 1234 had already been used as the search text, a wrong product may be found when receiving webshop orders. With this prefix setting, uniqueness can always be enforced.

SafetyStockQty=<value>

This setting is about safety stock. If this setting is used, 'Value' must be a whole number. This value is subtracted from the RetailVista stock and the result is offered as the stock level to Woocommerce. With safety stock, a slightly lower stock can be shown on the webshop, leaving some room for stock differences, in-store sales, etc.

SkipUnpaid=1

With this setting, it can be indicated that only paid orders are imported. Unpaid orders will be left behind.

County-<Country code>=<value>

In countries like Ireland, the 'County' designation is often used by package carriers, similar to provinces in the Netherlands. The problem is that WooCommerce does not export a full county description but only a code. With this setting, a specific county code can be converted into readable text. It is necessary to enter all counties once, along with their full description. An example of this setting is Country-OV=Overijssel, where the used county code is 'OV'.

Note: During the initial Woocommerce delivery, it was found that for some reason it was essential for a user to be logged in to the Woocommerce back office. If that was the case, there was no connection to the API from RetailVista.Then something like an access denied error occurred (exact text unknown, possibly update this QA if it happens again). It doesn't matter where someone is logged in, as long as they are logged in. It is still unclear whether this problem is exemplary or if it would apply to all Woocommerce websites and versions.


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.