WooCommerce Integration
Greenline supports powerful real-time inventory syncing with your WooCommerce online store

WooCommerce connections from Greenline cost an additional $150/month. Contact us to enable the feature for your account.
Your WordPress server
Greenline can only communicate with WooCommerce stores with full SSL/HTTPS encryption supported. If you're on HTTP, please contact your web administrator to set up the encryption.
In your WooCommerce settings, check the following:
-
Your units are in grams
Your units are in grams
API Key setup
-
Login to your Greenline dashboard and navigate to Integrations > Overview
-
Find the WooCommerce block
-
Toggle "Activate the integration" toggle to on (green)
-
An email will be populated to the Greenline onboarding team, they will complete the connection on the back end
-
Once the integration is activated, you will now see a "WooCommerce" tab under the Integrations section of your navigation bar
-
Navigate to this tab to map your product categories and sync your inventory to your WooCommerce page (see the Syncing your Products section below for more information).
Login to your Greenline dashboard and navigate to Integrations > Overview
Find the WooCommerce block
Toggle "Activate the integration" toggle to on (green)

An email will be populated to the Greenline onboarding team, they will complete the connection on the back end
Once the integration is activated, you will now see a "WooCommerce" tab under the Integrations section of your navigation bar

Navigate to this tab to map your product categories and sync your inventory to your WooCommerce page (see the Syncing your Products section below for more information).
Greenline supports WooCommerce REST API v2. Generate your REST API keys here:

Make sure that you provide read and write permissions. Note down the client key and secret, as they will not be made available to you after this screen. On Greenline, copy/paste the fields under Dashboard > Integrations > WooCommerce > Settings.


Make sure that you have an attached inventory location - this is where the inventory sync will pull its values from.
Parked Sales v2 webhook setup (for payments and parked sales)
As of May 2022, we have updated our webhook to allow WooCommerce to create parked sales in the Greenline system.
The new updated Webhook: api/v2/woocommerce/companies/:companyId/order
This new endpoint will allow a parked sale to be created for all WooCommerce sales:
-
If the "Local Pickup" option is selected during the sales transaction on WooCommerce, a "
Pickup
" order will be created in Greenline -
All other orders will be classified as "
Delivery
"-
These orders will be reflected on Alberta compliance reports as "Online sales" as per the provincial reporting specifications
-
-
All products sold must have a matching SKU in the Greenline system or will not be captured
-
Shipping will be captured at its own cost
If the "Local Pickup" option is selected during the sales transaction on WooCommerce, a "Pickup
" order will be created in Greenline
All other orders will be classified as "Delivery
"
These orders will be reflected on Alberta compliance reports as "Online sales" as per the provincial reporting specifications
These orders will be reflected on Alberta compliance reports as "Online sales" as per the provincial reporting specifications
All products sold must have a matching SKU in the Greenline system or will not be captured
Shipping will be captured at its own cost
Managing parked sales:
-
When a customer places a paid order online in WooCommerce, the order should be marked complete in your WooCommerce dashboard. This will create a parked sale in Greenline and will be set as "
Order Placed
" to allow for order management within the Greenline system -
If the parked sale is made into a completed sale from your Greenline POS and then completed in WooCommerce, no duplicate sales will be created
When a customer places a paid order online in WooCommerce, the order should be marked complete in your WooCommerce dashboard. This will create a parked sale in Greenline and will be set as "Order Placed
" to allow for order management within the Greenline system
If the parked sale is made into a completed sale from your Greenline POS and then completed in WooCommerce, no duplicate sales will be created
[Legacy] Sales webhook setup (for payments handled online)
When a sale is made on WooCommerce, you want the sale to show up on Greenline so that the inventory is correctly removed. To do that, go to Dashboard > Integrations > WooCommerce > Settings, and copy/paste the provided webhook URL. Paste that webhook into your WooCommerce API settings page as seen below:

