API Settings #
For connecting Bytes POS to WooCommerce, we need to provide the API details of the WooCommerce shop.
- Generating API key: Generate API keys by following this instruction as given in WooCommerce documentation.
- In the permissions select Read/Write access.
- Copy Consumer Key & Consumer Secret and paste them in Woocommerce Consumer Key & Woocommerce Consumer Secret.
- Woocommerce App URL: Enter the URL where WooCommerce shop is set up.
For example http://www.yourstore.com
IMPORTANT: Make sure to add HTTP or HTTPS before the woocommerce app url.
Enable Auto Sync: #
- If you want the products/categories to be auto-synced then enable this option.
- By default, Auto Sync happens everyday night. It can be configured programmatically to make it more frequent. But more frequent means more server load.
- NOTE: Cron job needs to be added for this auto-sync to work. Cron command is shown in “Backup” screen
- Once auto-sync is setup the sync log in the woocommerce module will show the activity log with a regular time interval (the default time interval will be 12 hours).
Product Sync Settings #
- Default Tax Class: WooCommerce assigns a tax class to each item. Here you have to provide the default tax class which is used in WooCommerce.
- Sync Product Price: This specifies if the product price which will be sent to WooCommerce will include tax or exclude tax.
- Default Selling Price Group: Sometime you may want to have a different price in WooCommerce then that is POS. For that, you can create a Selling price Group in POS & assign that price group for WooCommerce. Price Group Document.
- Product fields to be synced with woocommerce while creating products: Here you can select the fields which will get synced to WooCommerce from POS while creating a new product.
- Product fields to be synced with woocommerce while updating products: Here you can select the fields which will get synced to WooCommerce from POS while updating an already created product. This option can be very useful if you want the POS to overwrite some of the fields while updating products.
Using the Module: #
After installation, you will find the WooCommerce menu at the bottom of the left navigation bar. Click on it & go to the Sync menu.
Here you will find the options to sync Categories, Products, Orders & Tax.
Sync Product Categories: #
Click on this Sync button to synchronize the categories & Sub-Categories present in Bytes POS to WooCommerce.
Map Tax Rates: #
This option is used to map the taxes present in Bytes POS to that of the taxes present in WooCommerce.
This is useful for adding related tax for a product during creation & updating.
NOTE: You must map the taxes before Synchronizing Products & Orders.
Sync Products: #
Make sure in the add/edit product(s) you have not checked the Disable Woocommerce Sync
If you have multiple locations in Bytes POS, then the location which is assigned to work with WooCommerce from (API settings -> Business location) should have the products assigned to it.
Sync will work with Single & variable products only.
- Woocommerce can be enabled with only one location which you select in your API settings.
Synchronizing products is a time-consuming task and take up to 30 minutes or above depending on the number of products. Do not refresh or leave the page while synchronization is under progress.
Simple & Variable products synchronization is supported.
It has 2 options:
Sync only new products:
Using this option only newly created products in POS are created in WooCommerce. This option can be less time consuming, again it depends on the number of products.
Sync All: #
Using this option all newly created products are created in POS & existing products are updated. Since it does both the operation of creation & updating it will be more time consuming than the previous option.
The number of products that are not synced will be shown as a popup message near the “sync product” button.
Sync Orders: #
This option is used to get all orders in WooCommerce website to Bytes POS.
All newly created or updated orders after the last sync get added to Bytes POS. A special tag is also added to the order to mark it as an order from WooCommerce.
Using Order Webhook: #
What is webhook: #
Webhook helps you to get live orders from WooCommerce to Bytes POS. Meaning whenever there is a new order in WooCommerce website it gets send instantly to Bytes POS. This is a nice feature present in this module.
Setting up Webhook: #
- Go to WooCommerce -> API settings -> WebHook settings, there you will find Order Created, Order Updated, Order Deleted, Order restored webhook settings containing Webhook Secret & Webhook Delivery URL
- Copy the Webhook Delivery URL for Order Created and create a new Webhook in WooCommerce. For creating Webhook in WooCommerce refer to this document: https://docs.woocommerce.com/document/webhooks/#section-3
- Name: Give any name which you can recognize.
- Status: Active
- Topic: Order Created
- Delivery URL: Paste the order created delivery URL from Bytes POS.
- Secret: keep it blank.
- API version: WP REST API version 2
- Click on “Save Webhook” in WooCommerce.
- Copy the Generated “Secret” from WooCommerce and paste it to Webhook Secret of Bytes POS Order Created.
- Repeat the above process for all other (Order Updated, Order Deleted, Order restored)
After configuring when a new order comes it will also be updated in Bytes POS.