Skip to main content

Supported data types

Indeliveries

Incoming products

Inventory

Stock levels

Orders

Customer transactions

Product Attributes

Product metadata & descriptions
All order types are supported — not just online. You can import retail/in-store, wholesale, and marketplace orders alongside your e-commerce data. Use the `TYPE` field to identify the sales channel (e.g., `ONLINE`, `RETAIL`, `WHOLESALE`) and `EXTERNAL_STOREFRONT_ID` to separate data by store or location.

Prerequisites

Before setting up the BigQuery integration, ensure you have:
  • A Google Cloud project with BigQuery enabled
  • Tables or views in BigQuery containing your data, with columns matching our schema
  • A Google Cloud service account with BigQuery Data Viewer and BigQuery Job User roles granted on the relevant dataset(s)
Historical data recommendation — For accurate forecasting, marketing-mix modeling, and cohort analytics, we recommend providing data going back to at least two years. Our default start date for data ingestion is January 1, 2023. The more historical data available, the better our ML models perform.

Good to know

If you operate multiple storefronts, include EXTERNAL_STOREFRONT_ID in your data for per-row storefront assignment. It applies to orders, including return fields within orders.The value is matched against the externalStorefrontId in your merchant mappings, ignoring case. Rows where it is empty or matches no mapping go to the storefront the integration is set up for.

Merchant mappings

Merchant mappings connect your external storefront IDs to the platform's internal storefronts. They also optionally assign country-level marketing cost data based on country codes.Setup: Provide the following JSON structure to the commercial team:
[
    {
        "externalStorefrontId": "STORE-001",
        "countries": ["SE", "NO", "DK"]
    },
    {
        "externalStorefrontId": "STORE-002",
        "countries": ["GB"]
    },
    {
        "externalStorefrontId": "STORE-003",
        "countries": ["US"]
    },
    {
        "externalStorefrontId": "STORE-004",
        "countries": []
    }
]
string
required
Your external storefront identifier. Can be any string but preferably something that represents the storefront.
array
Array of ISO 3166 country codes (2 letters) for assigning marketing cost data. Use an empty array [] if no country filtering is needed.
BigQuery column names are case-sensitive. Ensure your column names exactly match the names specified in the Data schema section below (all UPPER_SNAKE_CASE, e.g. ORDER_ID, PRODUCT_ID).
Use standard BigQuery SQL types when creating your tables. The recommended mappings are:

Step-by-step integration guide

1

Create a service account

In the Google Cloud Console, create a dedicated service account for the Dema integration:
  1. Go to IAM & Admin → Service Accounts and click Create service account.
  2. Give it a descriptive name (e.g. dema-bigquery-reader).
  3. Grant the following roles on the project or at the dataset level:
    • BigQuery Data Viewer — allows reading table data.
    • BigQuery Job User — allows running query jobs.
  4. Click Done to save the service account.
2

Generate a service account key

  1. Open the service account you just created and navigate to the Keys tab.
  2. Click Add Key → Create new key and choose JSON.
  3. Download the generated .json key file — you will share this with your Customer Success Manager.
Keep the key file secure. Anyone with access to it can read your BigQuery data.
3

Share credentials

Provide the following information to your Customer Success Manager:
Send the key file and connection details via secure password sharing.
Service account credentials (from the downloaded JSON key file):
Credentials
Connection details:
Connection
4

Specifying data tables and schema

Ensure each BigQuery table or view aligns with our schema. Columns must be named exactly as specified below. This is crucial for accurate data integration.
5

Finalizing integration

After sharing credentials and verifying the data mapping, our team will finalise the integration, enabling data flow from BigQuery into our platform.
Multiple values Some fields allow multiple values. These fields should be stored as a REPEATED (array) column, e.g. ["value1", "value2", "value3"].

Data schema

Indeliveries

Track incoming product deliveries to your warehouses.
Required:

Inventory

Stock levels and cost — the dynamic part of a product record. To get complete product coverage, pair this with the static metadata sent via Product Attributes (name, brand, category, etc.); the two data types are joined on product/variant. See COGS priority for how cost values are resolved.

Fields


Orders

Customer transaction data including order details and line items. See COGS priority for how cost values are resolved.

How order data should be structured

Each row represents a unique order line, identified by the combination of ORDER_ID, PRODUCT_ID, and VARIANT_NO.
RequirementDescription
Unique rowsEach row must have a unique ORDER_ID–PRODUCT_ID–VARIANT_NO combination
Quantity handlingIf multiple items of the same variant were bought, aggregate them using QUANTITY_DECIMAL
Tax inclusionAll prices should include tax
Header repetitionOrder header fields (like ORDER_ID, CURRENCY, TOTAL) must be repeated for every line item in the same order
UpdatesWhen updating an order, include the UPDATED_AT field along with the changed fields
Line-level overridesLine-level fields override their order-level equivalents when set: STATUS_LINE overrides STATUS, and SHIPPING_PROVIDER_LINE overrides SHIPPING_PROVIDER
Storefront mappingTo map data to a specific storefront, fill out EXTERNAL_STOREFRONT_ID and provide us with info about your existing storefronts, see Storefront assignment
Required:Optional:
Required:Optional:
Include these fields to record returns directly in your orders table.Required:Optional:
Order header level:Order line level:

Product Attributes

A complete product record requires both Product Attributes and Inventory. Even if stock levels aren't important to you, both tables must be sent — they are separate data types joined on product/variant. Product Attributes holds the static details (name, brand, category, description, etc.), while Inventory holds the dynamic values (stock levels, cost). Send product metadata here, not in the Inventory table.
Product metadata including names, categories, and descriptive attributes for your catalog.

Required fields


Troubleshooting and support

For common issues and solutions, contact our support team directly for assistance.

Additional resources