Skip to main content

How to set the connection to Woocommerce

This screen explains the steps to follow to configure the synchronization of products, stock and sales of your WooCommerce (WordPress) ecommerce with your Stockagile account. To learn more about how the synchronization between Stockagile and your ecommerce works you can read the article How the synchronization between Stockagile and ecommerce works. If you want to synchronize only the stock but not the products and their features, please contact our Support through the corresponding section in the platform.

Steps to generate WooCommerce passwords

  1. Make sure we have installed the WordPress WooCommerce plugin. Important to know that we synchronize from Version 5 of Woocommerce.

  2. Once installed, in the WordPress side menu, position the mouse over the WooCommerce button and click on the Settings button in the menu that has opened.

  3. Go to the Settings tab.

  4. In the Advanced tab, click on the REST API button located just below the tabs.

  5. Click on the Add Key button.

    woo-paso 3-add key.png

  6. Here, create a key by filling in the following fields:

    1. Description: Stockagile writes.

    2. User: select an administrator user from the list.

    3. PermitsSelect Read/Write.

    woo-paso 4-information.png
  7. Once you have filled in the fields, click on Save API key.

  8. Next, the screen will show you 2 keys: the Customer Key and the Customer's secret key. These codes will be necessary for the configuration of the page from Stockagile.

woo-paso 6-previsualizacion.png

Steps to set up the creation of the channel in Stockagile

  1. Within Stockagile, drop down the Ecommerce menu on the side menu and enter the Pages view.

  2. Enter inside the configured Ecommerce page. In case you do not have any page configured, select new page at the top right.

  3. A form will automatically open, and here you can fill in the details of our new page; we will have to add (see images at the end):

    • Platform: in this case Woocommerce.

    • Name: will be used to identify the channel within Stockagile.

    • Web URL: you must include the https:// at the beginning for it to be valid.

    • Stock warehouses: here you must determine from which warehouses the stock will be issued.

    • Warehouse: this will be the channel's main warehouse.

    • Default fulfillment creation policy: you can choose between the following options:

      • Assign order to channel warehouse: stock will be discounted, by default, from the main warehouse associated with the channel. If the assigned warehouse does not have enough stock to cover the order, this option may generate negative stock in some products. Later, you can regularize the stock through transfers from other warehouses.

      • Assign order to the warehouse that has more stocks: the stock will be discounted from the warehouse that has the most units available for the products in the order. If the assigned warehouse does not have enough stock to cover the order, this option may generate negative stock for some products. If you do not want to hold negative stock, you will need to make a transfer from another warehouse to compensate.

      • Assign Order by Warehouse identifier: automatically assign orders to the corresponding warehouse using the relationship between Shopify locations and warehouses configured in Stockagile. This functionality requires prior configuration. If you want to activate it, you can contact the support team.

      • Split the order among the warehouses with the most stock: distribute the units of the order among the warehouses with the greatest availability of stock for each product, always prioritizing those with the most stock.

      • Split order across warehouses by priority: assign the order to the warehouses that can cover all or most of the order, following the priority order defined for each warehouse in the LOCATIONS section. If no warehouse has enough stock to completely cover the order, it will be assigned according to the established priority order.

    • Default payment method.

    • Ticket configuration.

    • Order serial number: you can create a specific serial number in the Configuration section.

    • Price level: you can also create a specific one for this ecommerce.

    • Consumer key: WooCommerce customer key.

    • Client secret: WooCommerce customer secret key.

    • Brand: the name of the brand attribute in WooCommerce is the attribute that Stockagile uses to load brands in WooCommerce. If not reported Stockagile adds "Brand" to the brand attribute.

    • Minimum stock threshold: when the sum of the stock for a product variant in the channel's stock warehouses is below this value, it will synchronize with 0 stock.

  4. Click on the copy WooCommerce Webhook field button at the bottom.

  5. In the Wordpress side menu, hover over the WooCommerce button and click on the Settings button in the menu that has opened.

  6. Go to the Settings tab.

  7. In the Advanced tab, click on the Webhooks button just below the tabs.

  8. Here, create a webhook by clicking on the Add Webhook button with the following fields:

    • Name: type Stockagile order creation.

    • Status: select Active.

    • Subject: select Order created.

    • Delivery URL: paste the text copied in step 4.

    • Secret: paste only the text just after the "key=" of the text copied in step 4 (the webhook at the bottom of the ecommerce channel created in Stockagile)

    • API VersionSelect Integration with WP REST API v3

      woo-paso 8-secreto.png
  9. Save by clicking on Save webhook and you will see a message informing you that the webhook has been successfully created.

  10. Create another Webhook by clicking again on the Add Webhook button with the following fields:

    • Name: type Stockagile order update.

    • Status: select Active.

    • Subject: select Order updated.

    • Delivery URL: paste the text copied in point 4.

    • Secret: paste only the text just after the "key=" of the text copied in point 4.

    • API version: select WP REST API v3 integration.

  11. Save by clicking on Save webhook.

Did this answer your question?