Order Creation and Validation Logic

This page describes how orders are created and validated within Djust OMS, including available entry points, configurable validation rules, and actor roles involved in the approval process.


🏗️ Order Creation Flows

Orders in Djust OMS can be created through different channels, depending on the client's B2B setup:

2. Frontend Checkout

  • Buyers create orders directly via the storefront.
  • Includes full cart, pricing, delivery, and payment configuration.

3. PunchOut Integration

  • Orders are created via external procurement systems.
  • Djust OMS acts as the receiving endpoint for these formats and turns them into native orders.

4. API-Based Integration

  • Orders can be pushed to Djust OMS through REST APIs.
  • Enables headless or 3rd-party frontend scenarios.

5. Data Hub Integration

  • Orders (or updates to existing orders) are injected into Djust OMS via the Djust Data Hub.
  • Two modes are supported:
    • CSV injection: files are retrieved and processed through scheduled jobs (e.g., every 15 minutes).
    • Remote API job orchestration: the Data Hub acts as a middleware and calls external APIs (e.g., ERP or partner systems) to fetch order data and push it into Djust.
  • This flow is suited for legacy systems or controlled batch workflows where real-time integration isn't possible.

6. Manual Backoffice Entry (Roadmap)

  • Sales or support users create orders on behalf of customers.
  • Useful for phone/email-based workflows or account-specific negotiation.

⚙️ Validation Logic

Once created, an order can go through multiple validation steps, which are configurable per client.

✅ Buying Policies - Customer-Side Validation

Optional approval steps by the buyer organization before the order is submitted to the supplier:

  • Budget control
  • Managerial approval
  • Procurement policy compliance

Status: Waiting Customer Approval

✅ Supplier-Side Validation

After customer submission, the supplier may need to review the order before accepting it:

  • Product availability
  • Pricing validation
  • Minimum quantity checks
  • Internal ERP sync or human review

Status: Waiting Supplier Approval


👥 Role-Based Actions

ActorResponsibility
BuyerCreates order, may trigger approval flow
Approver (Buyer)Validates the order according to internal policy
SupplierReviews and accepts/rejects the order
Sales/AdminCan override, cancel, or place orders manually

🔁 Configurable Business Rules (Roadmap)

Djust OMS allows fine-grained control over when and how validation happens:

  • Trigger customer approval based on:

    • Amount thresholds
    • Delivery location
    • Product types
  • Trigger supplier approval only for:

    • New customers
    • Orders over a certain value
    • Orders with custom pricing

These rules can be adjusted per tenant and exposed through APIs or UI.


📥 Draft and On Hold Use Cases

  • Draft: A saved but not submitted order, fully editable. It acts as a cart.
  • On Hold: Optional status enabling third-party review before order is finalized (e.g., accounting check, purchase committee review).

🚦 Outcome of Validation

An order can result in:

  • Accepted By Supplier → proceeds to shipment
  • Declined By Customer or Declined By Supplier → ends the flow
  • 🔁 Re-submitted after modification

Each outcome is logged and available for audit.