Content: Orders (purchases)
Transactions made in the e-shop or offline
Overview
In this Data Type, you can define all the data about the orders made in the e-shop or offline.
Example
In this example, we provide a simple attribute definition.
Properties
Field name | Type | Mode | Description |
---|---|---|---|
internal_id | STRING | REQUIRED | the internal identifier of the order |
external_id | STRING | NULLABLE | the external identifier of the order (can be the same as the internal identifier) |
parent_order_id | STRING | NULLABLE | the parent order id (when applicable) |
persona_type | STRING | NULLABLE | the persona type who created this order |
persona_id | STRING | REQUIRED | the persona who created this order |
order_sys_cd | STRING | NULLABLE | the order system code (e.g.: 'ECM', 'ERP', ...) |
store | STRING | NULLABLE | the store in which the order was done |
seller_persona_type | STRING | NULLABLE | the persona type who sold this order |
seller_persona_id | STRING | NULLABLE | the persona who sold this order |
currency_cd | STRING | NULLABLE | the order currency code (e.g.: 'chf', 'eur', ...) |
total_crncy_amt | NUMERIC | REQUIRED | the total value of the order (what is paid by the customer) |
total_crncy_amt_net | NUMERIC | NULLABLE | the net value of the order |
total_gross_margin_crncy_amt | NUMERIC | NULLABLE | the gross margin of the order |
total_net_margin_crncy_amt | NUMERIC | NULLABLE | the net margin of the order |
shipping_costs_net | NUMERIC | NULLABLE | the net shipping costs of the order |
shipping_costs | NUMERIC | NULLABLE | the shipping costs of the order |
currency_factor | NUMERIC | NULLABLE | the currency factor of the order |
tax_free | BOOLEAN | NULLABLE | was the order tax free? |
tax_rate | NUMERIC | NULLABLE | the tax rate of the order |
tax_amnt | NUMERIC | NULLABLE | the tax amount of the order |
payment_method | STRING | NULLABLE | the payment method
|
shipping_method | STRING | NULLABLE | the shipping method
|
shipping_description | STRING | NULLABLE | the shipping description |
device | STRING | NULLABLE | the device used |
referer | STRING | NULLABLE | the referer used |
partner | STRING | NULLABLE | the partner used |
language | STRING | NULLABLE | the language of the order |
tracking_code | STRING | NULLABLE | the tracking code of the order |
is_gift | BOOLEAN | NULLABLE | was the order a gift? |
wrapping | BOOLEAN | NULLABLE | was the order with wrapping? |
STRING | NULLABLE | the email of the order | |
comments | REPEATED | the comments | |
internal_comments | REPEATED | the internal comments | |
customer_comments | REPEATED | the customer comments | |
contacts | REPEATED | billing/shipping information | |
creation | DATETIME | REQUIRED | the date time the order was created |
last_update | DATETIME | NULLABLE | |
confirmation | DATETIME | NULLABLE | |
cleared | DATETIME | NULLABLE | |
sent | DATETIME | NULLABLE | |
received | DATETIME | NULLABLE | |
returned | DATETIME | NULLABLE | |
repaired | DATETIME | NULLABLE | |
status | BOOLEAN | NULLABLE | should the order be considered as successful or not |
status_code | STRING | NULLABLE | should be one of the following value (other values will be considered as OTHER):
|
string_attributes | REPEATED | additional string (not localized) attributes of the product line | |
localized_string_attributes | REPEATED | additional localized string attributes | |
numeric_attributes | REPEATED | additional numeric (not localized) attributes | |
localized_numeric_attributes | REPEATED | additional localized numeric attributes | |
datetime_attributes | REPEATED | additional datetime (not localized) attributes | |
localized_datetime_attributes | REPEATED | additional localized datetime attributes | |
products | RECORD | REPEATED | the products of the order |
products. sku_id | STRING | REQUIRED | the internal identifier of the sku |
products. connection_property | STRING | NULLABLE | the name of the connecting property for the sku_id value in case not the sku.internal_id |
products. type | STRING | NULLABLE | the type of product : sku, bundle, ... |
products. unit_list_price | NUMERIC | NULLABLE | unit price before any discount |
products. unit_sales_price | NUMERIC | NULLABLE | unit price displayed to the customer after discounts |
products. unit_gross_margin | NUMERIC | NULLABLE | unit the sales gross margin as an absolute value |
products. quantity | NUMERIC | NULLABLE | quantity of units of products |
products. total_list_price | NUMERIC | NULLABLE | unit price before any discount |
products. total_sales_price | NUMERIC | NULLABLE | unit price displayed to the customer after discounts |
products. total_gross_margin | NUMERIC | NULLABLE | unit the sales gross margin as an absolute value |
products. status | BOOLEAN | NULLABLE | the order product status |
products. status_code | STRING | NULLABLE | the order product status code |
products.string_attributes | REPEATED | additional string (not localized) attributes of the product line | |
products.localized_string_attributes | REPEATED | additional localized string attributes | |
products. numeric_attributes | REPEATED | additional numeric (not localized) attributes | |
products.localized_numeric_attributes | REPEATED | additional localized numeric attributes | |
products.datetime_attributes | REPEATED | additional datetime (not localized) attributes | |
products.localized_datetime_attributes | REPEATED | additional localized datetime attributes | |
vouchers | RECORD | REPEATED | |
vouchers. internal_id | STRING | NULLABLE | the internal identifier of the voucher |
vouchers. external_id | STRING | NULLABLE | the external identifier of the voucher (can be the same as the internal identifier) |
vouchers. voucher_products | RECORD | REPEATED | products related to the voucher |
vouchers.voucher_products. type | STRING | NULLABLE | |
vouchers.voucher_products. name | STRING | NULLABLE | |
vouchers.voucher_products. product_line | STRING | NULLABLE | |
vouchers.voucher_products. product_group | STRING | NULLABLE | |
vouchers.voucher_products. voucher | STRING | NULLABLE | |
vouchers.voucher_products. value | NUMERIC | NULLABLE | |
vouchers. type | STRING | NULLABLE | the type value) |
vouchers. ean | STRING | NULLABLE | the ean value) |
vouchers. label | STRING | NULLABLE | label of the voucher |
vouchers. voucher_percentage_value | NUMERIC | NULLABLE | the voucher percentage value (value should be normally > 0) |
vouchers. voucher_absolute_value | NUMERIC | NULLABLE | the voucher absolute value |
vouchers. status | BOOLEAN | NULLABLE | the voucher status |
vouchers.string_attributes | REPEATED | additional string (not localized) attributes of the product line | |
vouchers.localized_string_attributes | REPEATED | additional localized string attributes | |
vouchers. numeric_attributes | REPEATED | additional numeric (not localized) attributes | |
vouchers.localized_numeric_attributes | REPEATED | additional localized numeric attributes | |
vouchers.datetime_attributes | REPEATED | additional datetime (not localized) attributes | |
vouchers.localized_datetime_attributes | REPEATED | additional localized datetime attributes | |
creation_tm | DATETIME | REQUIRED | technical field |
client_id | INTEGER | REQUIRED | technical field |
src_sys_id | INTEGER | REQUIRED | technical field |
Resources
BigQuery JSON Schema
https://github.com/boxalino/data-integration-doc-schema/blob/master/doc/doc_order.json
BigQuery DDL
https://github.com/boxalino/data-integration-doc-schema/blob/master/ddl/doc_order.sql
Add Comment