# WooCommerce

# Wprowadzenie

Moduł WooCommerce pozwala na automatyczne zbieranie danych Twojego sklepu.

# Przykład działania

  1. Konfigurujemy moduł w platformie udzielając dostępu do sklepu WooCommerce
  2. Ustawiamy moduł w harmonogramie - dane będą gromadzone i przechowywane w zbiorze danych WitCloud
  3. Po przetworzeniu tabeli można skorzystać z innych modułów raportowych które są z nią zintegrowane.

# Schemat danych

Zbieramy najważniejsze informacje z WooCommerce do 3 różnych tabel:

  1. woocommerce_orders
Rozwiń aby zapoznać się ze schematem danych
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
  1. woocommerce_products
Rozwiń aby zapoznać się ze schematem danych
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
  1. woocommerce_categories
Rozwiń aby zapoznać się ze schematem danych
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

# Konfiguracja

# Zanim zaczniesz

TIP

Do utworzenia modułu potrzebna będzie para kluczy wygenerowanych w panelu (Consumer key, Consumer secret). Opis tworzenia kluczy API można znaleść tutaj: Link do instrukcji (opens new window)

# Rozpocznij tworzenie modułu

Z menu po lewej stronie wybierz zakładkę Collect, następnie kliknij w przycisk Add new data collect

image alt text

Z listy dostępnych modułów wybieramy WooCommerce

image alt text

# Początkowe ustawienia

W pierwszym kroku mamy do wypełnienia dwa pola.

Collect name - nazwa naszego modułu. Będzie on widoczny pod tą nazwą w innych miejscach w platformie.

Shop url - adres url naszego sklepu.

image alt text

# Autoryzacja z WooCommerce

W następnym kroku musimy nadać dostęp aplikacji WitCloud do WooCommerce. Jest to konieczne aby WitCloud mógł zaciągnąć dane.

Aby to zrobić naciskamy na przycisk Click here to authorize

image alt text

Wypełniamy formularz danymi wpisując dwa klucze wygenerowane w panelu WooCommerce

image alt text

Po prawidłowej autoryzacji wybierz swoje konto z listy i kliknij przycisk Next

image alt text

# Ustawienie modułu w harmonogramie

Twój moduł jest już utworzony w WitCloud 📊. Ostatnim krokiem jest ustalenie za jaki zakres czasu potrzebujesz pobrać dane historyczne. Harmonogram pobierania danych bierzących zostanie utworzony automatycznie

Wpisz odpowiedni zakres i naciśnij przycisk Finish.

image alt text

Last updated: 2023-07-05T14:12:16.000Z