Woo Commerce

WooCommerce & ERPAG integration

The era of the overall digitization and transition of the business from paper to digital media has brought many benefits and accelerated the development of companies. The emergence of the CLOUD Internet service and the enabling of business without the physically present borders additionally contributed to the development. Sales on the Internet have been growing for years, and the number of services that enable this type of sales is increasing every day. WooCommerce is one of such services and distinguishes itself from the others with its quality.

In order to enable ERPAG users to sell through the WooCommerce service, ERPAG enabled the connection between these two services using the Application Programming Interface (API).

By connecting ERPAG and WooCommerce, the user gets the following benefits:

1) Complete Inventory Management (Sales, Procurement, Stock Status, Production, Ordering, Packaging, and Shipping) from the ERPAG side;

2) ONLINE sales from WooCommerce;

3) Updating items in WooCommerce (sending from ERPAG);

4) Updating the quantities (stock) in WooCommerce (sending from ERPAG);

5) Updating items in ERPAG (downloading from WooCommerce);

6) Downloading Sales orders from WooCommerce to ERPAG.

In the synchronization process, ERPAG relies solely on the SKU. So, if you already have items defined in WooCommerce, make sure that each product and its variation have a unique SKU.

Preparing and setting up WooCommerce

The first step for successful connecting is to define the API keys in WooCommerce. Open the browser and log in to your Wordpress. Then click on the "WooCommerce" link as shown in the picture and turn on the "Enable the REST API" option. The Enable the REST API option must be turned on so that the access is enabled by ERPAG. If the option is disabled, no access and operation with the REST API is possible.

By clicking on the Keys / Apps link we get to the list of all API Keys. The API keys shown on the list can not be changed or re-displayed. When you generate it, the key will only be displayed at that moment, and if you do not write it down, you will have to delete the existing one and generate a new key.

It is necessary to fill in ie. select options for the three fields before generating the API Key. Put a meaningful Description in order to know later on why did you generate the API Key. Select the user from the offered ones, it is recommended for it to be the administrator of your site. Permission should be set to Read / Write, due to synchronization for Erpag which is bidirectional. After you complete filling in the fields, click on the Generate API Key button, and you will get the following screen.

Capture a text file with the following information as you will need them to enter them in ERPAG:

1) Consumer key (API Key);

2) Consumer secret (API secret);

3) The URL in the form http:// or https:// + the address of your shop + /wp-json/wc/v2/

Preparing and setting up ERPAG

In order for ERPAG to communicate with your WooCommerce store, you must enter the previously received API keys in ERPAG. Log into ERPAG using your ERPAG account and activate the "Web Shops" option from the "Sales" menu.

The next step is to add a new WebShop.

In the following form, besides entering the WooCommerce API keys, the setting of the synchronization mode is also made. How data synchronization will take place depends on your business process and varies from case to case. That's why we will explain each option in detail, and you will decide for yourself which model best suits you.

Panel - DOCUMENT HEADER

The Warehouse field will only appear if more than one warehouse is defined in ERPAG. Choose the default warehouse.

Enter the name of your Shop in the Description field. This name will later be shown through the synchronization process, and you will know which WooCommerce account you are synchronizing with.

In the Synchronized field, enter the starting date and time from which ERPAG will begin to download Sales Order. Later, at each synchronization, ERPAG will correct this information to the date of the last Sales Order taken over.

You can turn on or temporarily turn off sync with WooCommerce in the Status field.

In the Update qty to webshop box, select whether you want ERPAG to update the stock status in your shop.

Panel - API-SETTINGS

Enter the API Key, the API Password, and the URL, and then click on the VERIFY button to verify that the API data is entered correctly. When connecting to your WooCommerce, ERPAG will check whether you have correctly set up the permissions settings that you defined through the API Admin panel in WooCommerce (described in 'Preparing and Configuring WooCommerce').

Panel - CONFLICT RESOLVER

At the beginning of this text, we said that ERPAG synchronizes with WooCommerce by searching products based on their SKU. When the SKUs are different, the following processes will be performed:

- In case the SKU exists in WooCommerce and does not exist in ERPAG, ERPAG will download and create a new Product in the Product and Services list;

- In case the SKU exists in ERPAG and does not exist in WooCommerce, ERPAG will create a new product in your WooCommerce.

Conflict resolver is essential in the situation where identical SKUs are found on both sides.

In the Product field, you can choose which side will win, or which data will be valid:

- ERPAG win - means that the product that is in ERPAG will be considered valid and the product in WooCommerce will be overwritten with the one in ERPAG;

- Webshop win - means that the product that is in WooCommerce will be considered valid and the product in ERPAG will be overwritten the one that is in WooCommerce.

In the Price field, you can choose which side will win as far as the selling price is concerned:

- ERPAG win - means that the selling price for the product found in ERPAG will be considered valid and the selling price for the same product in WooCommerce will be overwritten with the price from ERPAG'

- Webshop win - means that the selling price for the product that is in WooCommerce will be considered valid and the selling price for the same product in ERPAG will be overwritten with the price from WooCommerce;

- Ignore - means ignoring the prices defined in ERPAG and WooCommerce, that is, the prices in ERPAG and WooCommerce remain as they were defined.

