If you are looking for a way to integrate your KeepMyAccount software with your WooCommerce-based online store, you might be interested in the WooCommerce module for KeepMyAccount . This is a separate optional premium module that you can purchase and install in your POS application to enable seamless synchronization of products, stocks, and orders between your physical and online shops.
The WooCommerce module for KeepMyAccount offers the following features: #
– You can sync your product categories from POS to WooCommerce, so you don’t have to create them manually in your webshop. (POS to WooCommerce)
– You can sync your products from POS to WooCommerce, including their images, descriptions, variations and attributes. (POS to WooCommerce)
– You can update your stock levels from POS to WooCommerce, so you always have accurate inventory information on your website. (POS to WooCommerce)
– You can sync your orders from WooCommerce to POS, so you can manage them easily from your POS dashboard. (WooCommerce to POS)
– You can assign different prices for your webshop products using the selling price group feature. This way, you can offer discounts or promotions on your website without affecting your POS prices.
– You can map your taxes between POS and WooCommerce, so you can charge the correct tax rates for your online customers.
– You can view the details of the synchronization process in the logs, so you can troubleshoot any issues or errors that might occur.
– You can set up auto synchronization based on cron jobs, so you don’t have to manually sync your data every time.
– You can customize the products fields that are synchronized during product creation and update, so you can choose what information to share or hide on your website.
– You can synchronize your product prices including or excluding tax, depending on your preference and settings.
The WooCommerce module for KeepMyAccount is a powerful and easy-to-use tool that will help you expand your business online and streamline your operations. To learn more about this module and how to purchase it, please read the details here.
API Settings #
For connecting KeepMyAccount 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
or https://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.
- Once auto-sync is set up 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 inWooCommerce.
- 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 than that POS. For that, you can create a Selling price Group in POS & assign that price group to 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: #
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 UtimatePOS to WooCommerce.
Map Tax Rates: #
This option is used to map the taxes present in KeepMyAccount to that 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 KeepMyAccount, 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 takes up to 30 minutes or above depending on the number of products. Do not refresh or leave the page while synchronization is in progress.
Simple & Variable product 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 on the WooCommerce website to KeepMyAccount.
All newly created or updated orders after the last sync get added to KeepMyAccount. A special tag is also added to the order to mark it as an order from WooCommerce.
NOTE: Auto-sync not working: #
Reason 1:
The auto-sync feature may not be enabled inside the Woo-commerce module.
NOTE: Orders going to draft: #
Reason 1:
When order or sales from WooCommerce is synced with KeepMyAccount, some orders may go to draft when a sufficient quantity is not available in KeepMyAccount.
For example, an order from WooCommerce contains 10 Pieces of Pen, if only 7 pieces are available in KeepMyAccount then instead of skipping the order, it goes to draft. With this, you can add a sufficient quantity of the products and make the order final.
Reason 2:
KeepMyAccount uses the below order mapping.
‘pending’ => ‘draft’,
‘processing’ => ‘final’,
‘on-hold’ => ‘draft’,
‘completed’ => ‘final’,
‘cancelled’ => ‘draft’,
‘refunded’ => ‘draft’,
‘failed’ => ‘draft’,
‘shipped’ => ‘final’
So, for example, if the order is pending in WooCommerce then it will be marked as a draft in KeepMyAccount, similarly for other statuses.
NOTE: Automating Orders sync: #
You can automate the order syncing by using the Order webhook described below.
Reset Synced Categories / Reset Synced Products: #
When you click on sync Products it creates the product present in POS to WooCommerce. And with this, a link is established between the WooCommerce Products & POS Products.
Technically woo commerce products ID is stored in the POS database to create a mapping between them.
After you have Synced the products if you click on “Reset Synced Products” then the link will be broken (technically the woocommerce product id stored in POS is deleted and set to null)
This reset is useful when you’re changing the WooCommerce Website.
After Reset, if you click on Sync Products again then it will check for the same product SKU present in WooCommerce, if not present then it will create the product and store the product id in POS.
Note: deleting products in WooCommerce is not required if the SKU for products in WooCommerce & POS is the same.
The same applies to Categories also.
Using Order Webhook: #
What is a webhook: #
Webhook helps you to get live orders from WooCommerce to KeepMyAccount. Meaning whenever there is a new order in the WooCommerce website it gets sent instantly to KeepMyAccount. 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, and 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 KeepMyAccount.
- 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 the Webhook Secret of KeepMyAccount Order Created.
- Repeat the above process for all others (Order Updated, Order Deleted, Order restored)
After configuring when a new order comes it will also be updated in KeepMyAccount.
Error & Solutions: #
Error 0: #
If the WooCommerce website is running in HTTPS, make sure the APP URL in KeepMyAccount-WooCommerce module App Settings has HTTPS.
If WooCommerce is in HTTP, make the APP URL HTTP.
Error 1: #
Sometimes during synchronizing, you may get the following message/error
“live.EMERGENCY: File:………\vendor\automattic\woocommerce\src\WooCommerce\HttpClient\HttpClient.phpLine:375Message:Syntax error”
Solution:
In your WooCommerce “API Settings” change the “Woocommerce App URL” by adding “index.php” to it.
Example: Change the URL from
http://www.myWooCommerceStore.com to http://www.myWooCommerceStore.com/index.php
Error 2: #
Sometimes in WooCommerce API bulk operations (add/edit/delete) are restricted. So it will give an error like
“Sorry, you are not allowed to batch manipulate this resource. [woocommerce_rest_cannot_
To resolve this error, follow these steps:
- Install & activate the Code Snippet plugin in WordPress. https://wordpress.org/plugins/code-snippets/
- Go to Snippet -> Add New and add a new snippet
- The snippet will have below written codes:add_filter( ‘woocommerce_rest_check_permissions’, ‘allow_bulk_operation’, 10, 4 ); function allow_bulk_operation( $permission, $context, $object_id, $type ) { return true; }
- Save & Activate it.
Now it will allow the bulk operation from API.
If you want to understand it better, check this link: https://wordpress.org/support/topic/restrict-endpoint-on-woocommerce-rest-api/
Error 3: Image not syncing #
Sometimes products don’t sync because of a problem with the image file name and image format.
Solution:
WooCommerce has some restrictions which can be fixed by following this:
- Disable image sync by going to
- API Settings > Product Sync Settings > Product fields to be synced with woocommerce while creating products
- API Settings > Product Sync Settings > Product fields to be synced with woocommerce while editing products
- Uncheck Image and save
- They try to sync again.
OR do this:
- Try replacing all product images with jpeg or png format.
- Shorten the file name length as well for the images.
Error 4: #
Not syncing issue.
Solution:
Follow the below steps:
- Open the WordPress website .htaccess file
- Add these 2 lines at the very top of the htaccess file, similar to the below screenshot: RewriteEngine on
SetEnvIf Authorization .+ HTTP_AUTHORIZATION=$0
- After adding it, save the file and try to sync from KeepMyAccount once again.
Troubleshooting steps to be followed if synchronization doesn’t work #
Check if the timezone of KeepMyAccount Setting matches the time zone of WooCommerce.
Check whether these permissions are set for Webhook.
- Go to Woocommerce > Settings > Advance > Rest API (Select Rest API here)
- Enable Read/Write permission for User
- The WordPress permalinks option should be set to “Post Name”
- If still doesn’t work try to reset the permalink.