Skip to main content
File transfers can be used as:

Daily data import

Main data source with scheduled daily uploads to keep your analytics up-to-date

Historical data import

Import historical data that isn’t easily available through current main sources or systems

Supported data types

Costs

Marketing costs data

Indeliveries

Incoming products

Inventory

Stock levels & product attributes

Logistics

Shipping & fulfillment costs

Orders

Customer transactions

Product Attributes

Product metadata & descriptions

Returns

Order return details

File requirements

Files must follow this naming pattern:
With optional storefront:
File names must be unique. Uploading a new file with the same name will override the existing file.If you need to upload multiple files of the same type for the same date, either:
  • Merge them into a single file before uploading, or
  • Use different dates in the filename to distinguish them
Always use yesterday’s date in the filename. Our daily import job runs each morning and only processes files whose {date} equals the previous calendar day. Naming a file with today’s date (or any future date) will cause it to be skipped, resulting in no rows being imported.
merchant
string
required
Your company name
dataType
string
required
One of the supported data types: costs, indeliveries, inventory, logistics, orders, productAttributes, returns
storefront
string
External storefront ID (optional) - assigns entire file to a specific storefront
date
YYYY-MM-DD
required
Last date of data in the file. For daily automated imports, this must always be set to yesterday’s date (today − 1 day). Our daily import job runs each morning and looks specifically for files whose date matches the previous calendar day — a file named with today’s date will not be picked up and will result in no data being imported.Example: If today is 2026-04-15, name your file:
Files with dates other than yesterday (e.g., for historical data backfills) require manual import by our team.
fileFormat
string
required
One of: .csv, .xls, .xlsx, .parquet
Each file must be placed in a folder (sFTP subdirectory or Blob Storage prefix) whose name matches the data type. The folder name is the same as the {dataType} token used in the filename.
Data typeFolder name
Costscosts
Indeliveriesindeliveries
Inventoryinventory
Logisticslogistics
Ordersorders
Product AttributesproductAttributes
Returnsreturns
Example paths:
SpecificationValue
DelimitersComma , or semicolon ;
Decimal signDot . (e.g., 1250.75)
Multiple valuesPipe-separated and quoted: "value1|value2|value3"
Column orderColumns can be in any order — we match by header name, not position
Multiple values are only supported on specific fields where noted multi in the schema.
The order of columns in your file does not matter. Our system reads columns by their header name, so feel free to arrange them in whatever order works best for you. Just make sure the header names match the field names listed in the schemas below.

Good to know

Certain Dema features depend on specific fields being present in your data. The table below summarises what is needed to unlock Marketing Mix Modeling (MMM) and incrementality testing.

Marketing Mix Modeling (MMM)

MMM requires a minimum of one year of historical marketing costs data to capture seasonality patterns and produce reliable channel-level recommendations. For profitability-based optimization targets (NGP2 or NGP3), COGS, returns, and fulfillment cost data must also be present.
RequirementData typeField(s)Notes
Historical costs (min. 1 year)CostsAll required fieldsDaily costs per channel, market, and campaign
COGS (NGP2 / NGP3)Orders or InventorycogsCost of goods sold per unit
Returns (NGP2 / NGP3)ReturnsAll required fieldsNeeded to calculate net revenue after returns
Fulfillment costs (NGP2 / NGP3)LogisticsAll required fieldsShipping and fulfillment costs per order

Incrementality testing

Dema’s incrementality testing is based on geo-experiments that assign postal code zones to treatment and control groups. For this to work, your orders data must include zipCode for the markets you want to test. Without postal codes, Dema cannot construct valid treatment and control regions.The same profitability data required for MMM (historical costs, COGS, returns, and fulfillment costs) is also recommended for incrementality testing, as it enables profit-based measurement (NGP2 / epROAS) in addition to gross sales.
RequirementData typeField(s)Notes
Geo-experimentsOrderszipCodeRequired — postal code of the shipping address (no spaces)
Profitability measurementCosts, Orders/Inventory, Returns, LogisticsSee MMM table aboveRecommended — enables epROAS measurement
Contact the customer success team on Slack or Teams if you are unsure whether your existing data covers these requirements before setting up MMM or incrementality tests.
If you operate multiple storefronts, you can assign data using one of two methods:
Storefront assignment currently applies to orders and returns data types only.
Option 1: Filename-based assignmentInclude the external storefront ID in the filename. This assigns the entire file to one storefront.
Option 2: Column-based assignmentInclude the externalStorefrontId column in your data for granular per-row assignment.

