> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dema.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# File transfer

> Our platform supports multiple methods for data integration through file transfers. Once uploaded, files are automatically processed and synchronized.

export const SupportedOrderTypesNote = () => <Note>
    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.
  </Note>;

export const ProductAttributesV2Note = () => <Note>
    Product attributes are sent as a separate data type from inventory. Include product metadata (name, brand, category, etc.) in a dedicated Product Attributes table rather than the Inventory table.
  </Note>;

export const MerchantMappings = () => <>
    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.

    <strong>Setup:</strong> Provide the following JSON structure to the commercial team:

    <pre>{`[
    {
        "externalStorefrontId": "STORE-001",
        "countries": ["SE", "NO", "DK"]
    },
    {
        "externalStorefrontId": "STORE-002",
        "countries": ["GB"]
    },
    {
        "externalStorefrontId": "STORE-003",
        "countries": ["US"]
    },
    {
        "externalStorefrontId": "STORE-004",
        "countries": []
    }
]`}</pre>

    <ResponseField name="externalStorefrontId" type="string" required>
      Your external storefront identifier. Can be any string but preferably something that represents the storefront.
    </ResponseField>
    <ResponseField name="countries" type="array">
      Array of ISO 3166 country codes (2 letters) for assigning marketing cost data. Use an empty array <code>[]</code> if no country filtering is needed.
    </ResponseField>
  </>;

export const CogsPriority = ({uppercase}) => <>
    COGS (Cost of Goods Sold) can be sent from multiple sources. When more than one is available for a product, the platform picks the highest-priority value:

    <Steps titleSize="p">
      <Step title="Order COGS">
        The actual unit cost on the order line ({uppercase ? <code>COGS</code> : <code>cogs</code>}). Always takes priority when set.
      </Step>
      <Step title="Inventory COGS">
        Unit cost from inventory data, matched by product and variant ({uppercase ? <code>COGS</code> : <code>cogs</code>}).
      </Step>
      <Step title="Estimated COGS">
        A preliminary estimate on the order ({uppercase ? <code>ESTIMATED_COGS</code> : <code>estimatedCogs</code>}). Useful when the real cost is not yet known at order time and arrives later via inventory.
      </Step>
      <Step title="Gross margin">
        Calculated fallback when no COGS data is available.
      </Step>
    </Steps>
  </>;

export const UnreferencedReturnTaxFields = () => <>
    <ResponseField name={orderDefinitions.tax.name} type={orderDefinitions.tax.dataType}>
      {orderDefinitions.tax.description} Required unless `taxRate` is set.
      <br /><br />
      <strong>Format:</strong> {orderDefinitions.tax.format}<br />
      <strong>Example:</strong> {orderDefinitions.tax.example}
    </ResponseField>
    <ResponseField name={orderDefinitions.taxRate.name} type={orderDefinitions.taxRate.dataType}>
      {orderDefinitions.taxRate.description} Required unless `tax` is set.
      <br /><br />
      <strong>Format:</strong> {orderDefinitions.taxRate.format}<br />
      <strong>Example:</strong> {orderDefinitions.taxRate.example}
    </ResponseField>
  </>;

export const UnreferencedReturnLineFields = () => <>
    <ResponseField name={orderDefinitions.productId.name} type={orderDefinitions.productId.dataType} required={orderDefinitions.productId.required}>
      {orderDefinitions.productId.description}
      <br /><br />
      <strong>Example:</strong> {orderDefinitions.productId.example}
    </ResponseField>
    <ResponseField name={orderDefinitions.variantNo.name} type={orderDefinitions.variantNo.dataType} required={orderDefinitions.variantNo.required}>
      {orderDefinitions.variantNo.description}
      <br /><br />
      <strong>Example:</strong> {orderDefinitions.variantNo.example}
    </ResponseField>
    <ResponseField name={orderDefinitions.returnedQuantityDecimal.name} type={orderDefinitions.returnedQuantityDecimal.dataType} required>
      {orderDefinitions.returnedQuantityDecimal.description}
      <br /><br />
      <strong>Format:</strong> {orderDefinitions.returnedQuantityDecimal.format}<br />
      <strong>Example:</strong> {orderDefinitions.returnedQuantityDecimal.example}
    </ResponseField>
    <ResponseField name={orderDefinitions.returnedAt.name} type={orderDefinitions.returnedAt.dataType} required>
      {orderDefinitions.returnedAt.description}
      <br /><br />
      <strong>Format:</strong> {orderDefinitions.returnedAt.format}<br />
      <strong>Example:</strong> {orderDefinitions.returnedAt.example}
    </ResponseField>
    <ResponseField name={orderDefinitions.paidPrice.name} type={orderDefinitions.paidPrice.dataType} required={orderDefinitions.paidPrice.required}>
      {orderDefinitions.paidPrice.description}
      <br /><br />
      <strong>Format:</strong> {orderDefinitions.paidPrice.format}<br />
      <strong>Example:</strong> {orderDefinitions.paidPrice.example}
    </ResponseField>
  </>;

export const UnreferencedReturnHeaderFields = () => <>
    <ResponseField name={orderDefinitions.returnId.name} type={orderDefinitions.returnId.dataType} required={orderDefinitions.returnId.required}>
      {orderDefinitions.returnId.description} (replaces `orderId`)
      <br /><br />
      <strong>Example:</strong> {orderDefinitions.returnId.example}
    </ResponseField>
    <ResponseField name={orderDefinitions.currency.name} type={orderDefinitions.currency.dataType} required={orderDefinitions.currency.required}>
      {orderDefinitions.currency.description}
      <br /><br />
      <strong>Format:</strong> {orderDefinitions.currency.format}<br />
      <strong>Example:</strong> {orderDefinitions.currency.example}
    </ResponseField>
    <ResponseField name={orderDefinitions.taxTotal.name} type={orderDefinitions.taxTotal.dataType} required={orderDefinitions.taxTotal.required}>
      {orderDefinitions.taxTotal.description}
      <br /><br />
      <strong>Format:</strong> {orderDefinitions.taxTotal.format}<br />
      <strong>Example:</strong> {orderDefinitions.taxTotal.example}
    </ResponseField>
    <ResponseField name={orderDefinitions.total.name} type={orderDefinitions.total.dataType} required={orderDefinitions.total.required}>
      {orderDefinitions.total.description}
      <br /><br />
      <strong>Format:</strong> {orderDefinitions.total.format}<br />
      <strong>Example:</strong> {orderDefinitions.total.example}
    </ResponseField>
  </>;

export const ReturnsReferencedOptionalFields = () => <>
    <ResponseField name={orderDefinitions.externalStorefrontId.name} type={orderDefinitions.externalStorefrontId.dataType}>
      {orderDefinitions.externalStorefrontId.description}
      <br /><br />
      <strong>Example:</strong> {orderDefinitions.externalStorefrontId.example}
    </ResponseField>
    <ResponseField name={orderDefinitions.returnedReason.name} type={orderDefinitions.returnedReason.dataType}>
      {orderDefinitions.returnedReason.description}
      <br /><br />
      <strong>Example:</strong> {orderDefinitions.returnedReason.example}
    </ResponseField>
    <ResponseField name={orderDefinitions.returnedShipmentStatus.name} type={orderDefinitions.returnedShipmentStatus.dataType}>
      {orderDefinitions.returnedShipmentStatus.description}
      <br /><br />
      <strong>Format:</strong> {orderDefinitions.returnedShipmentStatus.format}
    </ResponseField>
    <ResponseField name={orderDefinitions.returnedShipmentId.name} type={orderDefinitions.returnedShipmentId.dataType}>
      {orderDefinitions.returnedShipmentId.description}
      <br /><br />
      <strong>Example:</strong> {orderDefinitions.returnedShipmentId.example}
    </ResponseField>
    <ResponseField name={orderDefinitions.returnedShippingProvider.name} type={orderDefinitions.returnedShippingProvider.dataType}>
      {orderDefinitions.returnedShippingProvider.description}
      <br /><br />
      <strong>Example:</strong> {orderDefinitions.returnedShippingProvider.example}
    </ResponseField>
    <ResponseField name={orderDefinitions.returnedWarehouse.name} type={orderDefinitions.returnedWarehouse.dataType}>
      {orderDefinitions.returnedWarehouse.description}
      <br /><br />
      <strong>Example:</strong> {orderDefinitions.returnedWarehouse.example}
    </ResponseField>
    <ResponseField name={orderDefinitions.warehouse.name} type={orderDefinitions.warehouse.dataType}>
      {orderDefinitions.warehouse.description}
      <br /><br />
      <strong>Example:</strong> {orderDefinitions.warehouse.example}
    </ResponseField>
  </>;

export const ReturnsReferencedFields = () => <>
    <ResponseField name={orderDefinitions.orderId.name} type={orderDefinitions.orderId.dataType} required={orderDefinitions.orderId.required}>
      {orderDefinitions.orderId.description}
      <br /><br />
      <strong>Example:</strong> {orderDefinitions.orderId.example}
    </ResponseField>
    <ResponseField name={orderDefinitions.productId.name} type={orderDefinitions.productId.dataType} required={orderDefinitions.productId.required}>
      {orderDefinitions.productId.description}
      <br /><br />
      <strong>Example:</strong> {orderDefinitions.productId.example}
    </ResponseField>
    <ResponseField name={orderDefinitions.variantNo.name} type={orderDefinitions.variantNo.dataType} required={orderDefinitions.variantNo.required}>
      {orderDefinitions.variantNo.description}
      <br /><br />
      <strong>Example:</strong> {orderDefinitions.variantNo.example}
    </ResponseField>
    <ResponseField name={orderDefinitions.returnedQuantityDecimal.name} type={orderDefinitions.returnedQuantityDecimal.dataType} required>
      {orderDefinitions.returnedQuantityDecimal.description}
      <br /><br />
      <strong>Format:</strong> {orderDefinitions.returnedQuantityDecimal.format}<br />
      <strong>Example:</strong> {orderDefinitions.returnedQuantityDecimal.example}
    </ResponseField>
    <ResponseField name={orderDefinitions.returnedAt.name} type={orderDefinitions.returnedAt.dataType} required>
      {orderDefinitions.returnedAt.description}
      <br /><br />
      <strong>Format:</strong> {orderDefinitions.returnedAt.format}<br />
      <strong>Example:</strong> {orderDefinitions.returnedAt.example}
    </ResponseField>
  </>;

export const ProductAttributesCustomAttributes = () => <>
    <ResponseField name="customAttribute1-20" type="string">
      Up to 20 custom attributes for additional product or variant metadata.
      <br /><br />
      <strong>Example:</strong> season-2024
    </ResponseField>
  </>;

export const ProductAttributesOptionalFields = () => <>
    <ResponseField name={productAttributeDefinitions.brand.name} type={productAttributeDefinitions.brand.dataType}>
      {productAttributeDefinitions.brand.description}
      <br /><br />
      <strong>Example:</strong> {productAttributeDefinitions.brand.example}
    </ResponseField>
    <ResponseField name={productAttributeDefinitions.category.name} type={productAttributeDefinitions.category.dataType}>
      {productAttributeDefinitions.category.description}
      <br /><br />
      <strong>Example:</strong> {productAttributeDefinitions.category.example}
    </ResponseField>
    <ResponseField name={productAttributeDefinitions.subCategory.name} type={productAttributeDefinitions.subCategory.dataType}>
      {productAttributeDefinitions.subCategory.description}
      <br /><br />
      <strong>Example:</strong> {productAttributeDefinitions.subCategory.example}
    </ResponseField>
    <ResponseField name={productAttributeDefinitions.collection.name} type={productAttributeDefinitions.collection.dataType}>
      {productAttributeDefinitions.collection.description}
      <br /><br />
      <strong>Example:</strong> {productAttributeDefinitions.collection.example}
    </ResponseField>
    <ResponseField name={productAttributeDefinitions.gender.name} type={productAttributeDefinitions.gender.dataType}>
      {productAttributeDefinitions.gender.description}
      <br /><br />
      <strong>Example:</strong> {productAttributeDefinitions.gender.example}
    </ResponseField>
    <ResponseField name={productAttributeDefinitions.color.name} type={productAttributeDefinitions.color.dataType}>
      {productAttributeDefinitions.color.description}
      <br /><br />
      <strong>Example:</strong> {productAttributeDefinitions.color.example}
    </ResponseField>
    <ResponseField name={productAttributeDefinitions.material.name} type={productAttributeDefinitions.material.dataType}>
      {productAttributeDefinitions.material.description}
      <br /><br />
      <strong>Example:</strong> {productAttributeDefinitions.material.example}
    </ResponseField>
    <ResponseField name={productAttributeDefinitions.size.name} type={productAttributeDefinitions.size.dataType}>
      {productAttributeDefinitions.size.description}
      <br /><br />
      <strong>Example:</strong> {productAttributeDefinitions.size.example}
    </ResponseField>
    <ResponseField name={productAttributeDefinitions.gtin.name} type={productAttributeDefinitions.gtin.dataType}>
      {productAttributeDefinitions.gtin.description}
      <br /><br />
      <strong>Example:</strong> {productAttributeDefinitions.gtin.example}
    </ResponseField>
    <ResponseField name={productAttributeDefinitions.imageUrls.name} type="string · multi">
      {productAttributeDefinitions.imageUrls.description}
      <br /><br />
      <strong>Example:</strong> {productAttributeDefinitions.imageUrls.example}
    </ResponseField>
  </>;

export const ProductAttributesRequiredFields = () => <>
    <ResponseField name={productAttributeDefinitions.productId.name} type={productAttributeDefinitions.productId.dataType} required>
      {productAttributeDefinitions.productId.description}
      <br /><br />
      <strong>Example:</strong> {productAttributeDefinitions.productId.example}
    </ResponseField>
    <ResponseField name={productAttributeDefinitions.variantNo.name} type={productAttributeDefinitions.variantNo.dataType} required>
      {productAttributeDefinitions.variantNo.description}
      <br /><br />
      <strong>Example:</strong> {productAttributeDefinitions.variantNo.example}
    </ResponseField>
    <ResponseField name={productAttributeDefinitions.name.name} type={productAttributeDefinitions.name.dataType} required>
      {productAttributeDefinitions.name.description}
      <br /><br />
      <strong>Example:</strong> {productAttributeDefinitions.name.example}
    </ResponseField>
  </>;

