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)
Good to know
COGS priority
COGS priority
Storefront assignment
Storefront assignment
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.Column naming
Column naming
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).Data types
Data types
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:
- Go to IAM & Admin → Service Accounts and click Create service account.
- Give it a descriptive name (e.g.
dema-bigquery-reader). - 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.
- Click Done to save the service account.
2
Generate a service account key
- Open the service account you just created and navigate to the Keys tab.
- Click Add Key → Create new key and choose JSON.
- Download the generated
.jsonkey file — you will share this with your Customer Success Manager.
3
Share credentials
Provide the following information to your Customer Success Manager:Service account credentials (from the downloaded JSON key file):Connection details:
Send the key file and connection details via secure password sharing.
Credentials
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.All fields
All fields
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
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
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.| Requirement | Description |
|---|---|
| Unique rows | Each row must have a unique ORDER_ID–PRODUCT_ID–VARIANT_NO combination |
| Quantity handling | If multiple items of the same variant were bought, aggregate them using QUANTITY_DECIMAL |
| Tax inclusion | All prices should include tax |
| Header repetition | Order header fields (like ORDER_ID, CURRENCY, TOTAL) must be repeated for every line item in the same order |
| Updates | When updating an order, include the UPDATED_AT field along with the changed fields |
| Line-level overrides | Line-level fields override their order-level equivalents when set: STATUS_LINE overrides STATUS, and SHIPPING_PROVIDER_LINE overrides SHIPPING_PROVIDER |
| Storefront mapping | To map data to a specific storefront, fill out EXTERNAL_STOREFRONT_ID and provide us with info about your existing storefronts, see Storefront assignment |
Order header fields
Order header fields
Required:Optional:
Order line fields
Order line fields
Required:Optional:
Return fields (within orders)
Return fields (within orders)
Include these fields to record returns directly in your orders table.Required:Optional:
Custom attributes
Custom attributes
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.
Required fields
Required fields
Optional fields
Optional fields
Custom attributes
Custom attributes
Troubleshooting and support
For common issues and solutions, contact our support team directly for assistance.Additional resources
- Google Cloud service account documentation: Creating and managing service accounts
- BigQuery access control: BigQuery IAM roles
- BigQuery data types reference: BigQuery data types