The webhook URL goes into the Delivery URL
field. Make sure that you set the status to be Active
, and the topic to be Order updated
. The API version should be V2. Adding a sale will remove inventory from Greenline.
[Legacy] Sales webhook setup (for payments handled in-store)
Follow the same steps as above for payments handled online, but change the webhook URL from ending in /order
to /pickup
. Set the webhook topic to be Order created
. This will push the order data to Greenline's parked sales queue, which is accessible from any POS device.

If your store is setting up an order-ahead system, here are a few things to keep in mind:
-
Inventory will NOT be removed until the sale is completed.
-
The order number shown on Greenline's parked sales list will be the same as the WooCommerce order ID. The customer should bring proof of order.
-
WooCommerce emails should be your store's main source of pickup notifications.
Inventory will NOT be removed until the sale is completed.
The order number shown on Greenline's parked sales list will be the same as the WooCommerce order ID. The customer should bring proof of order.
WooCommerce emails should be your store's main source of pickup notifications.
30-gram purchase limits
Customers should not be able to purchase more than 30 equivalent grams of dried cannabis. In Greenline, pay attention to the cannabis weight
field in the advanced
section per product. If a product is attached to a compliance category and has a cannabis weight field, that field will be synced to WooCommerce as a custom field and contribute to the 30-gram weight limit. Custom fields can be seen by toggling the screen option:

Note that Greenline's "net product weight" field will be used as the official WooCommerce weight. This is to cover products such as edibles, where the product weight is very different from the dried equivalent weight.
In your theme's functions.php file, add the following snippets:
On a basic Shopkeeper theme installation, the errors will look like the following:

Sync your products
Product syncing is done from the Dashboard > Integrations > WooCommerce > Products page. Here, you will see all of the products and variants available to sync.
Products are matched up between Greenline and WooCommerce using unique SKU values generated by your store. When creating/editing products, please ensure the existence of unique SKUs for all parent products and variants. To simplify the process, you can click the name of a product on this page to go straight to the edit page.
There is a difference between syncing products and syncing inventory.
Syncing products
This will replace your WooCommerce product data with your Greenline data. If you've made a price change on Greenline, or you've updated your product image, you will want to sync your product.
Syncing inventory
Often, you may want a different presentation for your product online vs in-store. For example, you have marked up the price of a product online, shown a different description, put the product in a different online-only category etc. Those changes can be made on WooCommerce, and will not reflect on Greenline. Syncing inventory will keep all the custom changes you've made, and only update the quantities in stock.
Inventory syncs between Greenline and WooCommerce constantly in real-time in the background. For example, if you perform an audit, or if you make a sale, the inventory in Greenline will automatically update the respective product on WooCommerce. You should rarely have to manually sync inventory, if at all.
Setting up Merrco credit card processing
To accept online credit card payments, you must add a payment gateway to your WooCommerce installation. This guide will be going over Merrco - if you use Moneris or any other payment provider, please consult their technical staff for assistance.
To start, install the Merrco plugin from here:
https://woocommerce.com/products/paysafe-payment-gateway/
Make sure you enable the Merrco payment gateway. You can test your transactions by enabling "Enable test mode"

Once in test mode, you can use the following test card numbers to test transactions:
https://developer.paysafe.com/en/rest-apis/cards/test-and-go-live/test-cards/
FAQ
What payment methods are supported?
We support all payment methods that are supported by WooCommerce. We suggest credit cards through either Merrco or Moneris - contact your IT staff or Greenline for help with setup.
If I update my product on Greenline, does my WooCommerce product automatically update?
At the moment, no. Users must go to Dashboard > Integrations > WooCommerce > Products to sync the product changes manually.
How can I stop my products/inventory from syncing?
You can simply go to your Dashboard > Integrations > WooCommerce > Settings page, and clear your url, key, and secret.
What happens if I edit my order on WooCommerce?
If an order is edited (ex. promo product added, customer service decides to include goodies etc.), those changes will not be reflected on Greenline. In cases of manual order editing, we advise the changes to be manually logged in Greenline's master inventory screen.
Should I accept orders on Greenline or WooCommerce?
We suggest using Greenline as the source of truth for inventory and WooCommerce to be the source of truth for everything else. View, accept and respond to orders directly on WooCommerce.