WooCommerce
Functions and settings available for the WooCommerce endpoint
Tutorials
WooCommerce integration setup tutorials:
Functions
The following list of functions are available in the WooCommerce system:
GetCoupons
Function for retrieving coupon information from WooCommerce via the REST API. For more details on the schema that is returned from WooCommerce and filters that are available please see the documentation at: https://woocommerce.github.io/woocommerce-rest-api-docs/#list-all-coupons
This function is has the following filters that are commonly used:
Filter
Example
Description
after
filter_after = "CURRENT -15 minutes"
Used to filter coupons that have been created/updated in the previous 15 minutes.
GetCustomers
Function for retrieving customer data from WooCommerce via the REST API. For more details on the schema that is returned from WooCommerce and filters that are available please see the documentation at: https://woocommerce.github.io/woocommerce-rest-api-docs/#list-all-customers
This function has the following filters that are commonly used:
Filter
Example
Description
after
filter_after = "CURRENT -15 minutes"
Used to filter customers that have been created/updated in the previous 15 minutes.
GetOrders
Function for retrieving sales orders from WooCommerce via the REST API. This function is has the following filters that are commonly used. Please also review the filters in the official WooCommerce (https://woocommerce.github.io/woocommerce-rest-api-docs/#list-all-orders) documentation which can also be used in the same filter_
prefixed way in the HighCohesion control panel.
Filter
Example
Description
after
filter_after = "CURRENT -15 minutes"
Used to filter orders that have been created in the previous 15 minutes.
To reduce bandwidth and speed up your integration, consider using WooCommerce web hooks that work natively with the HighCohesion system.
GetProducts
Function for retrieving products from WooCommerce via the REST API. For more details on the schema that is returned from WooCommerce and filters that are available please see the documentation at: https://woocommerce.github.io/woocommerce-rest-api-docs/#list-all-products
This function is has the following settings available:
Filter
Example
Description
after
filter_after = "CURRENT -15 minutes"
Used to filter products that have been created in the previous 15 minutes.
PostCustomer
Allows the creation and update of customer records in the WooCommerce system. For details on the WooCommerce customer schema, please visit: https://woocommerce.github.io/woocommerce-rest-api-docs/#create-a-customer
PostProduct
Allows the creation and update of products inside of the WooCommerce system. Public transformation files are available in the HighCohesion control panel. For details on the WooCommerce product schema, please visit: https://woocommerce.github.io/woocommerce-rest-api-docs/#create-a-product
The following settings are available for this function:
Setting
Values
Description
allow_product_search
true
/ false
If set to true
the function will allow the lookup of existing product when the id
has not been set in the payload. As default the system will attempt to match the slug
search_key
Valid search key from the WooCommerce product API.
Defaults to slug
, can optionally be set to sku
or attribute_term
PostOrder
Allows the creation and update of orders inside of the WooCommerce system. For details on the WooCommerce customer schema, please visit: https://woocommerce.github.io/woocommerce-rest-api-docs/#create-an-order
Setting
Values
Description
allow_order_update
true
/ false
If set to true
the function will allow the update of existing orders when the id
has been set in the payload out.
PostShipment
Allows the creation of shipment tracking records against sales orders inside of the WooCommerce system. For details on the WooCommerce customer schema, please visit: https://docs.woocommerce.com/document/shipment-tracking/#section-9
Shipments require the Order ID to successfully post. However the HighCohesion system will accept either an order_id
field or an order_number
field in the payload out. If you provide the order number field, the function will attempt to lookup the order id before it posts to shipment information.
There are no additional settings for this function.
Functions lists are expanding weekly, this list was accurate at the date of publishing.
Settings
The following settings below are optional for WooCommerce integrations.
Web hooks
WooCommerce web hooks work natively with the HighCohesion system and can be easily setup via the WooCommerce settings area in Wordpress. Follow the steps below to setup the most common Sales Orders web hook, from WooCommerce to HighCohesion:
Login to your Wordpress system and click on the WooCommerce > Settings link from the left hand navigation.
Once on the settings page, click on the "Advanced" tab at the top of the page.
Next click on the "Webhooks" link at the top, just below the tabs.
Now the web hooks page is shown, click the purple button that says "Create new web hook".
On the new web hook form, enter the following information:
Name - Give the web hook notification a name, e.g.
Sales orders to HighCohesion
.Status - Set to
Active
Topic - Select the top that you want to be notified about, in this examples "Order Create"
Delivery URL - Set this to your web hook URL for your stream, (see how to create one here)
Secret - Leave blank
API Version - Select the version required, most select V3.
Once complete, now press save and the WooCommerce system will be setup to send HighCohesion notifications when new records are created.
For a guide on how to generate your HighCohesion web hook URL, please click on this link.
Last updated