Merchant mappings


Setup instructions

Choose your preferred method for uploading files to our platform:

sFTP

Direct upload via secure FTP

Azure Blob Storage

Cloud storage integration with event-driven processing
Contact our customer success team to receive your dedicated sFTP credentials and server details. Once configured, you can upload files directly to your designated folder, and our system will automatically process them.
Request your sFTP credentials through Slack or Teams.

Data schemas

When importing examples into Google Sheets or similar tools, verify that numbers are not malformatted. Pay special attention to decimal points and thousand separators.

Costs

Marketing costs data for campaign tracking and ROI analysis.
Upload folder: costs/
See available channel groups and channels for valid values. See Storefront assignment for country-based storefront mapping.

Indeliveries

Track incoming product deliveries to your warehouses.
Upload folder: indeliveries/

Inventory

Stock levels across your warehouses. Product metadata (name, brand, category, etc.) is sent separately via Product Attributes. See COGS priority for how cost values are resolved.
Upload folder: inventory/
The filename date must be yesterday’s date, not today’s.Both the product and product inventory extractors apply a built-in −1 day date shift: the file is generated today but must be named with yesterday’s date to be picked up by our daily import job.
Today’s dateCorrect filename dateExample filename
2026-04-152026-04-14acme_inventory_2026-04-14.csv
A file named with today’s date (e.g. acme_inventory_2026-04-15.csv) will not be processed and will result in “No rows to insert”.
Each row should have a unique productId-variantNo-warehouse combination. Aggregate inventory quantities per warehouse location.
The current inventory format. Contains only stock-level and cost fields. Product attributes (name, brand, category, etc.) are sent separately via the Product Attributes data type.

Fields


Logistics

Shipping and fulfillment costs associated with orders.
Upload folder: logistics/
The system supports both outbound shipments to customers and return shipments from customers.

Orders

Customer transaction data including order details and line items. See COGS priority for how cost values are resolved.
Upload folder: orders/

How order data should be structured

Each row represents a unique order line, identified by the combination of orderId, productId, and variantNo.
RequirementDescription
Unique rowsEach row must have a unique orderId-productId-variantNo combination
Quantity handlingIf multiple items of the same variant were bought, aggregate them using quantityDecimal
Tax inclusionAll prices should include tax
Header repetitionOrder header fields (like orderId, currency, total) must be repeated for every line item belonging to the same order
UpdatesWhen updating an order, include the updatedAt field along with the changed fields
Line-level overridesLine-level fields override their order-level equivalents when set: statusLine overrides status, and shippingProviderLine overrides shippingProvider
Required:
Required:Tax fields (one required):
Include these fields to record returns directly in your orders file.Required (when including returns):
Order header level:Order line level:

Product Attributes

Product metadata including names, categories, and descriptive attributes for your catalog.
Upload folder: productAttributes/
Like inventory files, product attribute files generated by the product extractor use a −1 day date shift. Always name the file with yesterday’s date, not today’s.
Each row should have a unique productId-variantNo combination.

Required fields


Returns

Returns can be sent in three ways (listed in preferred order):
Upload folder: returns/

1. Part of orders

Include return fields directly in your orders data

2. Referenced return

Separate file with order reference

3. Unreferenced return

Separate file without order reference
Returns that link back to an original order for complete tracking.
Each row should have a unique orderId-productId-variantNo combination. Aggregate returned quantities and include only returns since your last upload.
Each return file should contain the latest cumulative state of all returned items for each order. We use snapshot logic, meaning each file replaces the previous state rather than adding to it.Example:

Need help?

Contact support

Get in touch with our customer success team through Slack or Teams

Storefront assignment

Configure storefront and merchant mappings