export const InventoryV2Fields = () => <>
    <ResponseField name={inventoryDefinitions.productId.name} type={inventoryDefinitions.productId.dataType} required>
      {inventoryDefinitions.productId.description}
      <br /><br />
      <strong>Example:</strong> {inventoryDefinitions.productId.example}
    </ResponseField>
    <ResponseField name={inventoryDefinitions.variantNo.name} type={inventoryDefinitions.variantNo.dataType} required>
      {inventoryDefinitions.variantNo.description}
      <br /><br />
      <strong>Example:</strong> {inventoryDefinitions.variantNo.example}
    </ResponseField>
    <ResponseField name={inventoryDefinitions.inventoryQuantity.name} type={inventoryDefinitions.inventoryQuantity.dataType} required>
      {inventoryDefinitions.inventoryQuantity.description}
      <br /><br />
      <strong>Format:</strong> {inventoryDefinitions.inventoryQuantity.format}<br />
      <strong>Example:</strong> {inventoryDefinitions.inventoryQuantity.example}
    </ResponseField>
    <ResponseField name={inventoryDefinitions.warehouse.name} type={inventoryDefinitions.warehouse.dataType} required>
      {inventoryDefinitions.warehouse.description}
      <br /><br />
      <strong>Example:</strong> {inventoryDefinitions.warehouse.example}
    </ResponseField>
    <ResponseField name={inventoryDefinitions.cogs.name} type={inventoryDefinitions.cogs.dataType} required>
      {inventoryDefinitions.cogs.description}
      <br /><br />
      <strong>Format:</strong> {inventoryDefinitions.cogs.format}<br />
      <strong>Example:</strong> {inventoryDefinitions.cogs.example}
    </ResponseField>
    <ResponseField name={inventoryDefinitions.currency.name} type={inventoryDefinitions.currency.dataType} required>
      {inventoryDefinitions.currency.description}
      <br /><br />
      <strong>Format:</strong> {inventoryDefinitions.currency.format}<br />
      <strong>Example:</strong> {inventoryDefinitions.currency.example}
    </ResponseField>
  </>;

export const OrderCustomLineAttributes = () => <>
    <ResponseField name="customAttributeLine1-20" type="string">
      Up to 20 custom attributes for additional order line metadata.
      <br /><br />
      <strong>Example:</strong> gift-wrapped
    </ResponseField>
  </>;

export const OrderCustomHeaderAttributes = () => <>
    <ResponseField name="customAttribute1-20" type="string">
      Up to 20 custom attributes for additional order header metadata.
      <br /><br />
      <strong>Example:</strong> loyalty-program
    </ResponseField>
  </>;

export const OrderReturnOptionalFields = () => <>
    <ResponseField name={orderDefinitions.returnedReason.name} type={orderDefinitions.returnedReason.dataType}>
      {orderDefinitions.returnedReason.description}
      <br /><br />
      <strong>Example:</strong> {orderDefinitions.returnedReason.example}
    </ResponseField>
    <ResponseField name={orderDefinitions.returnedShipmentStatus.name} type={orderDefinitions.returnedShipmentStatus.dataType}>
      {orderDefinitions.returnedShipmentStatus.description}
      <br /><br />
      <strong>Format:</strong> {orderDefinitions.returnedShipmentStatus.format}<br />
      <strong>Example:</strong> {orderDefinitions.returnedShipmentStatus.example}
    </ResponseField>
    <ResponseField name={orderDefinitions.returnedShipmentId.name} type={orderDefinitions.returnedShipmentId.dataType}>
      {orderDefinitions.returnedShipmentId.description}
      <br /><br />
      <strong>Example:</strong> {orderDefinitions.returnedShipmentId.example}
    </ResponseField>
    <ResponseField name={orderDefinitions.returnedShippingProvider.name} type={orderDefinitions.returnedShippingProvider.dataType}>
      {orderDefinitions.returnedShippingProvider.description}
      <br /><br />
      <strong>Example:</strong> {orderDefinitions.returnedShippingProvider.example}
    </ResponseField>
    <ResponseField name={orderDefinitions.returnedWarehouse.name} type={orderDefinitions.returnedWarehouse.dataType}>
      {orderDefinitions.returnedWarehouse.description}
      <br /><br />
      <strong>Example:</strong> {orderDefinitions.returnedWarehouse.example}
    </ResponseField>
  </>;

export const OrderReturnRequiredFields = () => <>
    <ResponseField name={orderDefinitions.returnedAt.name} type="datetime" required>
      {orderDefinitions.returnedAt.description}
      <br /><br />
      <strong>Format:</strong> {orderDefinitions.returnedAt.format}<br />
      <strong>Example:</strong> {orderDefinitions.returnedAt.example}
    </ResponseField>
    <ResponseField name={orderDefinitions.returnedQuantityDecimal.name} type={orderDefinitions.returnedQuantityDecimal.dataType} required>
      {orderDefinitions.returnedQuantityDecimal.description}
      <br /><br />
      <strong>Format:</strong> {orderDefinitions.returnedQuantityDecimal.format}<br />
      <strong>Example:</strong> {orderDefinitions.returnedQuantityDecimal.example}
    </ResponseField>
  </>;

export const OrderLineOptionalFields = () => <>
    <ResponseField name={orderDefinitions.cogs.name} type={orderDefinitions.cogs.dataType}>
      {orderDefinitions.cogs.description}
      <br /><br />
      <strong>Format:</strong> {orderDefinitions.cogs.format}<br />
      <strong>Example:</strong> {orderDefinitions.cogs.example}
    </ResponseField>
    <ResponseField name={orderDefinitions.cogsCurrency.name} type={orderDefinitions.cogsCurrency.dataType}>
      {orderDefinitions.cogsCurrency.description}
      <br /><br />
      <strong>Format:</strong> {orderDefinitions.cogsCurrency.format}<br />
      <strong>Example:</strong> {orderDefinitions.cogsCurrency.example}
    </ResponseField>
    <ResponseField name={orderDefinitions.promotionId.name} type={orderDefinitions.promotionId.dataType}>
      {orderDefinitions.promotionId.description}
      <br /><br />
      <strong>Example:</strong> {orderDefinitions.promotionId.example}
    </ResponseField>
    <ResponseField name={orderDefinitions.promotionAmount.name} type={orderDefinitions.promotionAmount.dataType}>
      {orderDefinitions.promotionAmount.description}
      <br /><br />
      <strong>Example:</strong> {orderDefinitions.promotionAmount.example}
    </ResponseField>
    <ResponseField name={orderDefinitions.promotionType.name} type={orderDefinitions.promotionType.dataType}>
      {orderDefinitions.promotionType.description}
      <br /><br />
      <strong>Format:</strong> {orderDefinitions.promotionType.format}<br />
      <strong>Example:</strong> {orderDefinitions.promotionType.example}
    </ResponseField>
    <ResponseField name={orderDefinitions.statusLine.name} type={orderDefinitions.statusLine.dataType}>
      {orderDefinitions.statusLine.description}
      <br /><br />
      <strong>Format:</strong> {orderDefinitions.statusLine.format}<br />
      <strong>Example:</strong> {orderDefinitions.statusLine.example}
    </ResponseField>
    <ResponseField name={orderDefinitions.shipmentId.name} type={orderDefinitions.shipmentId.dataType}>
      {orderDefinitions.shipmentId.description}
      <br /><br />
      <strong>Example:</strong> {orderDefinitions.shipmentId.example}
    </ResponseField>
    <ResponseField name={orderDefinitions.shipmentStatus.name} type={orderDefinitions.shipmentStatus.dataType}>
      {orderDefinitions.shipmentStatus.description}
      <br /><br />
      <strong>Format:</strong> {orderDefinitions.shipmentStatus.format}<br />
      <strong>Example:</strong> {orderDefinitions.shipmentStatus.example}
    </ResponseField>
    <ResponseField name={orderDefinitions.shippingProviderLine.name} type={orderDefinitions.shippingProviderLine.dataType}>
      {orderDefinitions.shippingProviderLine.description}
      <br /><br />
      <strong>Example:</strong> {orderDefinitions.shippingProviderLine.example}
    </ResponseField>
    <ResponseField name={orderDefinitions.estimatedCogs.name} type={orderDefinitions.estimatedCogs.dataType}>
      {orderDefinitions.estimatedCogs.description}
      <br /><br />
      <strong>Format:</strong> {orderDefinitions.estimatedCogs.format}<br />
      <strong>Example:</strong> {orderDefinitions.estimatedCogs.example}
    </ResponseField>
    <ResponseField name={orderDefinitions.estimatedCogsCurrency.name} type={orderDefinitions.estimatedCogsCurrency.dataType}>
      {orderDefinitions.estimatedCogsCurrency.description}
      <br /><br />
      <strong>Format:</strong> {orderDefinitions.estimatedCogsCurrency.format}<br />
      <strong>Example:</strong> {orderDefinitions.estimatedCogsCurrency.example}
    </ResponseField>
  </>;

export const OrderLineTaxFields = () => <>
    <ResponseField name={orderDefinitions.tax.name} type={orderDefinitions.tax.dataType}>
      {orderDefinitions.tax.description} Required unless <code>taxRate</code> is set.
      <br /><br />
      <strong>Format:</strong> {orderDefinitions.tax.format}<br />
      <strong>Example:</strong> {orderDefinitions.tax.example}
    </ResponseField>
    <ResponseField name={orderDefinitions.taxRate.name} type={orderDefinitions.taxRate.dataType}>
      {orderDefinitions.taxRate.description} Required unless <code>tax</code> is set.
      <br /><br />
      <strong>Format:</strong> {orderDefinitions.taxRate.format}<br />
      <strong>Example:</strong> {orderDefinitions.taxRate.example}
    </ResponseField>
  </>;

export const OrderLineRequiredFields = () => <>
    <ResponseField name={orderDefinitions.productId.name} type={orderDefinitions.productId.dataType} required={orderDefinitions.productId.required}>
      {orderDefinitions.productId.description}
      <br /><br />
      <strong>Example:</strong> {orderDefinitions.productId.example}
    </ResponseField>
    <ResponseField name={orderDefinitions.variantNo.name} type={orderDefinitions.variantNo.dataType} required={orderDefinitions.variantNo.required}>
      {orderDefinitions.variantNo.description}
      <br /><br />
      <strong>Example:</strong> {orderDefinitions.variantNo.example}
    </ResponseField>
    <ResponseField name={orderDefinitions.quantityDecimal.name} type={orderDefinitions.quantityDecimal.dataType} required={orderDefinitions.quantityDecimal.required}>
      {orderDefinitions.quantityDecimal.description}
      <br /><br />
      <strong>Format:</strong> {orderDefinitions.quantityDecimal.format}<br />
      <strong>Example:</strong> {orderDefinitions.quantityDecimal.example}
    </ResponseField>
    <ResponseField name={orderDefinitions.originalPrice.name} type={orderDefinitions.originalPrice.dataType} required={orderDefinitions.originalPrice.required}>
      {orderDefinitions.originalPrice.description}
      <br /><br />
      <strong>Format:</strong> {orderDefinitions.originalPrice.format}<br />
      <strong>Example:</strong> {orderDefinitions.originalPrice.example}
    </ResponseField>
    <ResponseField name={orderDefinitions.paidPrice.name} type={orderDefinitions.paidPrice.dataType} required={orderDefinitions.paidPrice.required}>
      {orderDefinitions.paidPrice.description}
      <br /><br />
      <strong>Format:</strong> {orderDefinitions.paidPrice.format}<br />
      <strong>Example:</strong> {orderDefinitions.paidPrice.example}
    </ResponseField>
    <ResponseField name={orderDefinitions.warehouse.name} type={orderDefinitions.warehouse.dataType} required={orderDefinitions.warehouse.required}>
      {orderDefinitions.warehouse.description}
      <br /><br />
      <strong>Example:</strong> {orderDefinitions.warehouse.example}
    </ResponseField>
  </>;

export const OrderHeaderOptionalFields = () => <>
    <ResponseField name={orderDefinitions.city.name} type={orderDefinitions.city.dataType}>
      {orderDefinitions.city.description}
      <br /><br />
      <strong>Example:</strong> {orderDefinitions.city.example}
    </ResponseField>
    <ResponseField name={orderDefinitions.region.name} type={orderDefinitions.region.dataType}>
      {orderDefinitions.region.description}
      <br /><br />
      <strong>Example:</strong> {orderDefinitions.region.example}
    </ResponseField>
    <ResponseField name={orderDefinitions.zipCode.name} type={orderDefinitions.zipCode.dataType}>
      {orderDefinitions.zipCode.description}
      <br /><br />
      <strong>Format:</strong> {orderDefinitions.zipCode.format}<br />
      <strong>Example:</strong> {orderDefinitions.zipCode.example}
    </ResponseField>
    <ResponseField name={orderDefinitions.customerIdentifier.name} type={orderDefinitions.customerIdentifier.dataType}>
      {orderDefinitions.customerIdentifier.description}
      <br /><br />
      <strong>Example:</strong> {orderDefinitions.customerIdentifier.example}<br />
      <strong>Default:</strong> <code>UNKNOWN</code>
    </ResponseField>
    <ResponseField name={orderDefinitions.externalStorefrontId.name} type={orderDefinitions.externalStorefrontId.dataType}>
      {orderDefinitions.externalStorefrontId.description}
      <br /><br />
      <strong>Example:</strong> {orderDefinitions.externalStorefrontId.example}
    </ResponseField>
    <ResponseField name={orderDefinitions.paymentProvider.name} type={orderDefinitions.paymentProvider.dataType}>
      {orderDefinitions.paymentProvider.description}
      <br /><br />
      <strong>Example:</strong> {orderDefinitions.paymentProvider.example}
    </ResponseField>
    <ResponseField name={orderDefinitions.shippingProvider.name} type={orderDefinitions.shippingProvider.dataType}>
      {orderDefinitions.shippingProvider.description}
      <br /><br />
      <strong>Example:</strong> {orderDefinitions.shippingProvider.example}
    </ResponseField>
    <ResponseField name={orderDefinitions.status.name} type={orderDefinitions.status.dataType}>
      {orderDefinitions.status.description}
      <br /><br />
      <strong>Format:</strong> {orderDefinitions.status.format}<br />
      <strong>Example:</strong> {orderDefinitions.status.example}<br />
      <strong>Default:</strong> <code>UNKNOWN</code>
    </ResponseField>
    <ResponseField name={orderDefinitions.type.name} type={orderDefinitions.type.dataType}>
      {orderDefinitions.type.description}
      <br /><br />
      <strong>Example:</strong> {orderDefinitions.type.example}<br />
      <strong>Default:</strong> <code>ONLINE</code>
    </ResponseField>
    <ResponseField name={orderDefinitions.voucher.name} type={orderDefinitions.voucher.dataType}>
      {orderDefinitions.voucher.description}
      <br /><br />
      <strong>Example:</strong> {orderDefinitions.voucher.example}
    </ResponseField>
    <ResponseField name={orderDefinitions.voucherDiscount.name} type={orderDefinitions.voucherDiscount.dataType}>
      {orderDefinitions.voucherDiscount.description}
      <br /><br />
      <strong>Example:</strong> {orderDefinitions.voucherDiscount.example}
    </ResponseField>
    <ResponseField name={orderDefinitions.voucherType.name} type={orderDefinitions.voucherType.dataType}>
      {orderDefinitions.voucherType.description}
      <br /><br />
      <strong>Example:</strong> {orderDefinitions.voucherType.example}
    </ResponseField>
  </>;

