Postman collection
Direct-Fulfillment Write

pixiSetFulfillmentOptions

Sets the direct fulfillment type (DF_type) of one orderline or of all orderlines of an order and resets editable lines to status ANG.

Assigns a direct fulfillment type to orderlines and returns the result per orderline.

  1. If DF_Type is 0, it is treated as NULL, i.e. the fulfillment type is removed.
  2. The orderlines to process are collected:
    • OrderlineKey > 0: this single orderline is added (without checking its status or whether it exists).
    • OrderNr > 0: all orderlines of this order whose Status is not HAL (on hold) are added.
    • Both parameters can be combined; if neither is > 0, nothing is processed and an empty result set is returned.
  3. Each collected orderline is checked for editability. An orderline is not editable (IsEditable = 0) if
    • the order history (OrderHistory) contains an entry for it with a status other than HAL, ANG, BES, FUT, NEW, or a FUT entry with ClientNotified = Y, or
    • it is on a picklist (PLitem/PLHeader) whose expiry date PLHexpiryDate is in the future. Otherwise it is editable (IsEditable = 1).
  4. For all editable orderlines DF_type is set to the given value and Status is set to ANG.
  5. One row per collected orderline is returned with the current order number, key, status, DF type and the editability flag.

Notes

  • The update runs in its own transaction, or as a savepoint if the caller already has an open transaction.
  • The status of every editable orderline is set to ANG, regardless of its previous status. An orderline passed directly via OrderlineKey is not filtered for HAL, so an orderline on hold can be released to ANG this way.
  • If the same orderline is passed via OrderlineKey and belongs to OrderNr, it appears twice in the result.
  • If OrderlineKey does not exist, a row with NULL in all orderline columns and IsEditable = 1 is returned.
  • Lookups on Orderlines, OrderHistory, PLitem and PLHeader use NOLOCK; the result set is also read with NOLOCK.
  • On an error the transaction is rolled back, the error is logged via log.InsertError (definition not attached) and an error row is returned instead of the result rows.

Tables used

Orderlines · Write OrderHistory · Read PLitem · Read PLHeader · Read
SQL object:
dbo.pipiSetFulfillmentOptions
Updated at 2026-10-30