Once you have completed all the necessary settings (according to the needs and specifics of the Shop itself), click on the SAVE button to record the changes.

Setting up items for synchronization in ERPAG

ERPAG allows you to create and select the products you want to synchronize with your WooCommerce store. Creating products in ERPAG is already described on the following link https://learn.erpag.com/project/create-new-product-1/untitled-4/basic-definition and in this guide, we will only show details related to WooCommerce.

So enter the Products and Services list and activate the product you want to synchronize with your WooCommerce store.

From the drop-down list, select the webshop with which you want to synchronize (if you can, you can also select multiple webshops).

By choosing one or more web shops, a special panel for each webshop will appear on the form.

In this panel, you can define all the parameters necessary for sending products to WooCommerce. ERPAG will offer you some default values, but you can correct them at any time. The only data you can not select is SKU and Regular Price. The SKU must be identical on both sides so that the synchronization process can function at all. The Regular Price is for informational purposes only and is coordinated with the Price conflict resolver setting in the webshop's own setup (see the chapter 'Preparing and Adjusting the ERPAG', section the 'Panel - Conflict resolver').

Name - may be different from the name of the item defined in ERPAG.

Status - You can choose whether the item will be Published, Pending Review or Draft.

Catalog visibility - you can choose Shop and search result, Shop only, Search result only or Hidden.

This is a featured product - you can choose Yes or No.

Enable reviews - you can choose Yes or No.

Tags - define tags separated by commas (,).

Virtual - you can choose Yes or No.

Allow backorders - you can choose Do not allow, Allow but notify customer or Allow.

Description - you can enter a detailed description of the item.

Short description - you can enter a short description of the item.

In addition to the above-mentioned data from the webshop panel, ERPAG will also take the following data:

- Gross product weight;

- Unit of measure for the weight of product and

- Group of articles;

- Product properties (displayed in WooCommerce as Attributes).

When the setting is complete, record the changes by clicking on the Save button.

Product Synchronization

After setting all the items you want to sync, you can synchronize the same data with your WooCommerce store. From the Product and Services list, click the Web Shops button and then the store with which you want to synchronize the data. Please note that ERPAG will synchronize all products that are defined for synchronization, not just those that you just entered or selected in the list.

The synchronization process takes place as follows:

1) ERPAG reads the product list you have in your webshop;

2) Comparison of items from the WooCommerce list and ERPAG list based on SKU is performed:

a. In case there is an SKU in WooCommerce that does not exist in ERPAG, a new item is created in ERPAG;

b. In the case that ERPAG has an SKU that does not exist in WooCommerce, a new item is added to WooCommerce;

c. In case there is a product with identical SKU on both sides, comparison of other data (name, price, properties, etc.) is made.

i. If data is identical, no synchronization is performed;

ii. If the data are not identical, the correction of the data is done based on the Conflict Resolver.

So, in case that ERPAG determines, during data synchronization, that data needs to be updated using Conflict resolver, you need to know the following:

1) If ERPAG wins - the data in WooCommerce will be corrected in accordance with the information defined in ERPAG;

2) If the Webshop wins - the data in ERPAG will be corrected according to the data defined in WooCommerce.

Also, ERPAG will adjust the price of products according to the configuration in Conflict resolver:

1) If ERPAG wins - the price in WooCommerce will be adjusted in accordance with the price defined in ERPAG;

2) If the Webshop wins - the price in ERPAG will be adjusted in accordance with the price defined in WooCommerce;

3) If Ignore - prices remain intact, each side keeps its prices.

In addition to the above operations, ERPAG performs validation of other parameters of the individual product, such as Product variations, Variant names, Variant price, Variant qty, Weight and Weight UOM. In case it is necessary (on the WooCommerce side or on the ERPAG side), ERPAG will automatically create or correct the data in accordance with the Conflict resolver.

Upon completion of synchronization, refresh the list of products in WooCommerce where synchronized data will appear.

Sales Order Synchronization

Orders created in WooCommerce that don't have the status Cancelled, Failed or Trash can be downloaded to ERPAG. ERPAG will not download Orders automatically, you need to log in to ERPAG, activate from the menu Sales option and then select Sales Orders. Now from the Sales Order list, click the Synchronization button and select the webshop.

The process of synchronizing and downloading Sales Orders runs as follows:

1) ERPAG downloads a list of all the orders you created after the last synchronization date (reading the Synchronized date in the Setup of the webshop);

2) Performs a check of products that are in the Orders and, if necessary, synchronizes products with ERPAG;

3) Performs customer check (by name) and if they do not exist, creates them in ERPAG;

4) Creates Sales Orders in ERPAG and loads products with quantities and prices as they are in WooCommerce Order regardless of prices found in ERPAG.

In case that the Orders created in WooCommerce do not have customer information (name, address, etc.), ERPAG will create a Sales Order where it will write Point of Sale in the customer name.

In case that WooCommerce has orders that contain items that have been deleted from the WooCommerce Product List in the meantime, ERPAG will create a Sales Order with a Draft status because it is unable to determine the exact content of the Order. In this case, you need to activate the Sales Order and correct the content yourself - enter the correct products that should be in the Sales Order.

Last updated