export const OrderHeaderRequiredFields = () => <>
    <ResponseField name={orderDefinitions.orderId.name} type={orderDefinitions.orderId.dataType} required={orderDefinitions.orderId.required}>
      {orderDefinitions.orderId.description}
      <br /><br />
      <strong>Example:</strong> {orderDefinitions.orderId.example}
    </ResponseField>
    <ResponseField name={orderDefinitions.createdAt.name} type="datetime" required={orderDefinitions.createdAt.required}>
      {orderDefinitions.createdAt.description}
      <br /><br />
      <strong>Format:</strong> {orderDefinitions.createdAt.format}<br />
      <strong>Example:</strong> {orderDefinitions.createdAt.example}
    </ResponseField>
    <ResponseField name={orderDefinitions.country.name} type={orderDefinitions.country.dataType} required={orderDefinitions.country.required}>
      {orderDefinitions.country.description}
      <br /><br />
      <strong>Format:</strong> {orderDefinitions.country.format}<br />
      <strong>Example:</strong> {orderDefinitions.country.example}
    </ResponseField>
    <ResponseField name={orderDefinitions.currency.name} type={orderDefinitions.currency.dataType} required={orderDefinitions.currency.required}>
      {orderDefinitions.currency.description}
      <br /><br />
      <strong>Format:</strong> {orderDefinitions.currency.format}<br />
      <strong>Example:</strong> {orderDefinitions.currency.example}
    </ResponseField>
    <ResponseField name={orderDefinitions.shipping.name} type={orderDefinitions.shipping.dataType} required={orderDefinitions.shipping.required}>
      {orderDefinitions.shipping.description}
      <br /><br />
      <strong>Format:</strong> {orderDefinitions.shipping.format}<br />
      <strong>Example:</strong> {orderDefinitions.shipping.example}
    </ResponseField>
    <ResponseField name={orderDefinitions.taxTotal.name} type={orderDefinitions.taxTotal.dataType} required={orderDefinitions.taxTotal.required}>
      {orderDefinitions.taxTotal.description}
      <br /><br />
      <strong>Format:</strong> {orderDefinitions.taxTotal.format}<br />
      <strong>Example:</strong> {orderDefinitions.taxTotal.example}
    </ResponseField>
    <ResponseField name={orderDefinitions.total.name} type={orderDefinitions.total.dataType} required={orderDefinitions.total.required}>
      {orderDefinitions.total.description}
      <br /><br />
      <strong>Format:</strong> {orderDefinitions.total.format}<br />
      <strong>Example:</strong> {orderDefinitions.total.example}
    </ResponseField>
    <ResponseField name={orderDefinitions.updatedAt.name} type="datetime" required>
      {orderDefinitions.updatedAt.description}
      <br /><br />
      <strong>Format:</strong> {orderDefinitions.updatedAt.format}<br />
      <strong>Example:</strong> {orderDefinitions.updatedAt.example}
    </ResponseField>
  </>;

export const LogisticsFields = () => <>
    <ResponseField name={logisticsDefinitions.orderId.name} type={logisticsDefinitions.orderId.dataType} required={logisticsDefinitions.orderId.required}>
      {logisticsDefinitions.orderId.description}
      <br /><br />
      <strong>Example:</strong> {logisticsDefinitions.orderId.example}
    </ResponseField>
    <ResponseField name={logisticsDefinitions.invoiceNumber.name} type={logisticsDefinitions.invoiceNumber.dataType} required={logisticsDefinitions.invoiceNumber.required}>
      {logisticsDefinitions.invoiceNumber.description}
      <br /><br />
      <strong>Example:</strong> {logisticsDefinitions.invoiceNumber.example}
    </ResponseField>
    <ResponseField name={logisticsDefinitions.date.name} type={logisticsDefinitions.date.dataType} required={logisticsDefinitions.date.required}>
      {logisticsDefinitions.date.description}
      <br /><br />
      <strong>Format:</strong> {logisticsDefinitions.date.format}<br />
      <strong>Example:</strong> {logisticsDefinitions.date.example}
    </ResponseField>
    <ResponseField name={logisticsDefinitions.currency.name} type={logisticsDefinitions.currency.dataType} required={logisticsDefinitions.currency.required}>
      {logisticsDefinitions.currency.description}
      <br /><br />
      <strong>Format:</strong> {logisticsDefinitions.currency.format}<br />
      <strong>Example:</strong> {logisticsDefinitions.currency.example}
    </ResponseField>
    <ResponseField name={logisticsDefinitions.cost.name} type={logisticsDefinitions.cost.dataType} required={logisticsDefinitions.cost.required}>
      {logisticsDefinitions.cost.description}
      <br /><br />
      <strong>Format:</strong> {logisticsDefinitions.cost.format}<br />
      <strong>Example:</strong> {logisticsDefinitions.cost.example}
    </ResponseField>
    <ResponseField name={logisticsDefinitions.shipmentType.name} type={logisticsDefinitions.shipmentType.dataType} required={logisticsDefinitions.shipmentType.required}>
      {logisticsDefinitions.shipmentType.description}
      <br /><br />
      <strong>Format:</strong> <code>outbound</code> | <code>return</code><br />
      <strong>Example:</strong> {logisticsDefinitions.shipmentType.example}
    </ResponseField>
  </>;

export const InventoryCustomAttributes = () => <>
    <ResponseField name="customAttribute1-20" type="string">
      Up to 20 custom attributes for additional product or variant metadata.
      <br /><br />
      <strong>Example:</strong> season-2024
    </ResponseField>
  </>;

export const InventoryVariantOptionalFields = () => <>
    <ResponseField name={inventoryDefinitions.color.name} type={inventoryDefinitions.color.dataType}>
      {inventoryDefinitions.color.description}
      <br /><br />
      <strong>Example:</strong> {inventoryDefinitions.color.example}
    </ResponseField>
    <ResponseField name={inventoryDefinitions.material.name} type={inventoryDefinitions.material.dataType}>
      {inventoryDefinitions.material.description}
      <br /><br />
      <strong>Example:</strong> {inventoryDefinitions.material.example}
    </ResponseField>
    <ResponseField name={inventoryDefinitions.gtin.name} type={inventoryDefinitions.gtin.dataType}>
      {inventoryDefinitions.gtin.description}
      <br /><br />
      <strong>Example:</strong> {inventoryDefinitions.gtin.example}
    </ResponseField>
    <ResponseField name={inventoryDefinitions.imageUrls.name} type="string · multi">
      {inventoryDefinitions.imageUrls.description}
      <br /><br />
      <strong>Example:</strong> {inventoryDefinitions.imageUrls.example}
    </ResponseField>
    <ResponseField name={inventoryDefinitions.size.name} type={inventoryDefinitions.size.dataType}>
      {inventoryDefinitions.size.description}
      <br /><br />
      <strong>Example:</strong> {inventoryDefinitions.size.example}
    </ResponseField>
  </>;

export const InventoryVariantRequiredFields = () => <>
    <ResponseField name={inventoryDefinitions.variantNo.name} type={inventoryDefinitions.variantNo.dataType} required={inventoryDefinitions.variantNo.required}>
      {inventoryDefinitions.variantNo.description}
      <br /><br />
      <strong>Example:</strong> {inventoryDefinitions.variantNo.example}
    </ResponseField>
    <ResponseField name={inventoryDefinitions.cogs.name} type={inventoryDefinitions.cogs.dataType} required={inventoryDefinitions.cogs.required}>
      {inventoryDefinitions.cogs.description}
      <br /><br />
      <strong>Format:</strong> {inventoryDefinitions.cogs.format}<br />
      <strong>Example:</strong> {inventoryDefinitions.cogs.example}
    </ResponseField>
    <ResponseField name={inventoryDefinitions.inventoryQuantity.name} type={inventoryDefinitions.inventoryQuantity.dataType} required={inventoryDefinitions.inventoryQuantity.required}>
      {inventoryDefinitions.inventoryQuantity.description}
      <br /><br />
      <strong>Format:</strong> {inventoryDefinitions.inventoryQuantity.format}<br />
      <strong>Example:</strong> {inventoryDefinitions.inventoryQuantity.example}
    </ResponseField>
    <ResponseField name={inventoryDefinitions.warehouse.name} type={inventoryDefinitions.warehouse.dataType} required={inventoryDefinitions.warehouse.required}>
      {inventoryDefinitions.warehouse.description}
      <br /><br />
      <strong>Example:</strong> {inventoryDefinitions.warehouse.example}
    </ResponseField>
  </>;

export const InventoryProductOptionalFields = () => <>
    <ResponseField name={inventoryDefinitions.brand.name} type={inventoryDefinitions.brand.dataType}>
      {inventoryDefinitions.brand.description}
      <br /><br />
      <strong>Example:</strong> {inventoryDefinitions.brand.example}
    </ResponseField>
    <ResponseField name={inventoryDefinitions.category.name} type={inventoryDefinitions.category.dataType}>
      {inventoryDefinitions.category.description}
      <br /><br />
      <strong>Example:</strong> {inventoryDefinitions.category.example}
    </ResponseField>
    <ResponseField name={inventoryDefinitions.subCategory.name} type={inventoryDefinitions.subCategory.dataType}>
      {inventoryDefinitions.subCategory.description}
      <br /><br />
      <strong>Example:</strong> {inventoryDefinitions.subCategory.example}
    </ResponseField>
    <ResponseField name={inventoryDefinitions.collection.name} type={inventoryDefinitions.collection.dataType}>
      {inventoryDefinitions.collection.description}
      <br /><br />
      <strong>Example:</strong> {inventoryDefinitions.collection.example}
    </ResponseField>
    <ResponseField name={inventoryDefinitions.gender.name} type={inventoryDefinitions.gender.dataType}>
      {inventoryDefinitions.gender.description}
      <br /><br />
      <strong>Example:</strong> {inventoryDefinitions.gender.example}
    </ResponseField>
  </>;

export const InventoryProductRequiredFields = () => <>
    <ResponseField name={inventoryDefinitions.productId.name} type={inventoryDefinitions.productId.dataType} required={inventoryDefinitions.productId.required}>
      {inventoryDefinitions.productId.description}
      <br /><br />
      <strong>Example:</strong> {inventoryDefinitions.productId.example}
    </ResponseField>
    <ResponseField name={inventoryDefinitions.name.name} type={inventoryDefinitions.name.dataType} required={inventoryDefinitions.name.required}>
      {inventoryDefinitions.name.description}
      <br /><br />
      <strong>Example:</strong> {inventoryDefinitions.name.example}
    </ResponseField>
    <ResponseField name={inventoryDefinitions.currency.name} type={inventoryDefinitions.currency.dataType} required={inventoryDefinitions.currency.required}>
      {inventoryDefinitions.currency.description}
      <br /><br />
      <strong>Format:</strong> {inventoryDefinitions.currency.format}<br />
      <strong>Example:</strong> {inventoryDefinitions.currency.example}
    </ResponseField>
  </>;

export const IndeliveriesVariantOptionalFields = () => <>
    <ResponseField name={indeliveryDefinitions.warehouse.name} type={indeliveryDefinitions.warehouse.dataType}>
      {indeliveryDefinitions.warehouse.description}
      <br /><br />
      <strong>Example:</strong> {indeliveryDefinitions.warehouse.example}
    </ResponseField>
  </>;

export const IndeliveriesVariantRequiredFields = () => <>
    <ResponseField name={indeliveryDefinitions.indeliveryDate.name} type={indeliveryDefinitions.indeliveryDate.dataType} required={indeliveryDefinitions.indeliveryDate.required}>
      {indeliveryDefinitions.indeliveryDate.description}
      <br /><br />
      <strong>Format:</strong> {indeliveryDefinitions.indeliveryDate.format}<br />
      <strong>Example:</strong> {indeliveryDefinitions.indeliveryDate.example}
    </ResponseField>
    <ResponseField name={indeliveryDefinitions.quantity.name} type={indeliveryDefinitions.quantity.dataType} required={indeliveryDefinitions.quantity.required}>
      {indeliveryDefinitions.quantity.description}
      <br /><br />
      <strong>Format:</strong> {indeliveryDefinitions.quantity.format}<br />
      <strong>Example:</strong> {indeliveryDefinitions.quantity.example}
    </ResponseField>
    <ResponseField name={indeliveryDefinitions.variantNo.name} type={indeliveryDefinitions.variantNo.dataType} required={indeliveryDefinitions.variantNo.required}>
      {indeliveryDefinitions.variantNo.description}
      <br /><br />
      <strong>Example:</strong> {indeliveryDefinitions.variantNo.example}
    </ResponseField>
  </>;

export const IndeliveriesProductFields = () => <>
    <ResponseField name={indeliveryDefinitions.productId.name} type={indeliveryDefinitions.productId.dataType} required={indeliveryDefinitions.productId.required}>
      {indeliveryDefinitions.productId.description}
      <br /><br />
      <strong>Example:</strong> {indeliveryDefinitions.productId.example}
    </ResponseField>
  </>;

export const CostsOptionalFields = () => <>
    <ResponseField name={costDefinitions.campaign.name} type={costDefinitions.campaign.dataType}>
      {costDefinitions.campaign.description}
      <br /><br />
      <strong>Example:</strong> {costDefinitions.campaign.example}
    </ResponseField>
    <ResponseField name={costDefinitions.campaignId.name} type={costDefinitions.campaignId.dataType}>
      {costDefinitions.campaignId.description}
      <br /><br />
      <strong>Example:</strong> {costDefinitions.campaignId.example}
    </ResponseField>
  </>;

export const CostsRequiredFields = () => <>
    <ResponseField name={costDefinitions.date.name} type={costDefinitions.date.dataType} required={costDefinitions.date.required}>
      {costDefinitions.date.description}
      <br /><br />
      <strong>Format:</strong> {costDefinitions.date.format}<br />
      <strong>Example:</strong> {costDefinitions.date.example}
    </ResponseField>
    <ResponseField name={costDefinitions.channel.name} type={costDefinitions.channel.dataType} required={costDefinitions.channel.required}>
      {costDefinitions.channel.description}
      <br /><br />
      <strong>Example:</strong> {costDefinitions.channel.example}
    </ResponseField>
    <ResponseField name={costDefinitions.channelGroup.name} type={costDefinitions.channelGroup.dataType} required={costDefinitions.channelGroup.required}>
      {costDefinitions.channelGroup.description}
      <br /><br />
      <strong>Example:</strong> {costDefinitions.channelGroup.example}
    </ResponseField>
    <ResponseField name={costDefinitions.cost.name} type={costDefinitions.cost.dataType} required={costDefinitions.cost.required}>
      {costDefinitions.cost.description}
      <br /><br />
      <strong>Example:</strong> {costDefinitions.cost.example}
    </ResponseField>
    <ResponseField name={costDefinitions.country.name} type={costDefinitions.country.dataType} required={costDefinitions.country.required}>
      {costDefinitions.country.description}
      <br /><br />
      <strong>Format:</strong> {costDefinitions.country.format}<br />
      <strong>Example:</strong> {costDefinitions.country.example}
    </ResponseField>
    <ResponseField name={costDefinitions.currency.name} type={costDefinitions.currency.dataType} required={costDefinitions.currency.required}>
      {costDefinitions.currency.description}
      <br /><br />
      <strong>Format:</strong> {costDefinitions.currency.format}<br />
      <strong>Example:</strong> {costDefinitions.currency.example}
    </ResponseField>
  </>;

