Orders Import - FTP (CSV) - Overview

This page introduces the CSV-based import system for Orders in DJUST. It explains the overall logic, the data structure, and the format expected, regardless of the specific use case (create, update, delete).

⚙️ Introduction

This job allow the creation and update of Orders via CSV import.

You can:

  • Create new External Orders
  • Add Order Lines to existing Orders
  • Update existing Order Lines
  • Update the status of an Order
  • Remove Order Lines
💡

Order Data Model

In DJUST, an Order is composed of two key components:

  • Order Logistic: A logical grouping of one or more Order Lines
  • Order Line: Represents a single purchased product, including its offer and quantity..

📂 CSV Structure

The CSV file must contain one row per Order Line. Multiple rows may belong to the same Order Logistic.

📄

Template CSV

You can use the following spreadsheet as a template to structure your import:

Order - CSV Template

For a detailed explanation of the required fields and expected behaviors depending on the use case, please refer to the dedicated documentation pages:

Import Execution Order

The processing of rows in the import file does not follow a strict FIFO (First In, First Out) order.

This means that if the same Order Line appears multiple times in the CSV with different values, the final result may not reflect the last row in the file. To ensure data consistency, avoid including duplicate Order Lines with conflicting updates in the same import file.

Order Identification

Each order must be identified using either of the following fields:

FieldDescription
Order External IdUnique external identifier of the order.
Order ReferenceDJUST reference of the order.

You must provide at least one of these fields. If both are provided, Order Reference takes precedence.

💡

Note

Order External Id is mandatory when creating an order. Order Reference can only be used when updating an existing order.

Order Line Identification

Each order line must be uniquely identified using either:

FieldDescription
Order Line External IdExternal identifier of the order line.
Order Line IdInternal DJUST identifier of the order line.

To update an existing line, you must provide at least one of these. To create a new line, the Order Line External Id is required.

💡

Note

Order Line External Id is mandatory when creating a new line. Order Line Id can only be used when updating an existing line.


📋 Fields

Field name

Definition

Default Value

Order External Id

Unique external reference of the Order

Order Reference

Unique DJUST reference of the Order

Order Status

Represents the current state of the Order Logistic in its lifecycle. This status determines whether the order can still be modified

ORDER_DRAFT_ON_HOLD

Order Line External Id

Unique external reference of the Order Line

Order Line Id

Unique DJUST reference of the Order Line

Account External Id

Unique external reference of the Account provided in DJUST

Customer External Id

Unique external reference of the Customer provided in DJUST

The first Customer User associated with the Account

Supplier External Id

Unique external reference of the Supplier provided in DJUST

Order Line Quantity

The number of units ordered for the given product (Order Line)

Net Unit Price

The unit price of the product excluding taxes

The one associated with the Offer Price External Id

Gross Unit Price

The unit price of the product including taxes

Tax Amount

The tax amount per unit

Offer Price External Id

External identifier of the offer price associated with the product. Used to retrieve product and pricing information configured in DJUST (such as variant, unit, etc.).

Variant External Id

External identifier of the product variant. If not found in DJUST, it will still be stored on the order line without triggering an error.

Variant Name

The display name of the product variant as provided by the source system. This value is stored on the order line for informational purposes and is not matched against DJUST’s product catalog. It is especially useful when the referenced variant does not exist in DJUST

The one associated with the Variant External Id

Variant Description

A free-text description of the product variant, provided by the source system. This value is stored on the order line for informational purposes only and is not validated against any product data in DJUST. Useful for enriching the order line when the variant is not found in DJUST.

The one associated with the Variant External Id

Classification External Id

Unique external reference of the Classification associated with the Variant External Id

The one associated with the Variant External Id

Shipping Address Full Name

The full name of the recipient at the delivery address

The first Shipping Address associated with the Account

Shipping Address Country

The country where the order should be delivered

The first Shipping Address associated with the Account

Shipping Address Street Name

The street name and number of the delivery location

The first Shipping Address associated with the Account

Shipping Address City

The city or locality of the delivery address

The first Shipping Address associated with the Account

Shipping Address Zip Code

The postal or ZIP code of the delivery address

The first Shipping Address associated with the Account

Shipping Address State

The region, province, or state of the delivery address (if applicable)

The first Shipping Address associated with the Account

Shipping Address (Additional)

Optional free-text field for any extra delivery information (e.g. door code, apartment number, delivery notes)

The first Shipping Address associated with the Account

Mark Order Line For Deletion

Boolean flag used to indicate that the order line should be removed from the order

False

⚠️

Required Custom Fields

Any custom fields configured as required in DJUST must also be included in the CSV.


📌 Key Business Rules

Data format

  • Net Unit Price and Gross Unit Price must be numeric, using a dot (.) as decimal separator. Example: 12.50
  • Order Line Quantity must be a positive integer. Example: 3

Uniqueness

  • Order External Id and Order Line External Id must be unique across all orders.

Dependencies

  • If both Offer Price External Id and Variant External Id are provided:
    • The variant must exist in DJUST.
    • It must be linked to the provided offer.
  • If any of the following shipping fields is provided:Shipping Address Full Name, Country, Street Name, City, or Zip Code → then all of them become required.

Update Rules Based on Order Logistic Status

You can only perform certain updates depending on the current status of the Order Logistic:

ActionAllowed if Order Logistic status is…
Add an Order LineBefore or equal to PARTIALLY_SHIPPED
🔄 Update an existing Order LineBefore or equal to PARTIALLY_SHIPPED
❌ Delete an Order LineBefore or equal to PARTIALLY_SHIPPED
🆔 Set Order External IdAlways allowed (applies to Internal Orders)
🆔 Set Order Line External IdAlways allowed (applies to Internal Orders)
🔁 Change Order StatusAlways allowed (but must follow the workflow sequence)

General Requirements

  • An Order must contain at least one Order Line.
  • An Order Line from an External Order can reference a product that was not imported on DJUST.
  • An External Order must have at least one Supplier and one Account existing on DJUST.

📌

Best Practices

✔️ Ensure the CSV mapping matches DJUST’s fields.

✔️ Validate data format before upload.