INCIDENT

This page describes how Order Incidents are exported from DJUST to your systems through the API Connector, and details the exported payload and fields.

⚙️ Introduction

This job exports Order Incidents from DJUST to an external system via the API Connector.

You can:

  • Export an Incident declared on an Order or on one or several Order Lines
  • Export the reason of the Incident and the affected Order Lines with their quantities
  • Map each DJUST field to the body parameter expected by your API
📌

API Connector only

The INCIDENT object is exportable through the API Connector only. SFTP export is not available for this entity — see Exportable Entities per Method.

💡

Incident Data Model

An Incident is declared on a logistic order (linkedType = ORDER) or on one or several logistic order lines (linkedType = ORDER_LINES).

  • Incidents are grouped by functional ID, even when several Order Lines are affected: one Incident carries the list of its impacted lines.
  • Incident statuses are OPEN, ON_GOING and CLOSED. When an Incident targets Order Lines, each impacted line carries its own status, independent from the Incident status.

For the full functional behaviour, see Order Incident Management (Order & Order Line).

💡

Export trigger

An Incident is exported when it reaches one of the trigger statuses configured on the job (OPEN, ON_GOING, CLOSED), the first time it reaches it. If the status does not change, no further export occurs — regardless of any other change on the Incident.

Trigger statuses are selected when creating the export job: see Job Configuration - Export - API Connector.


📂 Export model

API Connector

The API Connector pushes one JSON payload per Incident to your endpoint. The content of the payload is defined by the mapping configured on the job: each DJUST field is mapped to the body parameter expected by your API.

Example – Incident - JSON Export
{
 "orderIncidentId":"INCIDENT_1234",
 "orderIncidentExternalId":"4567",
 "orderReference":"172-189-1896838-1",
 "createdAt":"2024-06-04T10:30:00Z",
 "incidentStatus":"OPEN",
 "reasonCode":"RC001",
 "reasonDescription":"Broken product on delivery",
 "supplierExternalId":"SUPP_321",
 "accountExternalId":"ACC_777",
 "orderLineIncident":[
    {
       "orderLineId":"16841984844",
       "orderLineExternalId":"OLINE_5678",
       "incidentLineStatus":"OPEN",
       "variantExternalId":"489156",
       "incidentLineQuantity":1
    }
 ]
}

📋 Fields

The fields below are the DJUST fields available in the mapping panel of an API Connector export job. The keys shown in the example above are the DJUST default names — map each of them to the name expected by your API.

Incident level

FieldDefinition
orderIncidentIdInternal unique identifier of the Incident
orderIncidentExternalIdExternal unique identifier of the Incident
orderReferenceInternal unique identifier of the related Order Logistic
createdAtTimestamp when the Incident was created
incidentStatusStatus of the Incident at the Order Logistic level: OPEN, ON_GOING or CLOSED
reasonCodeCode that explains the reason of the Incident
reasonDescriptionBuyer message related to the Incident
supplierExternalIdExternal ID of the Supplier
accountExternalIdExternal ID of the Account
orderLineIncidentList of affected Order Lines

Order Line Incident level

FieldDefinition
orderLineIdInternal ID of the Order Line
orderLineExternalIdExternal ID of the Order Line
incidentLineStatusStatus of the Incident at the Order Line level: OPEN, ON_GOING or CLOSED
variantExternalIdExternal ID of the Product Variant ordered
incidentLineQuantityNumber of items concerned by the Incident at the Order Line level

🧠 Key Business Rules

  • An Incident is exported only once per status. Reaching the same status again does not trigger a new export.
  • The Incident status and the statuses of its lines are independent: closing an Incident does not close its lines, and closing every line does not close the Incident.
  • An Incident declared at Order level has no orderLineIncident entries; an Incident declared at Order Line level carries one entry per impacted line.
  • Custom Fields are not exported on Incidents, even when they are declared on the Incident or on its lines.
  • Only one endpoint per export job is supported.
  • Incident statuses can be fed back into DJUST by your ERP, either through a Data Hub import or through the administration API — see Updating incident statuses.
📌

Best Practices

✔️ Export the CLOSED status as well if your system needs to know when a claim is settled — statuses are not pushed again once exported

✔️ Map the Order Line identifier your system uses (orderLineId or orderLineExternalId) so that the Incident can be reconciled with the Order previously exported

✔️ Keep orderIncidentExternalId filled on your side to reconcile status feedback sent back to DJUST


Did this page help you?