export const productAttributeDefinitions = {
  "productId": {
    "level": "Required",
    "dataType": "string",
    "example": "AK0898",
    "format": "",
    "name": "productId",
    "description": "Unique product identifier. Must match the product ID used in your website's data layer and in orders/inventory data.",
    "optional": "❌",
    "required": true,
    "externalId": "PRODUCT_ID"
  },
  "variantNo": {
    "level": "Required",
    "dataType": "string",
    "example": "BUF036",
    "format": "",
    "name": "variantNo",
    "description": "Product variant number. Unique identifier of product variant (e.g., style, color, size combination).",
    "optional": "❌",
    "required": true,
    "externalId": "VARIANT_NO"
  },
  "name": {
    "level": "Required",
    "dataType": "string",
    "example": "Black Dress no. 1",
    "format": "",
    "name": "name",
    "description": "Product name.",
    "optional": "❌",
    "required": true,
    "externalId": "NAME"
  },
  "brand": {
    "level": "Optional",
    "dataType": "string",
    "example": "BrandA",
    "format": "",
    "name": "brand",
    "description": "Product brand.",
    "optional": "✔",
    "required": false,
    "externalId": "BRAND"
  },
  "category": {
    "level": "Optional",
    "dataType": "string",
    "example": "Apparel",
    "format": "",
    "name": "category",
    "description": "Product category.",
    "optional": "✔",
    "required": false,
    "externalId": "CATEGORY"
  },
  "subCategory": {
    "level": "Optional",
    "dataType": "string",
    "example": "Dresses",
    "format": "",
    "name": "subCategory",
    "description": "Product subcategory.",
    "optional": "✔",
    "required": false,
    "externalId": "SUB_CATEGORY"
  },
  "collection": {
    "level": "Optional",
    "dataType": "string",
    "example": "Summer 2024",
    "format": "",
    "name": "collection",
    "description": "Product collection.",
    "optional": "✔",
    "required": false,
    "externalId": "COLLECTION"
  },
  "gender": {
    "level": "Optional",
    "dataType": "string",
    "example": "Women",
    "format": "",
    "name": "gender",
    "description": "Gender targeting for the product.",
    "optional": "✔",
    "required": false,
    "externalId": "GENDER"
  },
  "color": {
    "level": "Optional",
    "dataType": "string",
    "example": "Black",
    "format": "",
    "name": "color",
    "description": "Color of the product variant.",
    "optional": "✔",
    "required": false,
    "externalId": "COLOR"
  },
  "material": {
    "level": "Optional",
    "dataType": "string",
    "example": "Cotton",
    "format": "",
    "name": "material",
    "description": "Material of the product variant.",
    "optional": "✔",
    "required": false,
    "externalId": "MATERIAL"
  },
  "size": {
    "level": "Optional",
    "dataType": "string",
    "example": "M",
    "format": "",
    "name": "size",
    "description": "Size of the product variant.",
    "optional": "✔",
    "required": false,
    "externalId": "SIZE"
  },
  "gtin": {
    "level": "Optional",
    "dataType": "string",
    "example": "734567890123",
    "format": "",
    "name": "gtin",
    "description": "GTIN (barcode) of the product variant.",
    "optional": "✔",
    "required": false,
    "externalId": "GTIN"
  },
  "imageUrls": {
    "level": "Optional",
    "dataType": "string",
    "example": "https://example.com/image.jpg",
    "format": "",
    "name": "imageUrls",
    "description": "Image URLs for the variant. Must be publicly accessible. Max size: 20MB.",
    "optional": "✔",
    "required": false,
    "externalId": "IMAGE_URLS",
    "multiValue": "✔"
  }
};

