Skip to main content
Schema

Recent updates in the schema and their significance for each module. Key changes in order, line items, product, customer, and refund data to improve data consistency. Important notes on new and renamed fields for better integration.

Admetrics avatar
Written by Admetrics
Updated over a month ago

Changelog

Current Version: 20241125

  • 20241125

    • Made email column required.

  • 20240808

    • Added order status column

    • Added list of allowed order status values

    • Updated description for total_amount, discount_amount, shipping_amount, shipping_discount_amount, shipping_tax_amount, tax_amount

    • Renamed refund_lineitem_id to lineitem_id in refunds

    • Renamed returned_at_utc to returned_at and returned_date_utc to returned_date

  • 20240712

    • Updated descriptions

  • 20240617

    • Added refunds

  • 20240410

    • Added optional shop to orders schema.

  • 20240325

    • Added optional default_address columns in customers schema.

  • 20240307

    • Moved productvariant_unit_cost and productvariant_gmv_price to lineitems, so they match value at the time of order.

    • Removed productvariant_unit_price, productvariant_unit_cost and productvariant_gmv_price from products.

    • Update schema order for products

  • 20240306:

    • Changed date and timestamp format in sample google sheet to match documentation.

    • Change last_updated_at to updated_at.

  • 20240201: Initial Version

Orders

Notes

  • Bold fields (green columns in the sheet) are mandatory and need to have a value, while others (yellow columns) are optional.

  • Only include data for the orders relevant to this timeinterval.

Schema

  • order_id: Unique identifier for each order (e.g., 5866082492153).

  • order_number: A readable order number assigned to the order (e.g., ABC911553).

  • tags: Labels assigned to the order for categorization or special handling. In case of multiple tags this should be a comma (,) separated string (e.g., recurring_order or recurring_order,no_shipping ).

  • source_name: The platform or method where the order originated (e.g., website, subscription).

  • sales_channel_id: Unique identifier for the sales channel (e.g., ABC1234).

  • sales_channel_name: Name of the sales channel (e.g., b2b, b2c).

  • created_at: Timestamp when the order was created in UTC (e.g., 2023-01-11 14:15:29).

  • created_date: Date when the order was created based on UTC (e.g., 2023-01-11).

  • updated_at: Timestamp for the last update made to the order in UTC (e.g., 2023-01-11 14:15:29).

  • discount_code: Code used for applying discounts to the order (e.g., 10OFF).

  • shop_currency: The currency used in the shop for the order. (e.g., USD).

  • billing_country_code: The ISO country code for the billing address (e.g., US).

  • billing_city: The city of the billing address (e.g., New York).

  • billing_zip: The ZIP/postal code for the billing address (e.g., 10001).

  • shipping_country_code: The ISO country code for the shipping address (e.g., US).

  • shipping_city: The city of the shipping address (e.g., Los Angeles).

  • shipping_zip: The ZIP/postal code for the shipping address (e.g., 90001).

  • payment_gateway: The payment gateway used for the transaction (e.g., Stripe).

  • total_amount: Total amount of the order. This is the initial total amount at the time order was placed. (e.g., 150.00 USD).

  • discount_amount: Amount discounted from the total. This is the initial discount amount at the time order was placed. (e.g., 50.00 USD).

  • shipping_amount: Shipping cost for the order. This is the initial shipping amount at the time order was placed. (e.g., 5.00 USD).

  • shipping_discount_amount: Discounts applied to the shipping cost. This is the discount shipping amount at the time order was placed. (e.g., 0.00 USD).

  • shipping_tax_amount: Taxes applied to the shipping cost. This is the tax on the shipping amount at the time order was placed. (e.g., 1.45 USD).

  • tax_amount: Total tax amount for the order. This is the tax amount at the time order was placed. (e.g., 95.00 USD).

  • customer_id: Unique identifier for the customer placing the order (e.g., 1213445912).

  • customer_order_index: (This column was not populated in the sample data, its purpose is likely to index or track the order sequence for a customer.)

  • landing_page_url: The URL of the page where the customer landed before making a purchase (e.g., not provided in sample).

  • referrer_url: The URL from which the customer was referred (e.g., not provided in sample).

  • order_status_url: URL to check the status of the order (e.g., not provided in sample).

  • shop: Identifies the shop the order was placed in. You can use this to distinguish order data for multiple shops and use this value to control which shop's data to import into the Data Studio (e.g., shop_US, shop_EMEA).

  • order_status: The current status of the order. Following is the list of order status values:

    • open: The order was placed or created. There is work to do for the order, which can include processing payment, fulfilling

    • processed: Payment has been received (paid), The order is awaiting fulfillment.

    • completed: Order fulfilled and complete.

    • cancelled: The order was cancelled.

Line items

Notes

  • Bold fields (green columns in the sheet) are mandatory and need to have a value, while others (yellow columns) are optional.

  • Only include line item data relevant to orders within the time interval.

