# WooCommerce
# Introduction
The WooCommerce module enables automatic collection of data from your store.
# Example of operation
- Configure the module in the platform by granting access to the WooCommerce store.
- Set up the module on a schedule - data will be collected and stored in the WitCloud data set.
- After processing the table, you can use other reporting modules that are integrated with it.
# Data schema
We collect the most important information from WooCommerce into 3 different tables:
- woocommerce_orders
Expand for the data schema
fullname | mode | type | description |
---|---|---|---|
billing | NULLABLE | RECORD | |
cart_hash | NULLABLE | STRING | |
cart_tax | NULLABLE | FLOAT | |
coupon_lines | REPEATED | RECORD | |
created_via | NULLABLE | STRING | |
currency | NULLABLE | STRING | |
currency_symbol | NULLABLE | STRING | |
customer_id | NULLABLE | INTEGER | |
customer_ip_address | NULLABLE | STRING | |
customer_note | NULLABLE | STRING | |
customer_user_agent | NULLABLE | STRING | |
date_completed | NULLABLE | TIMESTAMP | |
date_completed_gmt | NULLABLE | TIMESTAMP | |
date_created | NULLABLE | TIMESTAMP | |
date_created_gmt | NULLABLE | TIMESTAMP | |
date_modified | NULLABLE | TIMESTAMP | |
date_modified_gmt | NULLABLE | TIMESTAMP | |
date_paid | NULLABLE | TIMESTAMP | |
date_paid_gmt | NULLABLE | TIMESTAMP | |
discount_tax | NULLABLE | FLOAT | |
discount_total | NULLABLE | FLOAT | |
id | NULLABLE | INTEGER | |
is_editable | NULLABLE | BOOLEAN | |
line_items | REPEATED | RECORD | |
meta_data | REPEATED | RECORD | |
needs_payment | NULLABLE | BOOLEAN | |
needs_processing | NULLABLE | BOOLEAN | |
number | NULLABLE | INTEGER | |
order_key | NULLABLE | STRING | |
parent_id | NULLABLE | INTEGER | |
payment_method | NULLABLE | STRING | |
payment_method_title | NULLABLE | STRING | |
payment_url | NULLABLE | STRING | |
prices_include_tax | NULLABLE | BOOLEAN | |
shipping | NULLABLE | RECORD | |
shipping_lines | REPEATED | RECORD | |
shipping_tax | NULLABLE | FLOAT | |
shipping_total | NULLABLE | FLOAT | |
status | NULLABLE | STRING | |
summary_page | NULLABLE | STRING | |
tax_lines | REPEATED | RECORD | |
refunds | REPEATED | RECORD | |
total | NULLABLE | FLOAT | |
total_tax | NULLABLE | FLOAT | |
transaction_id | NULLABLE | STRING | |
version | NULLABLE | STRING | |
billing.address_1 | NULLABLE | STRING | |
billing.address_2 | NULLABLE | STRING | |
billing.city | NULLABLE | STRING | |
billing.company | NULLABLE | STRING | |
billing.country | NULLABLE | STRING | |
billing.email | NULLABLE | STRING | |
billing.first_name | NULLABLE | STRING | |
billing.last_name | NULLABLE | STRING | |
billing.phone | NULLABLE | STRING | |
billing.postcode | NULLABLE | STRING | |
billing.state | NULLABLE | STRING | |
coupon_lines.code | NULLABLE | STRING | |
coupon_lines.discount | NULLABLE | FLOAT | |
coupon_lines.discount_tax | NULLABLE | FLOAT | |
coupon_lines.id | NULLABLE | INTEGER | |
coupon_lines.meta_data | REPEATED | RECORD | |
coupon_lines.meta_data.display_key | NULLABLE | STRING | |
coupon_lines.meta_data.display_value | NULLABLE | RECORD | |
coupon_lines.meta_data.display_value.amount | NULLABLE | INTEGER | |
coupon_lines.meta_data.display_value.code | NULLABLE | STRING | |
coupon_lines.meta_data.display_value.date_created | NULLABLE | RECORD | |
coupon_lines.meta_data.display_value.date_created.date | NULLABLE | TIMESTAMP | |
coupon_lines.meta_data.display_value.date_created.timezone | NULLABLE | STRING | |
coupon_lines.meta_data.display_value.date_created.timezone_type | NULLABLE | INTEGER | |
coupon_lines.meta_data.display_value.date_expires | NULLABLE | RECORD | |
coupon_lines.meta_data.display_value.date_expires.date | NULLABLE | TIMESTAMP | |
coupon_lines.meta_data.display_value.date_expires.timezone | NULLABLE | STRING | |
coupon_lines.meta_data.display_value.date_expires.timezone_type | NULLABLE | INTEGER | |
coupon_lines.meta_data.display_value.date_modified | NULLABLE | RECORD | |
coupon_lines.meta_data.display_value.date_modified.date | NULLABLE | TIMESTAMP | |
coupon_lines.meta_data.display_value.date_modified.timezone | NULLABLE | STRING | |
coupon_lines.meta_data.display_value.date_modified.timezone_type | NULLABLE | INTEGER | |
coupon_lines.meta_data.display_value.description | NULLABLE | STRING | |
coupon_lines.meta_data.display_value.discount_type | NULLABLE | STRING | |
coupon_lines.meta_data.display_value.exclude_sale_items | NULLABLE | BOOLEAN | |
coupon_lines.meta_data.display_value.free_shipping | NULLABLE | BOOLEAN | |
coupon_lines.meta_data.display_value.id | NULLABLE | INTEGER | |
coupon_lines.meta_data.display_value.individual_use | NULLABLE | BOOLEAN | |
coupon_lines.meta_data.display_value.maximum_amount | NULLABLE | STRING | |
coupon_lines.meta_data.display_value.minimum_amount | NULLABLE | STRING | |
coupon_lines.meta_data.display_value.status | NULLABLE | STRING | |
coupon_lines.meta_data.display_value.usage_count | NULLABLE | INTEGER | |
coupon_lines.meta_data.display_value.usage_limit | NULLABLE | INTEGER | |
coupon_lines.meta_data.display_value.usage_limit_per_user | NULLABLE | INTEGER | |
coupon_lines.meta_data.display_value.virtual | NULLABLE | BOOLEAN | |
coupon_lines.meta_data.id | NULLABLE | INTEGER | |
coupon_lines.meta_data.key | NULLABLE | STRING | |
coupon_lines.meta_data.value | NULLABLE | RECORD | |
coupon_lines.meta_data.value.amount | NULLABLE | INTEGER | |
coupon_lines.meta_data.value.code | NULLABLE | STRING | |
coupon_lines.meta_data.value.date_created | NULLABLE | RECORD | |
coupon_lines.meta_data.value.date_created.date | NULLABLE | TIMESTAMP | |
coupon_lines.meta_data.value.date_created.timezone | NULLABLE | STRING | |
coupon_lines.meta_data.value.date_created.timezone_type | NULLABLE | INTEGER | |
coupon_lines.meta_data.value.date_expires | NULLABLE | RECORD | |
coupon_lines.meta_data.value.date_expires.date | NULLABLE | TIMESTAMP | |
coupon_lines.meta_data.value.date_expires.timezone | NULLABLE | STRING | |
coupon_lines.meta_data.value.date_expires.timezone_type | NULLABLE | INTEGER | |
coupon_lines.meta_data.value.date_modified | NULLABLE | RECORD | |
coupon_lines.meta_data.value.date_modified.date | NULLABLE | TIMESTAMP | |
coupon_lines.meta_data.value.date_modified.timezone | NULLABLE | STRING | |
coupon_lines.meta_data.value.date_modified.timezone_type | NULLABLE | INTEGER | |
coupon_lines.meta_data.value.description | NULLABLE | STRING | |
coupon_lines.meta_data.value.discount_type | NULLABLE | STRING | |
coupon_lines.meta_data.value.exclude_sale_items | NULLABLE | BOOLEAN | |
coupon_lines.meta_data.value.free_shipping | NULLABLE | BOOLEAN | |
coupon_lines.meta_data.value.id | NULLABLE | INTEGER | |
coupon_lines.meta_data.value.individual_use | NULLABLE | BOOLEAN | |
coupon_lines.meta_data.value.maximum_amount | NULLABLE | STRING | |
coupon_lines.meta_data.value.minimum_amount | NULLABLE | STRING | |
coupon_lines.meta_data.value.status | NULLABLE | STRING | |
coupon_lines.meta_data.value.usage_count | NULLABLE | INTEGER | |
coupon_lines.meta_data.value.usage_limit | NULLABLE | INTEGER | |
coupon_lines.meta_data.value.usage_limit_per_user | NULLABLE | INTEGER | |
coupon_lines.meta_data.value.virtual | NULLABLE | BOOLEAN | |
line_items.id | NULLABLE | INTEGER | |
line_items.image | NULLABLE | RECORD | |
line_items.image.id | NULLABLE | INTEGER | |
line_items.image.src | NULLABLE | STRING | |
line_items.meta_data | REPEATED | RECORD | |
line_items.meta_data.display_key | NULLABLE | STRING | |
line_items.meta_data.display_value | NULLABLE | INTEGER | |
line_items.meta_data.id | NULLABLE | INTEGER | |
line_items.meta_data.key | NULLABLE | STRING | |
line_items.meta_data.value | NULLABLE | JSON | |
line_items.name | NULLABLE | STRING | |
line_items.price | NULLABLE | FLOAT | |
line_items.product_id | NULLABLE | INTEGER | |
line_items.quantity | NULLABLE | INTEGER | |
line_items.sku | NULLABLE | STRING | |
line_items.subtotal | NULLABLE | FLOAT | |
line_items.subtotal_tax | NULLABLE | FLOAT | |
line_items.tax_class | NULLABLE | STRING | |
line_items.taxes | REPEATED | RECORD | |
line_items.taxes.id | NULLABLE | INTEGER | |
line_items.taxes.subtotal | NULLABLE | FLOAT | |
line_items.taxes.total | NULLABLE | FLOAT | |
line_items.total | NULLABLE | FLOAT | |
line_items.total_tax | NULLABLE | FLOAT | |
line_items.variation_id | NULLABLE | INTEGER | |
meta_data.id | NULLABLE | INTEGER | |
meta_data.key | NULLABLE | STRING | |
meta_data.value | NULLABLE | JSON | |
shipping.address_1 | NULLABLE | STRING | |
shipping.address_2 | NULLABLE | STRING | |
shipping.city | NULLABLE | STRING | |
shipping.company | NULLABLE | STRING | |
shipping.country | NULLABLE | STRING | |
shipping.first_name | NULLABLE | STRING | |
shipping.last_name | NULLABLE | STRING | |
shipping.phone | NULLABLE | STRING | |
shipping.postcode | NULLABLE | STRING | |
shipping.state | NULLABLE | STRING | |
shipping_lines.id | NULLABLE | INTEGER | |
shipping_lines.instance_id | NULLABLE | INTEGER | |
shipping_lines.meta_data | REPEATED | RECORD | |
shipping_lines.meta_data.display_key | NULLABLE | STRING | |
shipping_lines.meta_data.display_value | NULLABLE | STRING | |
shipping_lines.meta_data.id | NULLABLE | INTEGER | |
shipping_lines.meta_data.key | NULLABLE | STRING | |
shipping_lines.meta_data.value | NULLABLE | JSON | |
shipping_lines.method_id | NULLABLE | STRING | |
shipping_lines.method_title | NULLABLE | STRING | |
shipping_lines.total | NULLABLE | FLOAT | |
shipping_lines.total_tax | NULLABLE | FLOAT | |
tax_lines.compound | NULLABLE | BOOLEAN | |
tax_lines.id | NULLABLE | INTEGER | |
tax_lines.label | NULLABLE | STRING | |
tax_lines.rate_code | NULLABLE | STRING | |
tax_lines.rate_id | NULLABLE | INTEGER | |
tax_lines.rate_percent | NULLABLE | INTEGER | |
tax_lines.shipping_tax_total | NULLABLE | FLOAT | |
tax_lines.tax_total | NULLABLE | FLOAT | |
refunds.id | NULLABLE | INTEGER | |
refunds.reason | NULLABLE | STRING | |
refunds.total | NULLABLE | FLOAT |
- woocommerce_products
Expand for the data schema
fullname | mode | type | description |
---|---|---|---|
attributes | REPEATED | RECORD | |
average_rating | NULLABLE | FLOAT | |
backordered | NULLABLE | BOOLEAN | |
backorders | NULLABLE | STRING | |
backorders_allowed | NULLABLE | BOOLEAN | |
brand_name | NULLABLE | STRING | |
button_text | NULLABLE | STRING | |
catalog_visibility | NULLABLE | STRING | |
categories | REPEATED | RECORD | |
date_created | NULLABLE | TIMESTAMP | |
date_created_gmt | NULLABLE | TIMESTAMP | |
date_modified | NULLABLE | TIMESTAMP | |
date_modified_gmt | NULLABLE | TIMESTAMP | |
description | NULLABLE | STRING | |
dimensions | NULLABLE | RECORD | |
download_expiry | NULLABLE | INTEGER | |
download_limit | NULLABLE | INTEGER | |
downloadable | NULLABLE | BOOLEAN | |
external_url | NULLABLE | STRING | |
featured | NULLABLE | BOOLEAN | |
has_options | NULLABLE | BOOLEAN | |
id | NULLABLE | INTEGER | |
images | REPEATED | RECORD | |
manage_stock | NULLABLE | BOOLEAN | |
menu_order | NULLABLE | INTEGER | |
meta_data | REPEATED | RECORD | |
name | NULLABLE | STRING | |
on_sale | NULLABLE | BOOLEAN | |
parent_id | NULLABLE | INTEGER | |
permalink | NULLABLE | STRING | |
price | NULLABLE | FLOAT | |
price_html | NULLABLE | STRING | |
product_brand | REPEATED | RECORD | |
product_type | REPEATED | RECORD | |
purchasable | NULLABLE | BOOLEAN | |
purchase_note | NULLABLE | STRING | |
rating_count | NULLABLE | INTEGER | |
regular_price | NULLABLE | FLOAT | |
related_ids | REPEATED | INTEGER | |
reviews_allowed | NULLABLE | BOOLEAN | |
sale_price | NULLABLE | STRING | |
shipping_class | NULLABLE | STRING | |
shipping_class_id | NULLABLE | INTEGER | |
shipping_required | NULLABLE | BOOLEAN | |
shipping_taxable | NULLABLE | BOOLEAN | |
short_description | NULLABLE | STRING | |
sku | NULLABLE | STRING | |
slug | NULLABLE | STRING | |
sold_individually | NULLABLE | BOOLEAN | |
status | NULLABLE | STRING | |
stock_quantity | NULLABLE | INTEGER | |
stock_status | NULLABLE | STRING | |
tax_class | NULLABLE | STRING | |
tax_status | NULLABLE | STRING | |
total_sales | NULLABLE | INTEGER | |
type | NULLABLE | STRING | |
upsell_ids | REPEATED | INTEGER | |
virtual | NULLABLE | BOOLEAN | |
weight | NULLABLE | STRING | |
attributes.id | NULLABLE | INTEGER | |
attributes.name | NULLABLE | STRING | |
attributes.options | REPEATED | STRING | |
attributes.position | NULLABLE | INTEGER | |
attributes.variation | NULLABLE | BOOLEAN | |
attributes.visible | NULLABLE | BOOLEAN | |
categories.id | NULLABLE | INTEGER | |
categories.name | NULLABLE | STRING | |
categories.slug | NULLABLE | STRING | |
dimensions.height | NULLABLE | STRING | |
dimensions.length | NULLABLE | STRING | |
dimensions.width | NULLABLE | STRING | |
images.alt | NULLABLE | STRING | |
images.date_created | NULLABLE | TIMESTAMP | |
images.date_created_gmt | NULLABLE | TIMESTAMP | |
images.date_modified | NULLABLE | TIMESTAMP | |
images.date_modified_gmt | NULLABLE | TIMESTAMP | |
images.id | NULLABLE | INTEGER | |
images.name | NULLABLE | STRING | |
images.src | NULLABLE | STRING | |
meta_data.id | NULLABLE | INTEGER | |
meta_data.key | NULLABLE | STRING | |
meta_data.value | NULLABLE | JSON | |
product_brand.count | NULLABLE | INTEGER | |
product_brand.description | NULLABLE | STRING | |
product_brand.filter | NULLABLE | STRING | |
product_brand.name | NULLABLE | STRING | |
product_brand.parent | NULLABLE | INTEGER | |
product_brand.slug | NULLABLE | STRING | |
product_brand.taxonomy | NULLABLE | STRING | |
product_brand.term_group | NULLABLE | INTEGER | |
product_brand.term_id | NULLABLE | INTEGER | |
product_brand.term_taxonomy_id | NULLABLE | INTEGER | |
product_type.count | NULLABLE | INTEGER | |
product_type.description | NULLABLE | STRING | |
product_type.filter | NULLABLE | STRING | |
product_type.name | NULLABLE | STRING | |
product_type.parent | NULLABLE | INTEGER | |
product_type.slug | NULLABLE | STRING | |
product_type.taxonomy | NULLABLE | STRING | |
product_type.term_group | NULLABLE | INTEGER | |
product_type.term_id | NULLABLE | INTEGER | |
product_type.term_taxonomy_id | NULLABLE | INTEGER |
- woocommerce_categories
Expand for the data schema
fullname | mode | type | description |
---|---|---|---|
count | NULLABLE | INTEGER | |
description | NULLABLE | STRING | |
display | NULLABLE | STRING | |
id | NULLABLE | INTEGER | |
image | NULLABLE | RECORD | |
menu_order | NULLABLE | INTEGER | |
name | NULLABLE | STRING | |
parent | NULLABLE | INTEGER | |
slug | NULLABLE | STRING | |
image.alt | NULLABLE | STRING | |
image.date_created | NULLABLE | TIMESTAMP | |
image.date_created_gmt | NULLABLE | TIMESTAMP | |
image.date_modified | NULLABLE | TIMESTAMP | |
image.date_modified_gmt | NULLABLE | TIMESTAMP | |
image.id | NULLABLE | INTEGER | |
image.name | NULLABLE | STRING | |
image.src | NULLABLE | STRING |
# Configuration
# Before you start
TIP
To create a module, you will need a pair of keys generated in the panel (Consumer key, Consumer secret). The instructions for creating API keys can be found here: Link to the documentation (opens new window)
# Start creating the module
From the menu on the left, select the Collect tab, then click the Add new data collect button.
From the list of available modules, choose WooCommerce
# Initial settings
In the first step, there are two fields to fill out.
Collect name - the name of our module. It will be visible under this name in other places in the platform.
Shop url - the URL address of our store.
# Authorization with WooCommerce
In the next step, we need to grant WitCloud application access to WooCommerce. This is necessary for WitCloud to fetch the data.
To do this, click the Click here to authorize button.
To fill out the form, enter the data by typing in the two keys generated in the WooCommerce panel.
After successful authorization, select your account from the list and click the Next button.
# Setting the module in the schedule
Your module is now created in WitCloud 📊. The final step is to determine the time range for which you need to retrieve historical data. The schedule for retrieving current data will be created automatically.
Enter the appropriate range and click the Finish button.