export const orderDefinitions = {
  "city": {
    "level": "Order header",
    "format": "",
    "example": "Stockholm",
    "dataType": "string",
    "name": "city",
    "description": "Customer's shipping city. Used for geographic analysis and reporting.",
    "optional": "✔",
    "required": false,
    "externalId": "CITY"
  },
  "cogs": {
    "level": "Order line",
    "format": "Non-negative",
    "example": "200",
    "dataType": "number",
    "name": "cogs",
    "description": "Cost of Goods Sold per unit. Highest priority in COGS resolution — overrides inventory COGS when set. See COGS priority. Required if using MMM profitability-based optimization targets (NGP2 / NGP3).",
    "optional": "✔",
    "required": false,
    "externalId": "COGS"
  },
  "cogsCurrency": {
    "level": "Order line",
    "format": "ISO 4217",
    "example": "USD",
    "dataType": "string",
    "name": "cogsCurrency",
    "description": "Currency of the COGS value. Required when COGS is specified.",
    "optional": "Yes, unless COGS is set",
    "required": false,
    "externalId": "COGS_CURRENCY"
  },
  "country": {
    "level": "Order header",
    "format": "ISO 3166",
    "example": "SE",
    "dataType": "string",
    "name": "country",
    "description": "Customer's country code. Used for geographic segmentation and storefront mapping.",
    "optional": "❌",
    "required": true,
    "externalId": "COUNTRY"
  },
  "createdAt": {
    "level": "Order header",
    "format": "ISO 8601 - UTC",
    "example": "2025-01-13T11:36:45Z",
    "dataType": "date",
    "name": "createdAt",
    "description": "Timestamp when the order was placed. Used as the primary date for order analytics.",
    "optional": "❌",
    "required": true,
    "externalId": "CREATED_AT"
  },
  "currency": {
    "level": "Order header",
    "format": "ISO 4217",
    "example": "SEK",
    "dataType": "string",
    "name": "currency",
    "description": "Currency of all monetary values in the order (prices, totals, shipping, tax).",
    "optional": "❌",
    "required": true,
    "externalId": "CURRENCY"
  },
  "customAttribute1": {
    "level": "Order header",
    "format": "",
    "example": "VIP customer",
    "dataType": "string",
    "name": "customAttribute1",
    "description": "First custom order attribute. Use for business-specific data like customer segments, sales channels, or campaign tags.",
    "optional": "✔",
    "required": false,
    "externalId": "ORDER_CUSTOM_ATTRIBUTE_1"
  },
  "customAttribute2": {
    "level": "Order header",
    "format": "",
    "example": "Store name",
    "dataType": "string",
    "name": "customAttribute2",
    "description": "Second custom order attribute. Use for business-specific data like customer segments, sales channels, or campaign tags.",
    "optional": "✔",
    "required": false,
    "externalId": "ORDER_CUSTOM_ATTRIBUTE_3"
  },
  "customAttribute3": {
    "level": "Order header",
    "format": "",
    "example": "Seasonal sale",
    "dataType": "string",
    "name": "customAttribute3",
    "description": "Third custom order attribute. Use for business-specific data like customer segments, sales channels, or campaign tags.",
    "optional": "✔",
    "required": false,
    "externalId": "ORDER_CUSTOM_ATTRIBUTE_4"
  },
  "customAttribute4": {
    "level": "Order header",
    "format": "",
    "example": "Affiliate partner",
    "dataType": "string",
    "name": "customAttribute4",
    "description": "Fourth custom order attribute. Use for business-specific data like customer segments, sales channels, or campaign tags.",
    "optional": "✔",
    "required": false,
    "externalId": "ORDER_CUSTOM_ATTRIBUTE_5"
  },
  "customAttribute5": {
    "level": "Order header",
    "format": "",
    "example": "Loyalty tier",
    "dataType": "string",
    "name": "customAttribute5",
    "description": "Fifth custom order attribute. Use for business-specific data like customer segments, sales channels, or campaign tags.",
    "optional": "✔",
    "required": false,
    "externalId": "ORDER_CUSTOM_ATTRIBUTE_6"
  },
  "customAttribute6": {
    "level": "Order header",
    "format": "",
    "example": "Referral source",
    "dataType": "string",
    "name": "customAttribute6",
    "description": "Sixth custom order attribute. Use for business-specific data like customer segments, sales channels, or campaign tags.",
    "optional": "✔",
    "required": false,
    "externalId": "ORDER_CUSTOM_ATTRIBUTE_11"
  },
  "customAttribute7": {
    "level": "Order header",
    "format": "",
    "example": "Order priority",
    "dataType": "string",
    "name": "customAttribute7",
    "description": "Seventh custom order attribute. Use for business-specific data like customer segments, sales channels, or campaign tags.",
    "optional": "✔",
    "required": false,
    "externalId": "ORDER_CUSTOM_ATTRIBUTE_12"
  },
  "customAttribute8": {
    "level": "Order header",
    "format": "",
    "example": "Gift order",
    "dataType": "string",
    "name": "customAttribute8",
    "description": "Eighth custom order attribute. Use for business-specific data like customer segments, sales channels, or campaign tags.",
    "optional": "✔",
    "required": false,
    "externalId": "ORDER_CUSTOM_ATTRIBUTE_13"
  },
  "customAttribute9": {
    "level": "Order header",
    "format": "",
    "example": "Subscription ID",
    "dataType": "string",
    "name": "customAttribute9",
    "description": "Ninth custom order attribute. Use for business-specific data like customer segments, sales channels, or campaign tags.",
    "optional": "✔",
    "required": false,
    "externalId": "ORDER_CUSTOM_ATTRIBUTE_14"
  },
  "customAttribute10": {
    "level": "Order header",
    "format": "",
    "example": "Cohort",
    "dataType": "string",
    "name": "customAttribute10",
    "description": "Tenth custom order attribute. Use for business-specific data like customer segments, sales channels, or campaign tags.",
    "optional": "✔",
    "required": false,
    "externalId": "ORDER_CUSTOM_ATTRIBUTE_15"
  },
  "customAttributeLine1": {
    "level": "Order line",
    "format": "",
    "example": "Bundle ID",
    "dataType": "string",
    "name": "customAttributeLine1",
    "description": "First custom line item attribute. Use for item-specific data like bundle identifiers, gift wrapping, or special handling.",
    "optional": "✔",
    "required": false,
    "externalId": "ORDER_CUSTOM_ATTRIBUTE_2"
  },
  "customAttributeLine2": {
    "level": "Order line",
    "format": "",
    "example": "Bundle name",
    "dataType": "string",
    "name": "customAttributeLine2",
    "description": "Second custom line item attribute. Use for item-specific data like bundle identifiers, gift wrapping, or special handling.",
    "optional": "✔",
    "required": false,
    "externalId": "ORDER_CUSTOM_ATTRIBUTE_7"
  },
  "customAttributeLine3": {
    "level": "Order line",
    "format": "",
    "example": "Subscription plan",
    "dataType": "string",
    "name": "customAttributeLine3",
    "description": "Third custom line item attribute. Use for item-specific data like bundle identifiers, gift wrapping, or special handling.",
    "optional": "✔",
    "required": false,
    "externalId": "ORDER_CUSTOM_ATTRIBUTE_8"
  },
  "customAttributeLine4": {
    "level": "Order line",
    "format": "",
    "example": "Custom engraving",
    "dataType": "string",
    "name": "customAttributeLine4",
    "description": "Fourth custom line item attribute. Use for item-specific data like bundle identifiers, gift wrapping, or special handling.",
    "optional": "✔",
    "required": false,
    "externalId": "ORDER_CUSTOM_ATTRIBUTE_9"
  },
  "customAttributeLine5": {
    "level": "Order line",
    "format": "",
    "example": "Warranty type",
    "dataType": "string",
    "name": "customAttributeLine5",
    "description": "Fifth custom line item attribute. Use for item-specific data like bundle identifiers, gift wrapping, or special handling.",
    "optional": "✔",
    "required": false,
    "externalId": "ORDER_CUSTOM_ATTRIBUTE_10"
  },
  "customAttributeLine6": {
    "level": "Order line",
    "format": "",
    "example": "Gift message",
    "dataType": "string",
    "name": "customAttributeLine6",
    "description": "Sixth custom line item attribute. Use for item-specific data like bundle identifiers, gift wrapping, or special handling.",
    "optional": "✔",
    "required": false,
    "externalId": "ORDER_CUSTOM_ATTRIBUTE_16"
  },
  "customAttributeLine7": {
    "level": "Order line",
    "format": "",
    "example": "Assembly required",
    "dataType": "string",
    "name": "customAttributeLine7",
    "description": "Seventh custom line item attribute. Use for item-specific data like bundle identifiers, gift wrapping, or special handling.",
    "optional": "✔",
    "required": false,
    "externalId": "ORDER_CUSTOM_ATTRIBUTE_17"
  },
  "customAttributeLine8": {
    "level": "Order line",
    "format": "",
    "example": "Personalization",
    "dataType": "string",
    "name": "customAttributeLine8",
    "description": "Eighth custom line item attribute. Use for item-specific data like bundle identifiers, gift wrapping, or special handling.",
    "optional": "✔",
    "required": false,
    "externalId": "ORDER_CUSTOM_ATTRIBUTE_18"
  },
  "customAttributeLine9": {
    "level": "Order line",
    "format": "",
    "example": "Return policy",
    "dataType": "string",
    "name": "customAttributeLine9",
    "description": "Ninth custom line item attribute. Use for item-specific data like bundle identifiers, gift wrapping, or special handling.",
    "optional": "✔",
    "required": false,
    "externalId": "ORDER_CUSTOM_ATTRIBUTE_19"
  },
  "customAttributeLine10": {
    "level": "Order line",
    "format": "",
    "example": "Lot number",
    "dataType": "string",
    "name": "customAttributeLine10",
    "description": "Tenth custom line item attribute. Use for item-specific data like bundle identifiers, gift wrapping, or special handling.",
    "optional": "✔",
    "required": false,
    "externalId": "ORDER_CUSTOM_ATTRIBUTE_20"
  },
  "customerIdentifier": {
    "level": "Order header",
    "format": "",
    "example": "david@dema.ai",
    "dataType": "string",
    "name": "customerIdentifier",
    "description": "Unique customer identifier for cohort analysis and repeat purchase tracking. Can be customer ID, email, or hashed email.",
    "optional": "✔",
    "required": false,
    "externalId": "CUSTOMER_IDENTIFIER",
    "default": "UNKNOWN"
  },
  "externalStorefrontId": {
    "level": "Order header",
    "format": "",
    "example": "CH-233",
    "dataType": "string",
    "name": "externalStorefrontId",
    "description": "Identifier for the storefront or sales channel where the order originated. Used to separate analytics by storefront.",
    "optional": "✔",
    "required": false,
    "externalId": "EXTERNAL_STOREFRONT_ID",
    "default": ""
  },
  "orderId": {
    "level": "Order header",
    "format": "",
    "example": "D12345",
    "dataType": "string",
    "name": "orderId",
    "description": "Unique order identifier from your e-commerce system. Used to link order lines and match with returns.",
    "optional": "❌",
    "required": true,
    "externalId": "ORDER_ID"
  },
  "originalPrice": {
    "level": "Order line",
    "format": "Non-negative",
    "example": "1000",
    "dataType": "number",
    "name": "originalPrice",
    "description": "Full retail price per unit before any discounts. Including tax, excluding order-level voucher discounts.",
    "optional": "❌",
    "required": true,
    "externalId": "ORIGINAL_PRICE"
  },
  "paidPrice": {
    "level": "Order line",
    "format": "Non-negative",
    "example": "900",
    "dataType": "number",
    "name": "paidPrice",
    "description": "Actual price paid per unit after item-level discounts. Including tax, excluding order-level voucher discounts.",
    "optional": "❌",
    "required": true,
    "externalId": "PAID_PRICE"
  },
  "paymentProvider": {
    "level": "Order header",
    "format": "",
    "example": "Klarna",
    "dataType": "string",
    "name": "paymentProvider",
    "description": "Payment method or provider used for the transaction (e.g., Klarna, Stripe, PayPal, Credit Card).",
    "optional": "✔",
    "required": false,
    "externalId": "PAYMENT_PROVIDER"
  },
  "productId": {
    "level": "Order line",
    "format": "",
    "example": "AK0898",
    "dataType": "string",
    "name": "productId",
    "description": "Unique product identifier. Must match the product ID used in your website's data layer for accurate attribution.",
    "optional": "❌",
    "required": true,
    "externalId": "PRODUCT_ID"
  },
  "promotionAmount": {
    "level": "Order line",
    "format": "",
    "example": "100",
    "dataType": "string",
    "name": "promotionAmount",
    "description": "Discount amount applied per unit from a promotion rule. Used for promotion performance analysis.",
    "optional": "✔",
    "required": false,
    "externalId": "PROMOTION_AMOUNT"
  },
  "promotionId": {
    "level": "Order line",
    "format": "",
    "example": "promotion-12345",
    "dataType": "string",
    "name": "promotionId",
    "description": "Identifier of the promotion rule applied to this item. Links to your promotion management system.",
    "optional": "✔",
    "required": false,
    "externalId": "PROMOTION_ID"
  },
  "promotionType": {
    "level": "Order line",
    "format": "FIXED | PERCENTAGE",
    "example": "FIXED",
    "dataType": "enum",
    "name": "promotionType",
    "description": "How the promotion discount is calculated. FIXED for absolute amounts, PERCENTAGE for percentage-based discounts.",
    "optional": "✔",
    "required": false,
    "externalId": "PROMOTION_TYPE"
  },
  "quantityDecimal": {
    "level": "Order line",
    "format": "Non-negative",
    "example": "2.5",
    "dataType": "number",
    "name": "quantityDecimal",
    "description": "Number of units sold. Supports decimals for products sold by weight or length. Aggregate if multiple of the same variant.",
    "optional": "❌",
    "required": true,
    "externalId": "QUANTITY"
  },
  "region": {
    "level": "Order header",
    "format": "",
    "example": "California",
    "dataType": "string",
    "name": "region",
    "description": "State, province, or region for the order. Used for regional sales analysis and reporting.",
    "optional": "✔",
    "required": false,
    "externalId": "REGION"
  },
  "returnId": {
    "level": "Order line",
    "format": "",
    "example": "RETURN-1",
    "dataType": "string",
    "name": "returnId",
    "description": "Unique return identifier. Used for unreferenced returns when order ID is not available.",
    "optional": "❌",
    "required": true,
    "externalId": "RETURN_ID"
  },
  "returnedAt": {
    "level": "Order line",
    "format": "ISO 8601 - UTC",
    "example": "2025-01-14T11:36:45Z",
    "dataType": "date",
    "name": "returnedAt",
    "description": "Timestamp when the return was processed. Used to calculate time-to-return metrics.",
    "optional": "✔",
    "required": false,
    "externalId": "RETURNED_AT"
  },
  "returnedQuantityDecimal": {
    "level": "Order line",
    "format": "Non-negative",
    "example": "1.5",
    "dataType": "number",
    "name": "returnedQuantityDecimal",
    "description": "Number of units returned. Supports decimals for products sold by weight or length.",
    "optional": "✔",
    "required": false,
    "externalId": "RETURNED_QUANTITY"
  },
  "returnedReason": {
    "level": "Order line",
    "format": "",
    "example": "TOO_SMALL",
    "dataType": "string",
    "name": "returnedReason",
    "description": "Customer's reason for returning the item (e.g., TOO_SMALL, DEFECTIVE, WRONG_ITEM, CHANGED_MIND).",
    "optional": "✔",
    "required": false,
    "externalId": "RETURNED_REASON"
  },
  "returnedShipmentStatus": {
    "level": "Order line",
    "format": "CREATED | SHIPPED | DELIVERED | CANCELLED",
    "example": "DELIVERED",
    "dataType": "enum",
    "name": "returnedShipmentStatus",
    "description": "Current status of the return shipment tracking the item's journey back to the warehouse.",
    "optional": "✔",
    "required": false,
    "externalId": "RETURNED_SHIPMENT_STATUS"
  },
  "returnedShipmentId": {
    "level": "Order line",
    "format": "",
    "example": "SHIP-RET-001",
    "dataType": "string",
    "name": "returnedShipmentId",
    "description": "Tracking identifier for the return shipment from the shipping carrier.",
    "optional": "✔",
    "required": false,
    "externalId": "RETURNED_SHIPMENT_ID"
  },
  "returnedShippingProvider": {
    "level": "Order line",
    "format": "",
    "example": "UPS",
    "dataType": "string",
    "name": "returnedShippingProvider",
    "description": "Carrier handling the return shipment (e.g., UPS, FedEx, DHL, PostNord).",
    "optional": "✔",
    "required": false,
    "externalId": "RETURNED_SHIPPING_PROVIDER"
  },
  "returnedWarehouse": {
    "level": "Order line",
    "format": "",
    "example": "Main Warehouse",
    "dataType": "string",
    "name": "returnedWarehouse",
    "description": "Destination warehouse where the returned item will be received and processed. Use the same warehouse names consistently across orders, inventory, and indeliveries — we recommend using human-readable names rather than internal IDs.",
    "optional": "✔",
    "required": false,
    "externalId": "RETURNED_WAREHOUSE"
  },
  "shipmentId": {
    "level": "Order line",
    "format": "",
    "example": "SHIP-001",
    "dataType": "string",
    "name": "shipmentId",
    "description": "Tracking identifier for the outbound shipment from the shipping carrier.",
    "optional": "✔",
    "required": false,
    "externalId": "SHIPMENT_ID"
  },
  "shipmentStatus": {
    "level": "Order line",
    "format": "CREATED | SHIPPED | DELIVERED | CANCELLED",
    "example": "CREATED",
    "dataType": "enum",
    "name": "shipmentStatus",
    "description": "Current status of the outbound shipment tracking the item's delivery to the customer.",
    "optional": "✔",
    "required": false,
    "externalId": "SHIPMENT_STATUS"
  },
  "shipping": {
    "level": "Order header",
    "format": "Non-negative",
    "example": "80",
    "dataType": "number",
    "name": "shipping",
    "description": "Total shipping fees charged to the customer, including tax. Set to 0 for free shipping.",
    "optional": "❌",
    "required": true,
    "externalId": "SHIPPING"
  },
  "shippingProvider": {
    "level": "Order header",
    "format": "",
    "example": "UPS",
    "dataType": "string",
    "name": "shippingProvider",
    "description": "Primary carrier for the order (e.g., UPS, FedEx, DHL, PostNord). Overridden by shippingProviderLine when that field is set on a line item.",
    "optional": "✔",
    "required": false,
    "externalId": "SHIPPING_PROVIDER"
  },
  "shippingProviderLine": {
    "level": "Order line",
    "format": "",
    "example": "UPS",
    "dataType": "string",
    "name": "shippingProviderLine",
    "description": "Carrier for this specific line item. Overrides the order-level shippingProvider when set. Use when items ship from different locations or via different carriers.",
    "optional": "✔",
    "required": false,
    "externalId": "SHIPPING_PROVIDER_LINE"
  },
  "status": {
    "level": "Order header",
    "format": "PENDING | IN_PROGRESS | COMPLETED | CANCELLED",
    "example": "PENDING",
    "dataType": "enum",
    "name": "status",
    "description": "Overall order fulfillment status. Overridden by statusLine when that field is set on a line item. CANCELLED orders are excluded from revenue calculations by default.",
    "optional": "✔",
    "required": false,
    "externalId": "STATUS",
    "default": "UNKNOWN"
  },
  "statusLine": {
    "level": "Order line",
    "format": "PENDING | IN_PROGRESS | COMPLETED | CANCELLED",
    "example": "PENDING",
    "dataType": "enum",
    "name": "statusLine",
    "description": "Fulfillment status for this specific line item. Overrides the order-level status field when set. Use when individual items have different fulfillment statuses.",
    "optional": "✔",
    "required": false,
    "externalId": "STATUS_LINE",
    "default": "UNKNOWN"
  },
  "tax": {
    "level": "Order line",
    "format": "Non-negative",
    "example": "30",
    "dataType": "number",
    "name": "tax",
    "description": "Tax amount per unit based on paid price.",
    "optional": "No, unless tax rate is set",
    "required": false,
    "externalId": "TAX"
  },
  "taxRate": {
    "level": "Order line",
    "format": "Non-negative",
    "example": "25",
    "dataType": "number",
    "name": "taxRate",
    "description": "Tax rate as a percentage (e.g., 25 for 25% VAT).",
    "optional": "No, unless tax is set",
    "required": false,
    "externalId": "TAX_RATE"
  },
  "taxTotal": {
    "level": "Order header",
    "format": "Non-negative",
    "example": "200",
    "dataType": "number",
    "name": "taxTotal",
    "description": "Total tax for the entire order, including product tax and shipping tax. Based on final paid amounts.",
    "optional": "❌",
    "required": true,
    "externalId": "TAX_TOTAL"
  },
  "total": {
    "level": "Order header",
    "format": "Non-negative",
    "example": "3000",
    "dataType": "number",
    "name": "total",
    "description": "Final order amount paid by customer after all discounts. Includes tax but excludes shipping. Includes cancelled items.",
    "optional": "❌",
    "required": true,
    "externalId": "TOTAL"
  },
  "type": {
    "level": "Order header",
    "format": "",
    "example": "ONLINE",
    "dataType": "string",
    "name": "type",
    "description": "Sales channel type (e.g., ONLINE, RETAIL, WHOLESALE, MARKETPLACE). Used to segment order analytics.",
    "optional": "✔",
    "required": false,
    "externalId": "TYPE",
    "default": "ONLINE"
  },
  "updatedAt": {
    "level": "Order header",
    "format": "ISO 8601 - UTC",
    "example": "2025-01-13T11:36:45Z",
    "dataType": "date",
    "name": "updatedAt",
    "description": "Timestamp of the last order modification. Required when updating existing orders with new data.",
    "optional": "✔",
    "required": false,
    "externalId": "UPDATED_AT"
  },
  "variantNo": {
    "level": "Order line",
    "format": "",
    "example": "BUF036",
    "dataType": "string",
    "name": "variantNo",
    "description": "Unique variant identifier combining attributes like size and color. Must match inventory data for COGS lookup.",
    "optional": "❌",
    "required": true,
    "externalId": "VARIANT_NO"
  },
  "voucher": {
    "level": "Order header",
    "format": "",
    "example": "BLACK_WEEK25",
    "dataType": "string",
    "name": "voucher",
    "description": "Voucher or discount code entered by the customer at checkout. Used for campaign performance tracking.",
    "optional": "✔",
    "required": false,
    "externalId": "VOUCHER"
  },
  "voucherDiscount": {
    "level": "Order header",
    "format": "",
    "example": "1000",
    "dataType": "number",
    "name": "voucherDiscount",
    "description": "Total discount amount applied by the voucher code. Deducted from order total.",
    "optional": "✔",
    "required": false,
    "externalId": "VOUCHER_DISCOUNT"
  },
  "voucherType": {
    "level": "Order header",
    "format": "",
    "example": "DISCOUNT",
    "dataType": "string",
    "name": "voucherType",
    "description": "Category of voucher (e.g., DISCOUNT, FREE_SHIPPING, GIFT_CARD, LOYALTY_REWARD). Used for voucher analysis.",
    "optional": "✔",
    "required": false,
    "externalId": "VOUCHER_TYPE"
  },
  "warehouse": {
    "level": "Order line",
    "format": "",
    "example": "Main Warehouse",
    "dataType": "string",
    "name": "warehouse",
    "description": "Fulfillment warehouse for this line item. Use the same warehouse names consistently across orders, inventory, and indeliveries — we recommend using human-readable names rather than internal IDs.",
    "optional": "❌",
    "required": true,
    "externalId": "WAREHOUSE"
  },
  "estimatedCogs": {
    "level": "Order line",
    "format": "Non-negative",
    "example": "200",
    "dataType": "number",
    "name": "estimatedCogs",
    "description": "Estimated Cost of Goods Sold per unit. Used as a fallback when actual COGS is not available from orders or inventory. See COGS priority.",
    "optional": "✔",
    "required": false,
    "externalId": "ESTIMATED_COGS"
  },
  "estimatedCogsCurrency": {
    "level": "Order line",
    "format": "ISO 4217",
    "example": "USD",
    "dataType": "string",
    "name": "estimatedCogsCurrency",
    "description": "Currency of the estimated COGS value. Required when estimatedCogs is specified.",
    "optional": "Yes, unless estimatedCogs is set",
    "required": false,
    "externalId": "ESTIMATED_COGS_CURRENCY"
  },
  "zipCode": {
    "level": "Order header",
    "format": "No space",
    "example": "11613",
    "dataType": "string",
    "name": "zipCode",
    "description": "Customer's postal code without spaces. Used for geographic analysis and delivery zone reporting. Required if using incrementality testing — geo-experiments use postal code zones to define treatment and control regions.",
    "optional": "✔",
    "required": false,
    "externalId": "ZIP_CODE"
  }
};