Schema

  • order_id: Unique identifier for the order associated with the line item (e.g., 5866082492153).

  • order_number: Readable order number associated with the line item (e.g., ABC911553).

  • lineitem_id: Unique identifier for each line item (e.g., not provided in sample).

  • lineitem_quantity: Quantity of the product ordered in this line item (e.g., 1).

  • lineitem_unit_price: Unit price of the product, this is the selling price (gross) of the product at the time of order (e.g., 100.00 USD).

  • lineitem_unit_tax_amount: Tax amount per unit of the product (e.g., 5.00 USD).

  • lineitem_unit_discount_amount: Discount amount per unit of the product (e.g., 10.00 USD).

  • lineitem_discount_amount: Total discount amount for the line item (e.g., 10.00 USD).

  • lineitem_unit_tax_rate: Tax rate applied per unit of the product (e.g., 0.05 for 5%).

  • product_name: Name of the product (e.g., Product A).

  • product_id: Unique identifier for the product (e.g., 8110879123903).

  • product_sku: Stock Keeping Unit identifier for the product (e.g., CLSH101-0014).

  • productvariant_id: Unique identifier for the product variant (e.g., not provided in sample, but useful for distinguishing between different sizes or colors of the same product).

  • productvariant_name: Name of the product variant, often including size or color (e.g., Product A - Black - M).

  • productvariant_sku: Stock Keeping Unit identifier for the product variant (e.g., CLSH101-0014-01).

  • productvariant_unit_cost: The cost of producing or purchasing a single unit of this product variant at the time of the order (e.g., 40.00 USD). In case of no variant, add the product unit cost.

  • productvariant_gmv_price: Gross merchandise value price, possibly before discounts at the time of order (e.g., 130.00 USD). In case of no variant add the product gmv price.

Products

Notes

  • Bold fields (green columns in the sheet) are mandatory and need to have a value, while others (yellow columns) are optional.

  • Only include product data relevant to orders within the time interval.

Schema

  • product_sku: Stock Keeping Unit identifier for tracking inventory (e.g., CLSH101-0014).

  • product_name: Name of the product (e.g., Product A).

  • product_id: Unique identifier for the product (e.g., 8110879123903).

  • product_type: The type or category of the product (e.g., Clothing).

  • product_image: URL or file path to the product's image (e.g., not provided in sample).

  • productvariant_sku: SKU for the specific product variant (e.g., CLSH101-0014-01).

  • productvariant_name: Name of the product variant, indicating specific attributes like size or color (e.g., Product A - Black - M).

  • productvariant_id: Unique identifier for each product variant (e.g. 31606836265165).

  • productvariant_image: URL or file path to the variant's image.

Customers

Notes

  • Only include customer data relevant to orders within the time interval.

Schema

  • customer_id: Unique identifier for the customer (e.g., 1213445912).

  • customer_created_at: Timestamp when the customer profile was created (e.g., 2022-09-01 14:00:00).

  • email: Email address of the customer (e.g., [email protected]).

  • company: The name of the company the customer represents, if applicable (e.g., Acme Corp.).

  • first_name: First name of the customer (e.g., Max).

  • last_name: Last name of the customer (e.g., Mustermann).

  • phone_number: Contact phone number for the customer (e.g., not provided in sample).

  • tags: Labels or tags assigned to the customer for segmentation or identification purposes. In case of multiple tags this should be a comma (,) separated string (e.g., Gold Customer or Gold Customer,2X_Discount).

  • customer_order_count: The number of orders placed by the customer (e.g., 1).

  • default_address_country_code: The two-letter code for the country of the customer's default address. (e.g., DE).

  • default_address_city: The name of the city, district, village, or town of the customer's default address (e.g., Berlin).

  • default_address_zip: The zip or postal code of the customer's default address. (e.g., 10178).

Refunds

Notes

  • Bold fields (green columns in the sheet) are mandatory and need to have a value, while others (yellow columns) are optional.

  • Only include data relevant to refunds within the time interval.

Schema

  • order_id: Unique identifier for the order associated with the line item (e.g., 5866082492153).

  • order_number: Readable order number associated with the line item (e.g., ABC911553).

  • returned_at: Timestamp when the return was created in UTC. (e.g., 2023-01-11 14:15:29).

  • returned_date: Date when the return was created based on UTC. (e.g., 2023-01-11).

  • lineitem_id: Unique identifier for each returned line item (Same as the line item ID at the time of order).

  • refund_lineitem_quantity: Quantity of the product returned (e.g., 1).

  • refund_lineitem_unit_price: Unit price of the product, this is the selling price (gross) of the product at the time of order (e.g., 100.00 USD).

  • refund_lineitem_unit_tax_amount: Tax amount per unit of the product (e.g., 5.00 USD).

  • refund_lineitem_unit_discount_amount: Discount amount per unit of the product (e.g., 10.00 USD).

  • refund_lineitem_discount_amount: Total discount amount for the line item (e.g., 10.00 USD).

  • refund_lineitem_unit_tax_rate: Tax rate applied per unit of the product (e.g., 0.05 for 5%).

  • product_name: Name of the product (e.g., Product A).

  • product_id: Unique identifier for the product (e.g., 8110879123903).

  • product_sku: Stock Keeping Unit identifier for the product (e.g., CLSH101-0014).

  • productvariant_id: Unique identifier for the product variant (e.g., not provided in sample, but useful for distinguishing between different sizes or colors of the same product).

  • productvariant_name: Name of the product variant, often including size or color (e.g., Product A - Black - M).

  • productvariant_sku: Stock Keeping Unit identifier for the product variant (e.g., CLSH101-0014-01).

Did this answer your question?