ORDER
This page describes how to import and manage Orders in DJUST — create External Orders from your ERP, update Internal Orders and their lines, and synchronize order statuses via CSV or API Connector.
⚙️ Introduction
This job allows the creation and update of Orders via CSV import or API Connector.
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 ModelIn 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
📂 Import model
CSV Structure
The CSV file must contain one row per Order Line. Multiple rows may belong to the same Order Logistic.
TemplateYou can use the following spreadsheet as a template to structure your import:
API Connector
The API Connector sends data as a JSON payload. The JSON must always be a list of objects, regardless of the use case (create, update, delete).
[
{
"orderExternalId": "string",
"orderReference": "string",
"orderStatus": "string",
"accountExternalId": "string",
"customerExternalId": "string",
"supplierExternalId": "string",
"shippingAddressFullName": "string",
"shippingAddressCountry": "string",
"shippingAddressStreetName": "string",
"shippingAddressCity": "string",
"shippingAddressZipCode": "string",
"shippingAddressState": "string",
"shippingAddressAdditional": "string",
"orderLines": [
{
"orderLineExternalId": "string",
"orderLineId": "string",
"offerPriceExternalId": "string",
"variantExternalId": "string",
"variantName": "string",
"variantDescription": "string",
"classificationExternalId": "string",
"orderLineQuantity": 0,
"netUnitPrice": 0,
"grossUnitPrice": 0,
"taxAmount": 0,
"markOrderLineForDeletion": false
}
]
}
]📋 Fields
| Field | Definition | Required for creation | Required for update | Editable | Default Value |
|---|---|---|---|---|---|
Order External Id | Unique external reference of the Order | ✅ | ☑️ (Unless Order Reference is provided) | ✅ (Only if the value is not yet set for Internal Orders) | |
Order Reference | Unique DJUST reference of the Order | ☑️ (Unless Order External Id is provided) | |||
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 | ✅ | ☑️ (Unless Order Line Id is provided) | ✅ (Only if the value is not yet set for Internal Orders) | |
Order Line Id | Unique DJUST reference of the Order Line | ☑️ (Unless Order Line External Id is provided) | |||
Account External Id | Unique external reference of the Account provided in DJUST | ✅ | ✅ | ||
Customer External Id | Unique external reference of the Customer provided in DJUST | ✅ | If not provided, the order is linked with the first Customer User associated with the Account External Id | ||
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 | ☑️ (Unless Offer Price External Id is provided) | ☑️ (Unless Offer Price External Id is provided) | ✅ | |
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, tax rules, etc.) | ☑️ (Unless Variant External Id and/or Net Unit Price are provided) | ☑️ (Unless Variant External Id and/or Net Unit Price are provided) | ✅ | |
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 | ☑️ (Unless Offer Price External Id is provided) | ☑️ (Unless Offer Price External Id is provided) | ✅ (If both Offer Price External Id and Variant External Id are provided, the variant must exist in DJUST and be linked to the corresponding Offer Price External Id) | |
Variant Name | The display name of the product variant as provided by the source system. Stored on the order line for informational purposes, not matched against DJUST's product catalog. 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. Stored for informational purposes only, not validated against any product data 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 | ☑️ (Required if any shipping field is filled¹) | ☑️ (Required if any shipping field is filled¹) | ✅ | The first Shipping Address associated with the Account |
Shipping Address Country | The country where the order should be delivered | ☑️ (Required if any shipping field is filled¹) | ☑️ (Required if any shipping field is filled¹) | ✅ | The first Shipping Address associated with the Account |
Shipping Address Street Name | The street name and number of the delivery location | ☑️ (Required if any shipping field is filled¹) | ☑️ (Required if any shipping field is filled¹) | ✅ | The first Shipping Address associated with the Account |
Shipping Address City | The city or locality of the delivery address | ☑️ (Required if any shipping field is filled¹) | ☑️ (Required if any shipping field is filled¹) | ✅ | The first Shipping Address associated with the Account |
Shipping Address Zip Code | The postal or ZIP code of the delivery address | ☑️ (Required if any shipping field is filled¹) | ☑️ (Required if any shipping field is filled¹) | ✅ | 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 |
Conditionally required¹ These fields become required if at least one of them is provided. This rule does not apply to
Shipping Address StateorShipping Address (Additional).
Required Custom FieldsAny custom fields configured as required in DJUST must also be included.
Order Identification
Each order must be identified using at least one of the following fields:
| Field | Description |
|---|---|
Order External Id | Unique external identifier of the order |
Order Reference | DJUST reference of the order |
If both are provided,
Order Referencetakes precedence.
Order External Idis mandatory when creating an order.Order Referencecan only be used when updating an existing order.
Order Line Identification
Each order line must be identified using at least one of the following fields:
| Field | Description |
|---|---|
Order Line External Id | External identifier of the order line |
Order Line Id | Internal DJUST identifier of the order line |
To create a new line,
Order Line External Idis required. To update an existing line, provide at least one of these fields.
🧠 Key Business Rules
Use cases and required fields
Create an External Order
Required fields: Order External Id, Account External Id, Customer External Id, Supplier External Id, Order Line External Id, Offer Price External Id (or Variant External Id), Order Line Quantity, Net Unit Price.
Update an External Order or its Lines
Required fields: Order External Id (or Order Reference), Order Line External Id (or Order Line Id).
Update an Internal Order
An Internal Order is an order created natively in DJUST (not imported from an external system). You can update it by providing Order Reference to identify it, along with the fields to update. Order External Id and Order Line External Id can be set on an Internal Order at any time.
Update an Order Status
Provide Order External Id (or Order Reference) and set Order Status to the desired target status. Status updates must follow the order lifecycle sequence.
Data format
Net Unit PriceandGross Unit Pricemust be numeric, using a dot (.) as decimal separator. Example:12.50Order Line Quantitymust be a positive integer. Example:3
Uniqueness
Order External IdandOrder Line External Idmust be unique across all orders.
Import execution order
The processing of imported data does not follow a strict FIFO order. If the same Order Line appears multiple times within a single import with different values, the final result may not reflect the last occurrence. Avoid sending duplicate Order Lines with conflicting updates within the same import execution.
Dependencies
- If both
Offer Price External IdandVariant External Idare provided, the variant must exist in DJUST and be linked to the provided offer. - If any shipping address field is provided (
Full Name,Country,Street Name,City, orZip Code), then all of them become required.
Update rules based on Order Logistic status
| Action | Allowed if Order Logistic status is… |
|---|---|
| Add an Order Line | Before or equal to PARTIALLY_SHIPPED |
| Update an existing Order Line | Before or equal to PARTIALLY_SHIPPED |
| Delete an Order Line | Before or equal to PARTIALLY_SHIPPED |
Set Order External Id | Always allowed (applies to Internal Orders) |
Set Order Line External Id | Always allowed (applies to Internal Orders) |
Change Order Status | Always allowed (must follow the lifecycle sequence) |
General requirements
- An Order must contain at least one Order Line.
- An Order Line from an External Order can reference a product not imported in DJUST.
- An External Order must reference at least one Supplier and one Account existing in DJUST.
Best Practices✔️ Always use
Order External Idwhen creating orders from an external system.✔️ Ensure the mapping matches DJUST's fields before running the import.
✔️ Validate data format (prices, quantities) before upload.
✔️ Avoid duplicate Order Lines with conflicting values in the same import file.
Updated about 13 hours ago