export const logisticsDefinitions = {
  "orderId": {
    "level": "",
    "dataType": "string",
    "example": "4033186",
    "format": "String",
    "name": "orderId",
    "description": "The merchant order ID to associate the cost with.",
    "optional": "❌",
    "required": true,
    "externalId": "ORDER_ID",
    "multiValue": "❌"
  },
  "invoiceNumber": {
    "level": "",
    "dataType": "string",
    "example": "INV-2025-001",
    "format": "String",
    "name": "invoiceNumber",
    "description": "Invoice number for reference and deduplication.",
    "optional": "❌",
    "required": true,
    "externalId": "INVOICE_NUMBER",
    "multiValue": "❌"
  },
  "date": {
    "level": "",
    "dataType": "string",
    "example": "2025-10-27",
    "format": "ISO 8601",
    "name": "date",
    "description": "Date when the logistics cost was incurred.",
    "optional": "❌",
    "required": true,
    "externalId": "DATE",
    "multiValue": "❌"
  },
  "currency": {
    "level": "",
    "dataType": "string",
    "example": "EUR",
    "format": "ISO 4217",
    "name": "currency",
    "description": "Currency code.",
    "optional": "❌",
    "required": true,
    "externalId": "CURRENCY",
    "multiValue": "❌"
  },
  "cost": {
    "level": "",
    "dataType": "number",
    "example": "4.5",
    "format": "Decimal",
    "name": "cost",
    "description": "Cost amount.",
    "optional": "❌",
    "required": true,
    "externalId": "COST",
    "multiValue": "❌"
  },
  "shipmentType": {
    "level": "",
    "dataType": "enum",
    "example": "outbound",
    "format": "outbound | return",
    "name": "shipmentType",
    "description": "Direction of shipment: \"outbound\" for customer deliveries, \"return\" for customer returns.",
    "optional": "❌",
    "required": true,
    "externalId": "SHIPMENT_TYPE",
    "multiValue": "❌"
  }
};

export const inventoryDefinitions = {
  "date": {
    "level": "Row level",
    "dataType": "date",
    "example": "2025-06-15",
    "format": "YYYY-MM-DD",
    "name": "date",
    "description": "Snapshot date of the inventory record. Required when multiple inventory snapshots can exist at the same time.",
    "optional": "❌",
    "required": true,
    "externalId": "DATE",
    "multiValue": "❌"
  },
  "brand": {
    "level": "Product level",
    "dataType": "string",
    "example": "BrandA",
    "format": "",
    "name": "brand",
    "description": "Product brand.",
    "optional": "✔",
    "required": false,
    "externalId": "BRAND",
    "multiValue": "❌"
  },
  "category": {
    "level": "Product level",
    "dataType": "string",
    "example": "Apparel",
    "format": "",
    "name": "category",
    "description": "Product category.",
    "optional": "✔",
    "required": false,
    "externalId": "CATEGORY",
    "multiValue": "❌"
  },
  "cogs": {
    "level": "Variant level",
    "dataType": "number",
    "example": 120,
    "format": "Non-negative",
    "name": "cogs",
    "description": "Purchase price of the variant. Used as a fallback when order-level COGS is not set. See COGS priority.",
    "optional": "❌",
    "required": true,
    "externalId": "COGS",
    "multiValue": "❌"
  },
  "gtin": {
    "level": "Variant level",
    "dataType": "string",
    "example": "734567890123",
    "format": "",
    "name": "gtin",
    "description": "GTIN of the product variant.",
    "optional": "✔",
    "required": false,
    "externalId": "GTIN",
    "multiValue": "❌"
  },
  "collection": {
    "level": "Product level",
    "dataType": "string",
    "example": "Summer collection",
    "format": "",
    "name": "collection",
    "description": "Product collection.",
    "optional": "✔",
    "required": false,
    "externalId": "COLLECTION",
    "multiValue": "❌"
  },
  "color": {
    "level": "Variant level",
    "dataType": "string",
    "example": "Black",
    "format": "",
    "name": "color",
    "description": "Color of the product variant.",
    "optional": "✔",
    "required": false,
    "externalId": "COLOR",
    "multiValue": "❌"
  },
  "currency": {
    "level": "Product level",
    "dataType": "string",
    "example": "SEK",
    "format": "ISO 4217",
    "name": "currency",
    "description": "Currency code for purchase price.",
    "optional": "❌",
    "required": true,
    "externalId": "CURRENCY",
    "multiValue": "❌"
  },
  "customAttribute1": {
    "level": "Variant level",
    "dataType": "string",
    "example": "season-2024",
    "format": "",
    "name": "customAttribute1",
    "description": "Additional custom attribute for product or variant.",
    "optional": "✔",
    "required": false,
    "externalId": "CUSTOM_ATTRIBUTE_1",
    "multiValue": "❌"
  },
  "customAttribute2": {
    "level": "Variant level",
    "dataType": "string",
    "example": "Kids",
    "format": "",
    "name": "customAttribute2",
    "description": "Additional custom attribute for product or variant.",
    "optional": "✔",
    "required": false,
    "externalId": "CUSTOM_ATTRIBUTE_2",
    "multiValue": "❌"
  },
  "customAttribute3": {
    "level": "Variant level",
    "dataType": "string",
    "example": "sustainable",
    "format": "",
    "name": "customAttribute3",
    "description": "Additional custom attribute for product or variant.",
    "optional": "✔",
    "required": false,
    "externalId": "CUSTOM_ATTRIBUTE_3",
    "multiValue": "❌"
  },
  "customAttribute4": {
    "level": "Variant level",
    "dataType": "string",
    "example": "limited-edition",
    "format": "",
    "name": "customAttribute4",
    "description": "Additional custom attribute for product or variant.",
    "optional": "✔",
    "required": false,
    "externalId": "CUSTOM_ATTRIBUTE_4",
    "multiValue": "❌"
  },
  "customAttribute5": {
    "level": "Variant level",
    "dataType": "string",
    "example": "bestseller",
    "format": "",
    "name": "customAttribute5",
    "description": "Additional custom attribute for product or variant.",
    "optional": "✔",
    "required": false,
    "externalId": "CUSTOM_ATTRIBUTE_5",
    "multiValue": "❌"
  },
  "customAttribute6": {
    "level": "Variant level",
    "dataType": "string",
    "example": "eco-friendly",
    "format": "",
    "name": "customAttribute6",
    "description": "Additional custom attribute for product or variant.",
    "optional": "✔",
    "required": false,
    "externalId": "CUSTOM_ATTRIBUTE_6",
    "multiValue": "❌"
  },
  "customAttribute7": {
    "level": "Variant level",
    "dataType": "string",
    "example": "new-arrival",
    "format": "",
    "name": "customAttribute7",
    "description": "Additional custom attribute for product or variant.",
    "optional": "✔",
    "required": false,
    "externalId": "CUSTOM_ATTRIBUTE_7",
    "multiValue": "❌"
  },
  "customAttribute8": {
    "level": "Variant level",
    "dataType": "string",
    "example": "sale-item",
    "format": "",
    "name": "customAttribute8",
    "description": "Additional custom attribute for product or variant.",
    "optional": "✔",
    "required": false,
    "externalId": "CUSTOM_ATTRIBUTE_8",
    "multiValue": "❌"
  },
  "customAttribute9": {
    "level": "Variant level",
    "dataType": "string",
    "example": "gift-ready",
    "format": "",
    "name": "customAttribute9",
    "description": "Additional custom attribute for product or variant.",
    "optional": "✔",
    "required": false,
    "externalId": "CUSTOM_ATTRIBUTE_9",
    "multiValue": "❌"
  },
  "customAttribute10": {
    "level": "Variant level",
    "dataType": "string",
    "example": "premium",
    "format": "",
    "name": "customAttribute10",
    "description": "Additional custom attribute for product or variant.",
    "optional": "✔",
    "required": false,
    "externalId": "CUSTOM_ATTRIBUTE_10",
    "multiValue": "❌"
  },
  "customAttribute11": {
    "level": "Variant level",
    "dataType": "string",
    "example": "exclusive",
    "format": "",
    "name": "customAttribute11",
    "description": "Additional custom attribute for product or variant.",
    "optional": "✔",
    "required": false,
    "externalId": "CUSTOM_ATTRIBUTE_11",
    "multiValue": "❌"
  },
  "customAttribute12": {
    "level": "Variant level",
    "dataType": "string",
    "example": "handmade",
    "format": "",
    "name": "customAttribute12",
    "description": "Additional custom attribute for product or variant.",
    "optional": "✔",
    "required": false,
    "externalId": "CUSTOM_ATTRIBUTE_12",
    "multiValue": "❌"
  },
  "customAttribute13": {
    "level": "Variant level",
    "dataType": "string",
    "example": "imported",
    "format": "",
    "name": "customAttribute13",
    "description": "Additional custom attribute for product or variant.",
    "optional": "✔",
    "required": false,
    "externalId": "CUSTOM_ATTRIBUTE_13",
    "multiValue": "❌"
  },
  "customAttribute14": {
    "level": "Variant level",
    "dataType": "string",
    "example": "organic",
    "format": "",
    "name": "customAttribute14",
    "description": "Additional custom attribute for product or variant.",
    "optional": "✔",
    "required": false,
    "externalId": "CUSTOM_ATTRIBUTE_14",
    "multiValue": "❌"
  },
  "customAttribute15": {
    "level": "Variant level",
    "dataType": "string",
    "example": "vegan",
    "format": "",
    "name": "customAttribute15",
    "description": "Additional custom attribute for product or variant.",
    "optional": "✔",
    "required": false,
    "externalId": "CUSTOM_ATTRIBUTE_15",
    "multiValue": "❌"
  },
  "customAttribute16": {
    "level": "Variant level",
    "dataType": "string",
    "example": "recycled",
    "format": "",
    "name": "customAttribute16",
    "description": "Additional custom attribute for product or variant.",
    "optional": "✔",
    "required": false,
    "externalId": "CUSTOM_ATTRIBUTE_16",
    "multiValue": "❌"
  },
  "customAttribute17": {
    "level": "Variant level",
    "dataType": "string",
    "example": "vintage",
    "format": "",
    "name": "customAttribute17",
    "description": "Additional custom attribute for product or variant.",
    "optional": "✔",
    "required": false,
    "externalId": "CUSTOM_ATTRIBUTE_17",
    "multiValue": "❌"
  },
  "customAttribute18": {
    "level": "Variant level",
    "dataType": "string",
    "example": "clearance",
    "format": "",
    "name": "customAttribute18",
    "description": "Additional custom attribute for product or variant.",
    "optional": "✔",
    "required": false,
    "externalId": "CUSTOM_ATTRIBUTE_18",
    "multiValue": "❌"
  },
  "customAttribute19": {
    "level": "Variant level",
    "dataType": "string",
    "example": "preorder",
    "format": "",
    "name": "customAttribute19",
    "description": "Additional custom attribute for product or variant.",
    "optional": "✔",
    "required": false,
    "externalId": "CUSTOM_ATTRIBUTE_19",
    "multiValue": "❌"
  },
  "customAttribute20": {
    "level": "Variant level",
    "dataType": "string",
    "example": "backorder",
    "format": "",
    "name": "customAttribute20",
    "description": "Additional custom attribute for product or variant.",
    "optional": "✔",
    "required": false,
    "externalId": "CUSTOM_ATTRIBUTE_20",
    "multiValue": "❌"
  },
  "gender": {
    "level": "Product level",
    "dataType": "string",
    "example": "Women",
    "format": "",
    "name": "gender",
    "description": "Gender targeting for the product.",
    "optional": "✔",
    "required": false,
    "externalId": "GENDER",
    "multiValue": "❌"
  },
  "imageUrls": {
    "level": "Variant level",
    "dataType": "string",
    "example": "https://example.com/image.jpg",
    "format": "",
    "name": "imageUrls",
    "description": "Image URLs for the variant. Must be a publicly accessible URL. Max size: 20MB.",
    "optional": "✔",
    "required": false,
    "externalId": "IMAGE_URLS",
    "multiValue": "✔"
  },
  "inventoryQuantity": {
    "level": "Variant level",
    "dataType": "number",
    "example": 124,
    "format": "Non-negative",
    "name": "inventoryQuantity",
    "description": "Available inventory quantity.",
    "optional": "❌",
    "required": true,
    "externalId": "QUANTITY",
    "multiValue": "❌"
  },
  "material": {
    "level": "Variant level",
    "dataType": "string",
    "example": "Polyester",
    "format": "",
    "name": "material",
    "description": "Material of the product variant.",
    "optional": "✔",
    "required": false,
    "externalId": "MATERIAL",
    "multiValue": "❌"
  },
  "name": {
    "level": "Product level",
    "dataType": "string",
    "example": "Black Dress no. 1",
    "format": "",
    "name": "name",
    "description": "Product name.",
    "optional": "❌",
    "required": true,
    "externalId": "NAME",
    "multiValue": "❌"
  },
  "productId": {
    "level": "Product level",
    "dataType": "string",
    "example": "AK0898",
    "format": "",
    "name": "productId",
    "description": "Unique product identifier. Same as in your datalayer on the website.",
    "optional": "❌",
    "required": true,
    "externalId": "PRODUCT_ID",
    "multiValue": "❌"
  },
  "size": {
    "level": "Variant level",
    "dataType": "string",
    "example": "M",
    "format": "",
    "name": "size",
    "description": "Size of the product variant.",
    "optional": "✔",
    "required": false,
    "externalId": "SIZE",
    "multiValue": "❌"
  },
  "subCategory": {
    "level": "Product level",
    "dataType": "string",
    "example": "Dresses",
    "format": "",
    "name": "subCategory",
    "description": "Product subcategory.",
    "optional": "✔",
    "required": false,
    "externalId": "SUB_CATEGORY",
    "multiValue": "❌"
  },
  "variantNo": {
    "level": "Variant level",
    "dataType": "string",
    "example": "BUF036",
    "format": "",
    "name": "variantNo",
    "description": "Product variant number. Unique identifier of product variant (eg. style, color, size).",
    "optional": "❌",
    "required": true,
    "externalId": "VARIANT_NO",
    "multiValue": "❌"
  },
  "warehouse": {
    "level": "Variant level",
    "format": "",
    "example": "Main Warehouse",
    "dataType": "string",
    "name": "warehouse",
    "description": "Warehouse identifier. Use the same warehouse names consistently across orders, inventory, and indeliveries — we recommend using human-readable names rather than internal IDs.",
    "optional": "❌",
    "required": true,
    "externalId": "WAREHOUSE",
    "multiValue": "❌"
  }
};

export const indeliveryDefinitions = {
  "indeliveryDate": {
    "level": "Variant level",
    "format": "ISO 8601",
    "example": "2025-02-20",
    "dataType": "date",
    "name": "indeliveryDate",
    "description": "Expected or actual date of delivery for the items to the warehouse.",
    "optional": "❌",
    "required": true,
    "externalId": "INDELIVERY_DATE"
  },
  "productId": {
    "level": "Product level",
    "format": "",
    "example": "AK0898",
    "dataType": "string",
    "name": "productId",
    "description": "Unique product identifier.",
    "optional": "❌",
    "required": true,
    "externalId": "PRODUCT_ID"
  },
  "quantity": {
    "level": "Variant level",
    "format": "Non-negative",
    "example": "1",
    "dataType": "number",
    "name": "quantity",
    "description": "Quantity of items in delivery.",
    "optional": "❌",
    "required": true,
    "externalId": "QUANTITY"
  },
  "variantNo": {
    "level": "Variant level",
    "format": "",
    "example": "BUF036",
    "dataType": "string",
    "name": "variantNo",
    "description": "Product variant number. Unique identifier of product variant (eg. style, color, size).",
    "optional": "❌",
    "required": true,
    "externalId": "VARIANT_NO"
  },
  "warehouse": {
    "level": "Variant level",
    "format": "",
    "example": "Main Warehouse",
    "dataType": "string",
    "name": "warehouse",
    "description": "Warehouse identifier. Use the same warehouse names consistently across orders, inventory, and indeliveries — we recommend using human-readable names rather than internal IDs.",
    "optional": "✔",
    "required": false,
    "externalId": "WAREHOUSE"
  }
};

export const costDefinitions = {
  "date": {
    "dataType": "date",
    "description": "Date of the campaign data (YYYY-MM-DD according to ISO8601).",
    "format": "ISO 8601",
    "example": "2025-02-20",
    "externalId": "DATE",
    "name": "date",
    "optional": "❌",
    "required": true
  },
  "campaign": {
    "dataType": "string",
    "description": "Name of the campaign.",
    "format": "",
    "example": "Summer Sale 2025",
    "externalId": "CAMPAIGN",
    "name": "campaign",
    "optional": "✔",
    "required": false
  },
  "channel": {
    "dataType": "string",
    "description": "Marketing channel used.",
    "format": "",
    "example": "Facebook",
    "externalId": "CHANNEL",
    "name": "channel",
    "optional": "❌",
    "required": true
  },
  "channelGroup": {
    "dataType": "string",
    "description": "Group classification of the channel.",
    "format": "",
    "example": "Social paid",
    "externalId": "CHANNEL_GROUP",
    "name": "channelGroup",
    "optional": "❌",
    "required": true
  },
  "cost": {
    "dataType": "number",
    "description": "Total cost associated with the campaign.",
    "format": "Decimal",
    "example": "1500",
    "externalId": "COST",
    "name": "cost",
    "optional": "❌",
    "required": true
  },
  "country": {
    "dataType": "string",
    "description": "Targeted country (2 letters).",
    "example": "SE",
    "externalId": "COUNTRY",
    "format": "ISO 3166",
    "name": "country",
    "optional": "❌",
    "required": true
  },
  "currency": {
    "dataType": "string",
    "description": "Currency of the cost data (3 letters).",
    "example": "SEK",
    "externalId": "CURRENCY",
    "format": "ISO 4217",
    "name": "currency",
    "optional": "❌",
    "required": true
  },
  "campaignId": {
    "dataType": "string",
    "description": "Unique identifier for the campaign.",
    "example": "camp_12345",
    "externalId": "CAMPAIGN_ID",
    "format": "",
    "name": "campaignId",
    "optional": "✔",
    "required": false
  }
};

File transfers can be used as:

<CardGroup cols={2}>
  <Card title="Daily data import" icon="calendar-day">
    Main data source with scheduled daily uploads to keep your analytics up-to-date
  </Card>

  <Card title="Historical data import" icon="clock-rotate-left">
    Import historical data that isn't easily available through current main sources or systems
  </Card>
</CardGroup>

<SupportedOrderTypesNote />

### Supported data types

<CardGroup cols={3}>
  <Card title="Costs" icon="dollar-sign" href="#costs">
    Marketing costs data
  </Card>

  <Card title="Indeliveries" icon="truck" href="#indeliveries">
    Incoming products
  </Card>

  <Card title="Inventory" icon="boxes-stacked" href="#inventory">
    Stock levels & product attributes
  </Card>

  <Card title="Logistics" icon="truck-ramp-box" href="#logistics">
    Shipping & fulfillment costs
  </Card>

  <Card title="Orders" icon="file-invoice-dollar" href="#orders">
    Customer transactions
  </Card>

  <Card title="Product Attributes" icon="tags" href="#product-attributes">
    Product metadata & descriptions
  </Card>

  <Card title="Returns" icon="rotate-left" href="#returns">
    Order return details
  </Card>
</CardGroup>

***

## File requirements

<AccordionGroup>
  <Accordion title="File naming convention" icon="file-signature">
    Files must follow this naming pattern:

    ```
    {merchant}_{dataType}_{date}.{fileFormat}
    ```

    **With optional storefront:**

    ```
    {merchant}_{storefront}_{dataType}_{date}.{fileFormat}
    ```

    <Warning>
      **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
    </Warning>

    <Warning>
      **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.
    </Warning>

    <ResponseField name="merchant" type="string" required>
      Your company name
    </ResponseField>

    <ResponseField name="dataType" type="string" required>
      One of the supported data types: `costs`, `indeliveries`, `inventory`, `logistics`, `orders`, `productAttributes`, `returns`
    </ResponseField>

    <ResponseField name="storefront" type="string">
      External storefront ID (optional) - assigns entire file to a specific storefront
    </ResponseField>

    <ResponseField name="date" type="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:

      ```
      acme_orders_2026-04-14.csv
      ```

      Files with dates other than yesterday (e.g., for historical data backfills) require manual import by our team.
    </ResponseField>

    <ResponseField name="fileFormat" type="string" required>
      One of: `.csv`, `.xls`, `.xlsx`, `.parquet`
    </ResponseField>
  </Accordion>

  <Accordion title="Folder structure" icon="folder">
    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 type          | Folder name         |
    | ------------------ | ------------------- |
    | Costs              | `costs`             |
    | Indeliveries       | `indeliveries`      |
    | Inventory          | `inventory`         |
    | Logistics          | `logistics`         |
    | Orders             | `orders`            |
    | Product Attributes | `productAttributes` |
    | Returns            | `returns`           |

    **Example paths:**

    ```
    orders/acme_orders_2026-04-14.csv
    inventory/acme_inventory_2026-04-14.csv
    productAttributes/acme_productAttributes_2026-04-14.csv
    ```
  </Accordion>

  <Accordion title="Technical specifications" icon="gear">
    | Specification       | Value                                                               |
    | ------------------- | ------------------------------------------------------------------- |
    | **Delimiters**      | Comma `,` or semicolon `;`                                          |
    | **Decimal sign**    | Dot `.` (e.g., `1250.75`)                                           |
    | **Multiple values** | Pipe-separated and quoted: `"value1\|value2\|value3"`               |
    | **Column order**    | Columns can be in any order — we match by header name, not position |

    <Note>
      Multiple values are only supported on specific fields where noted `multi` in the schema.
    </Note>

    <Tip>
      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.
    </Tip>
  </Accordion>
</AccordionGroup>

***

## Good to know

<AccordionGroup>
  <Accordion title="COGS priority" icon="ranking-star">
    <CogsPriority />
  </Accordion>

  <Accordion title="MMM and incrementality testing requirements" icon="flask">
    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.

    | Requirement                     | Data type           | Field(s)            | Notes                                         |
    | ------------------------------- | ------------------- | ------------------- | --------------------------------------------- |
    | Historical costs (min. 1 year)  | Costs               | All required fields | Daily costs per channel, market, and campaign |
    | COGS (NGP2 / NGP3)              | Orders or Inventory | `cogs`              | Cost of goods sold per unit                   |
    | Returns (NGP2 / NGP3)           | Returns             | All required fields | Needed to calculate net revenue after returns |
    | Fulfillment costs (NGP2 / NGP3) | Logistics           | All required fields | Shipping 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.

    | Requirement               | Data type                                   | Field(s)            | Notes                                                          |
    | ------------------------- | ------------------------------------------- | ------------------- | -------------------------------------------------------------- |
    | Geo-experiments           | Orders                                      | `zipCode`           | **Required** — postal code of the shipping address (no spaces) |
    | Profitability measurement | Costs, Orders/Inventory, Returns, Logistics | See MMM table above | Recommended — enables epROAS measurement                       |

    <Tip>
      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.
    </Tip>
  </Accordion>

  <Accordion title="Storefront assignment" icon="store">
    If you operate multiple storefronts, you can assign data using one of two methods:

    <Note>
      Storefront assignment currently applies to **orders** and **returns** data types only.
    </Note>

    **Option 1: Filename-based assignment**

    Include the external storefront ID in the filename. This assigns the entire file to one storefront.

    ```
    acme_SE-STORE_orders_2025-01-15.csv
    ```

    **Option 2: Column-based assignment**

    Include the `externalStorefrontId` column in your data for granular per-row assignment.

    #### Merchant mappings

    <MerchantMappings />
  </Accordion>
</AccordionGroup>

***

## Setup instructions

Choose your preferred method for uploading files to our platform:

<CardGroup cols={2}>
  <Card title="sFTP" icon="server">
    Direct upload via secure FTP
  </Card>

  <Card title="Azure Blob Storage" icon="cloud">
    Cloud storage integration with event-driven processing
  </Card>
</CardGroup>

<Tabs>
  <Tab title="sFTP">
    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.

    <Note>
      Request your sFTP credentials through Slack or Teams.
    </Note>
  </Tab>

  <Tab title="Azure Blob Storage">
    Integrate Azure Blob Storage with our platform using Event Subscriptions.

    ### Prerequisites

    * An active Azure storage account
    * Permissions to create event subscriptions
    * Files following our naming conventions

    <Steps>
      <Step title="Navigate to event subscriptions">
        In the Azure Portal, go to your Storage Account and select **Storage** → **Events** → **Event Subscription**
      </Step>

      <Step title="Create new event subscription">
        Click **+ Event Subscription** to create a new subscription
      </Step>

      <Step title="Configure settings">
        Configure the following settings:

        | Setting           | Value                                   |
        | ----------------- | --------------------------------------- |
        | **Event schema**  | Cloud Event Schema v1.0                 |
        | **Event types**   | Blob Created                            |
        | **Endpoint type** | Webhook                                 |
        | **Endpoint**      | `https://s3-blob-webhook.dema.ai/blobs` |
      </Step>

      <Step title="Save configuration">
        Review your settings and click **Create** to activate the event subscription
      </Step>
    </Steps>

    <Tip>
      Ensure your storage account allows outbound connections to our webhook. For additional support, contact our customer success team with your Azure Storage Account details.
    </Tip>
  </Tab>
</Tabs>

***

## Data schemas

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

### Costs

Marketing costs data for campaign tracking and ROI analysis.

<Info>
  **Upload folder:** `costs/`
</Info>

<Tip>
  See [available channel groups and channels](/integrations/marketing/google-sheets#channel-groups-%26-channels) for valid values. See [Storefront assignment](#storefront-assignment) for country-based storefront mapping.
</Tip>

<AccordionGroup>
  <Accordion title="Fields" icon="list">
    <CostsRequiredFields />

    <CostsOptionalFields />
  </Accordion>

  <Accordion title="Example file" icon="file-csv">
    ```csv theme={null}
    date,campaign,campaignId,channel,channelGroup,cost,country,currency
    2023-01-15,Summer Sale,CAMP-2023-001,Facebook,Social Paid,1250.75,US,USD
    2023-01-15,Summer Sale,CAMP-2023-001,Instagram,Social Paid,875.50,US,USD
    2023-01-16,Winter Collection,CAMP-2023-002,Google,Search Paid,2100.25,GB,GBP
    2023-01-17,New Arrivals,CAMP-2023-003,CRM,Newsletter,350.00,DE,EUR
    2023-01-18,Black Friday,CAMP-2023-004,TikTok,Social Paid,3500.00,US,USD
    ```
  </Accordion>
</AccordionGroup>

***

### Indeliveries

Track incoming product deliveries to your warehouses.

<Info>
  **Upload folder:** `indeliveries/`
</Info>

<AccordionGroup>
  <Accordion title="Product level fields" icon="box">
    <IndeliveriesProductFields />
  </Accordion>

  <Accordion title="Variant level fields" icon="palette">
    <IndeliveriesVariantRequiredFields />

    <IndeliveriesVariantOptionalFields />
  </Accordion>

  <Accordion title="Example file" icon="file-csv">
    ```csv theme={null}
    indeliveryDate,productId,variantNo,quantity,warehouse
    2025-01-10,PROD123,VAR001,50,Main Warehouse
    2025-01-10,PROD456,VAR002,25,Main Warehouse
    2025-01-11,PROD789,VAR003,100,Secondary Warehouse
    2025-01-12,PROD123,VAR001,75,Third Warehouse
    2025-01-13,PROD890,VAR005,200,Main Warehouse
    2025-01-13,PROD999,VAR010,150,Secondary Warehouse
    ```
  </Accordion>
</AccordionGroup>

***

### Inventory

Stock levels across your warehouses. Product metadata (name, brand, category, etc.) is sent separately via [Product Attributes](#product-attributes). See [COGS priority](#cogs-priority) for how cost values are resolved.

<Info>
  **Upload folder:** `inventory/`
</Info>

<Warning>
  **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 date | Correct filename date | Example filename                |
  | ------------ | --------------------- | ------------------------------- |
  | `2026-04-15` | `2026-04-14`          | `acme_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".
</Warning>

<Tip>
  Each row should have a unique `productId-variantNo-warehouse` combination. Aggregate inventory quantities per warehouse location.
</Tip>

<Tabs>
  <Tab title="Version 2 (Current)">
    The current inventory format. Contains only stock-level and cost fields. Product attributes (name, brand, category, etc.) are sent separately via the [Product Attributes](#product-attributes) data type.

    <AccordionGroup>
      <Accordion title="Fields" icon="list" defaultOpen>
        <InventoryV2Fields />
      </Accordion>

      <Accordion title="Example file" icon="file-csv">
        ```csv theme={null}
        productId,variantNo,inventoryQuantity,warehouse,cogs,currency
        PROD123,VAR001,25,Main Warehouse,15.50,USD
        PROD123,VAR002,18,Main Warehouse,15.50,USD
        PROD456,VAR003,30,Secondary Warehouse,25.00,USD
        PROD789,VAR004,100,Main Warehouse,8.75,USD
        PROD890,VAR005,50,Main Warehouse,45.00,EUR
        ```
      </Accordion>
    </AccordionGroup>
  </Tab>

  <Tab title="Version 1 (Legacy)">
    Inventory V1 is the legacy format that includes both stock levels and product attributes in a single table. New integrations should use Version 2 instead.

    <AccordionGroup>
      <Accordion title="Product level fields" icon="box">
        <InventoryProductRequiredFields />

        <InventoryProductOptionalFields />
      </Accordion>

      <Accordion title="Variant level fields" icon="palette">
        <InventoryVariantRequiredFields />

        <InventoryVariantOptionalFields />
      </Accordion>

      <Accordion title="Custom attributes" icon="tags">
        <InventoryCustomAttributes />
      </Accordion>

      <Accordion title="Example file" icon="file-csv">
        ```csv theme={null}
        productId,variantNo,name,currency,brand,category,subCategory,collection,gender,cogs,inventoryQuantity,warehouse,color,material,size,gtin,imageUrls
        PROD123,VAR001,Summer Blue Shirt,USD,BrandA,Shirts,T-Shirts,Summer 2024,Women,15.50,25,Main Warehouse,Blue,Cotton,M,7324556789125,https://example.com/shirt.jpg
        PROD123,VAR002,Summer Blue Shirt,USD,BrandA,Shirts,T-Shirts,Summer 2024,Women,15.50,18,Main Warehouse,Blue,Cotton,L,7324556789132,https://example.com/shirt-l.jpg
        PROD456,VAR003,Winter Black Pants,USD,BrandB,Pants,Jeans,Winter 2025,Men,25.00,30,Secondary Warehouse,Black,Denim,32,7324556789149,https://example.com/pants.jpg
        PROD789,VAR004,Classic Red Scarf,USD,BrandC,Accessories,Scarves,All-Season,Unisex,8.75,100,Main Warehouse,Red,Wool,ONE,7324556789156,https://example.com/scarf.jpg
        PROD890,VAR005,Sport Running Shoes,EUR,BrandD,Footwear,Sneakers,Spring 2024,Men,45.00,50,Main Warehouse,White,Synthetic,42,7324556789163,"https://example.com/shoes-1.jpg|https://example.com/shoes-2.jpg"
        ```
      </Accordion>
    </AccordionGroup>
  </Tab>
</Tabs>

***

### Logistics

Shipping and fulfillment costs associated with orders.

<Info>
  **Upload folder:** `logistics/`
</Info>

<Tip>
  The system supports both **outbound** shipments to customers and **return** shipments from customers.
</Tip>

<AccordionGroup>
  <Accordion title="Fields" icon="list">
    <LogisticsFields />
  </Accordion>

  <Accordion title="Example file" icon="file-csv">
    ```csv theme={null}
    date,orderId,invoiceNumber,currency,cost,shipmentType
    2023-01-21,ORD-2023-001,INV-2023-001,USD,5.99,outbound
    2023-01-22,ORD-2023-002,INV-2023-002,EUR,7.99,outbound
    2023-01-23,ORD-2023-003,INV-2023-003,GBP,4.99,outbound
    2023-02-01,ORD-2023-003,INV-2023-004,GBP,3.50,return
    2023-01-24,ORD-2023-004,INV-2023-005,SEK,49.00,outbound
    2023-01-25,ORD-2023-005,INV-2023-006,USD,6.50,outbound
    ```
  </Accordion>
</AccordionGroup>

***

### Orders

Customer transaction data including order details and line items. See [COGS priority](#cogs-priority) for how cost values are resolved.

<Info>
  **Upload folder:** `orders/`
</Info>

<AccordionGroup>
  <Accordion title="How order data should be structured" icon="circle-info" defaultOpen>
    Each row represents a unique order line, identified by the combination of `orderId`, `productId`, and `variantNo`.

    | Requirement              | Description                                                                                                                                                 |
    | ------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
    | **Unique rows**          | Each row must have a unique `orderId-productId-variantNo` combination                                                                                       |
    | **Quantity handling**    | If multiple items of the same variant were bought, aggregate them using `quantityDecimal`                                                                   |
    | **Tax inclusion**        | All prices should **include tax**                                                                                                                           |
    | **Header repetition**    | Order header fields (like orderId, currency, total) must be repeated for every line item belonging to the same order                                        |
    | **Updates**              | When updating an order, include the `updatedAt` field along with the changed fields                                                                         |
    | **Line-level overrides** | Line-level fields override their order-level equivalents when set: `statusLine` overrides `status`, and `shippingProviderLine` overrides `shippingProvider` |
  </Accordion>

  <Accordion title="Order header fields" icon="file-invoice">
    **Required:**

    <OrderHeaderRequiredFields />

    <OrderHeaderOptionalFields />
  </Accordion>

  <Accordion title="Order line fields" icon="list-ul">
    **Required:**

    <OrderLineRequiredFields />

    **Tax fields (one required):**

    <OrderLineTaxFields />

    <OrderLineOptionalFields />
  </Accordion>

  <Accordion title="Return fields (within orders)" icon="rotate-left">
    Include these fields to record returns directly in your orders file.

    **Required (when including returns):**

    <OrderReturnRequiredFields />

    <OrderReturnOptionalFields />
  </Accordion>

  <Accordion title="Custom attributes" icon="tags">
    **Order header level:**

    <OrderCustomHeaderAttributes />

    **Order line level:**

    <OrderCustomLineAttributes />
  </Accordion>

  <Accordion title="Example file" icon="file-csv">
    ```csv theme={null}
    createdAt,updatedAt,orderId,country,city,region,zipCode,currency,customerIdentifier,externalStorefrontId,paymentProvider,shippingProvider,shipping,status,taxTotal,total,type,voucher,voucherDiscount,voucherType,customAttribute1,customAttribute2,productId,variantNo,quantityDecimal,originalPrice,paidPrice,warehouse,tax,taxRate,cogs,estimatedCogs,estimatedCogsCurrency,promotionId,promotionAmount,promotionType,customAttributeLine1,customAttributeLine2,returnedAt,returnedQuantityDecimal,returnedReason
    2023-01-20T10:15:30Z,2023-01-20T10:20:30Z,ORD-2023-001,US,New York,NY,10001,USD,customer123@example.com,STORE-US,Stripe,FedEx,5.99,COMPLETED,7.50,129.95,ONLINE,SUMMER10,5.00,PERCENTAGE,loyalty-gold,referral-friend,PROD123,VAR001,1,29.99,24.99,Main Warehouse,2.50,25,15.50,,,,,gift-wrapped,,,
    2023-01-20T10:15:30Z,2023-01-20T10:20:30Z,ORD-2023-001,US,New York,NY,10001,USD,customer123@example.com,STORE-US,Stripe,FedEx,5.99,COMPLETED,7.50,129.95,ONLINE,SUMMER10,5.00,PERCENTAGE,loyalty-gold,referral-friend,PROD456,VAR003,2,49.99,44.99,Secondary Warehouse,5.00,25,25.00,,,PROMO-001,5.00,PERCENTAGE,express-shipping,,,
    2023-01-21T14:22:10Z,2023-01-21T14:25:10Z,ORD-2023-002,DE,Berlin,,10115,EUR,customer456@example.com,STORE-DE,PayPal,DHL,7.99,IN_PROGRESS,5.70,37.96,ONLINE,,,,first-time-buyer,newsletter-signup,PROD789,VAR004,1,9.99,9.99,Main Warehouse,,,8.75,8.75,EUR,,,,,
    2023-01-22T09:45:00Z,2023-01-25T14:30:00Z,ORD-2023-003,GB,London,,SW1A 1AA,GBP,customer789@example.com,STORE-UK,Credit Card,Royal Mail,4.99,COMPLETED,6.00,40.98,ONLINE,,,,loyalty-silver,abandoned-cart-recovery,PROD123,VAR002,1,29.99,29.99,Main Warehouse,,20,15.50,,,,,2023-01-30T09:15:00Z,1,Size too small
    2023-01-23T16:30:00Z,2023-01-23T16:35:00Z,ORD-2023-004,SE,Stockholm,,11122,SEK,customer999@example.com,STORE-SE,Klarna,PostNord,49.00,COMPLETED,125.00,1000.00,ONLINE,VIP20,100.00,FIXED,loyalty-platinum,influencer-code,PROD890,VAR005,1,600.00,500.00,Main Warehouse,100.00,25,45.00,,,,,priority-fulfillment,,,
    ```
  </Accordion>
</AccordionGroup>

***

### Product Attributes

<ProductAttributesV2Note />

Product metadata including names, categories, and descriptive attributes for your catalog.

<Info>
  **Upload folder:** `productAttributes/`
</Info>

<Note>
  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.
</Note>

<Tip>
  Each row should have a unique `productId-variantNo` combination.
</Tip>

<AccordionGroup>
  <Accordion title="Required fields" icon="asterisk" defaultOpen>
    <ProductAttributesRequiredFields />
  </Accordion>

  <Accordion title="Optional fields" icon="list">
    <ProductAttributesOptionalFields />
  </Accordion>

  <Accordion title="Custom attributes" icon="tags">
    <ProductAttributesCustomAttributes />
  </Accordion>

  <Accordion title="Example file" icon="file-csv">
    ```csv theme={null}
    productId,variantNo,name,brand,category,subCategory,collection,gender,color,material,size,gtin,imageUrls
    PROD123,VAR001,Summer Blue Shirt,BrandA,Shirts,T-Shirts,Summer 2024,Women,Blue,Cotton,M,7324556789125,https://example.com/shirt.jpg
    PROD123,VAR002,Summer Blue Shirt,BrandA,Shirts,T-Shirts,Summer 2024,Women,Blue,Cotton,L,7324556789132,https://example.com/shirt-l.jpg
    PROD456,VAR003,Winter Black Pants,BrandB,Pants,Jeans,Winter 2025,Men,Black,Denim,32,7324556789149,https://example.com/pants.jpg
    PROD789,VAR004,Classic Red Scarf,BrandC,Accessories,Scarves,All-Season,Unisex,Red,Wool,ONE,7324556789156,https://example.com/scarf.jpg
    PROD890,VAR005,Sport Running Shoes,BrandD,Footwear,Sneakers,Spring 2024,Men,White,Synthetic,42,7324556789163,"https://example.com/shoes-1.jpg|https://example.com/shoes-2.jpg"
    ```
  </Accordion>
</AccordionGroup>

***

### Returns

Returns can be sent in three ways (listed in preferred order):

<Info>
  **Upload folder:** `returns/`
</Info>

<CardGroup cols={3}>
  <Card title="1. Part of orders" icon="file-invoice">
    Include return fields directly in your orders data
  </Card>

  <Card title="2. Referenced return" icon="link">
    Separate file with order reference
  </Card>

  <Card title="3. Unreferenced return" icon="file-circle-question">
    Separate file without order reference
  </Card>
</CardGroup>

<Tabs>
  <Tab title="Referenced returns">
    Returns that link back to an original order for complete tracking.

    <Tip>
      Each row should have a unique `orderId-productId-variantNo` combination. Aggregate returned quantities and include only returns since your last upload.
    </Tip>

    <AccordionGroup>
      <Accordion title="Fields" icon="list">
        <ReturnsReferencedFields />

        <ReturnsReferencedOptionalFields />
      </Accordion>

      <Accordion title="Explanation: Snapshot logic" icon="lightbulb">
        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:**

        ```
        Original order (for context):  
        {orderId: 'ORD-001', products: [
          {productId: 'PROD-001', variantNo: 'VAR-001', quantity: 1},
          {productId: 'PROD-002', variantNo: 'VAR-002', quantity: 2},
          {productId: 'PROD-003', variantNo: 'VAR-001', quantity: 1}
        ]}

        1st Return file:
        {orderId: 'ORD-001', productId: 'PROD-003', variantNo: 'VAR-001', returnedQuantityDecimal: 1}
        {orderId: 'ORD-001', productId: 'PROD-002', variantNo: 'VAR-002', returnedQuantityDecimal: 1}

        2nd Return file (latest snapshot): 
        {orderId: 'ORD-001', productId: 'PROD-003', variantNo: 'VAR-001', returnedQuantityDecimal: 1} // no change
        {orderId: 'ORD-001', productId: 'PROD-002', variantNo: 'VAR-002', returnedQuantityDecimal: 2} // +1 item
        {orderId: 'ORD-001', productId: 'PROD-001', variantNo: 'VAR-001', returnedQuantityDecimal: 1} // new return
        ```
      </Accordion>
    </AccordionGroup>
  </Tab>

  <Tab title="Unreferenced returns">
    Returns that cannot be linked to an original order.

    <Warning>
      Without the original order context, some metrics like time-to-return and complete return rate calculations will be estimated and less accurate.
    </Warning>

    <Tip>
      **All fields from [Orders](#orders) can be used.** Include as many fields as possible to improve data matching and analytics.
    </Tip>

    <AccordionGroup>
      <Accordion title="Return header fields" icon="file-invoice">
        **Required:**

        <UnreferencedReturnHeaderFields />
      </Accordion>

      <Accordion title="Return line fields" icon="list-ul">
        **Required:**

        <UnreferencedReturnLineFields />

        **Tax fields (one required):**

        <UnreferencedReturnTaxFields />
      </Accordion>
    </AccordionGroup>
  </Tab>
</Tabs>

<Accordion title="Example file (mixed referenced and unreferenced)" icon="file-csv">
  ```csv theme={null}
  returnedAt,orderId,returnId,productId,variantNo,returnedQuantityDecimal,returnedReason,returnedShipmentStatus,returnedShipmentId,returnedShippingProvider,returnedWarehouse,warehouse,externalStorefrontId,currency,total,taxTotal,paidPrice,tax,taxRate
  2023-02-05T14:30:00Z,ORD-2023-001,,PROD123,VAR001,1,Wrong size,DELIVERED,SHIP-RET-001,FedEx,Main Warehouse,Main Warehouse,STORE-US,,,,,,
  2023-02-05T14:30:00Z,ORD-2023-001,,PROD456,VAR003,1,Changed mind,DELIVERED,SHIP-RET-001,FedEx,Main Warehouse,Secondary Warehouse,STORE-US,,,,,,
  2023-02-08T11:45:00Z,,RET-2023-001,PROD999,VAR010,1,Wrong item received,DELIVERED,SHIP-RET-004,UPS,Secondary Warehouse,Secondary Warehouse,,EUR,89.99,15.00,74.99,,20
  2023-02-09T13:20:00Z,,RET-2023-002,PROD111,VAR020,2,Poor quality,DELIVERED,SHIP-RET-005,DHL,Main Warehouse,Main Warehouse,,EUR,159.98,26.66,133.32,26.66,
  2023-02-10T09:15:00Z,ORD-2023-003,,PROD123,VAR002,1,Size too small,DELIVERED,SHIP-RET-002,Royal Mail,Main Warehouse,Main Warehouse,STORE-UK,,,,,,
  2023-02-11T10:00:00Z,,RET-2023-003,PROD222,VAR030,1,Not as described,DELIVERED,SHIP-RET-006,DHL,Main Warehouse,Main Warehouse,,USD,45.00,,45.00,4.50,
  2023-02-12T16:45:00Z,ORD-2023-004,,PROD890,VAR005,1,Defective,IN_TRANSIT,SHIP-RET-003,PostNord,Main Warehouse,Main Warehouse,STORE-SE,,,,,,
  ```
</Accordion>

***

## Need help?

<CardGroup cols={2}>
  <Card title="Contact support" icon="headset">
    Get in touch with our customer success team through Slack or Teams
  </Card>

  <Card title="Storefront assignment" icon="map" href="#storefront-assignment">
    Configure storefront and merchant mappings
  </Card>
</CardGroup>
