---
id: JNY-COM-FUL-002
title: Operations staff recover and close a failed delivery
feature: FEAT-COM-FUL-02
product_area: commerce
module: fulfillment
revision: 1
status: draft
product_intent: proposed
implementation_evidence: observed
supersedes: []
source_sha:
  services-commerce: c8b66a98e2490617aec38ba5c8165dd9bd0a8f9b
  react-console: baf6dae382d6f41dce976c7f848667ccc37e076f
actor: ACT-COM-008
goal: >-
  Investigate failed delivery, attempt authorized recovery and retain the reason
  when staff close the work.
capabilities:
  - CAP-COM-FUL-004
  - CAP-COM-FUL-008
  - CAP-COM-FUL-005
screens:
  - '/console/{tenantId}/orders/operations'
  - '/console/{tenantId}/orders/{orderId}'
steps:
  - 'n': 1
    surface: commerce_obligation_worker
    action: Receive a permanent application refusal.
    capability: CAP-COM-FUL-004
    expected: The register retains its failure code and creates a delivery exception.
    provenance: test
    source: >-
      services-commerce:modules/fulfillment/tests/integration/services/register/obligation-worker.integration.spec.js#fails
      the obligation with the participant’s code, raises obligation_failed, and
      acknowledges the item
  - 'n': 2
    surface: '/console/{tenantId}/orders/operations'
    action: Open Operations and choose the failed-delivery group.
    capability: CAP-COM-FUL-008
    expected: 'The adapter supplies findings with order, customer and age context.'
    provenance: test
    source: >-
      react-console:lib/commerce/operations/__tests__/live.test.ts#reads the
      open and acknowledged findings of each service kind, every page, and
      completes the shown rows from the order
  - 'n': 3
    surface: acknowledgeOperationalException
    action: Acknowledge the exception with an explanation.
    capability: CAP-COM-FUL-008
    expected: Its state and order history reflect staff awareness.
    provenance: test
    source: >-
      services-commerce:modules/operations/tests/e2e/operations.e2e.spec.js#acknowledges
      then resolves the finding, with the interventions logged, the order’s
      history and the audit events recorded
  - 'n': 4
    surface: reauthorizeObligation
    action: Re-authorize failed work with a recorded reason.
    capability: CAP-COM-FUL-005
    expected: A fresh instruction is sent and the fixture application refuses it again.
    provenance: test
    source: >-
      services-commerce:modules/fulfillment/tests/e2e/obligation-register.e2e.spec.js#re-authorizes
      the failed obligation at sequence two, which the participant fails again,
      then resolves it with its exceptions
  - 'n': 5
    surface: resolveObligation
    action: Resolve the failed obligation with its settlement result.
    capability: CAP-COM-FUL-005
    expected: The obligation and its open exceptions become resolved.
    provenance: test
    source: >-
      services-commerce:modules/fulfillment/tests/e2e/obligation-register.e2e.spec.js#re-authorizes
      the failed obligation at sequence two, which the participant fails again,
      then resolves it with its exceptions
alternates:
  - from_step: 1
    condition: The application never answers its instruction.
    path: >-
      Redispatch once at acknowledgement expiry, then record lost
      acknowledgement.
    outcome: A finding identifies the missing acknowledgement.
    provenance: test
    source: >-
      services-commerce:modules/fulfillment/tests/integration/services/register/register-sweeper.integration.spec.js#fails
      it ack_lost on the next deadline, with the exception raised and the
      history line written
  - from_step: 4
    condition: Staff have evidence that in-flight delivery completed.
    path: Use service-side manual completion with evidence.
    outcome: Completion is retained and a subsequent application callback is rejected.
    provenance: test
    source: >-
      services-commerce:modules/fulfillment/tests/e2e/obligation-holds.e2e.spec.js#refuses
      the participant’s late callback as not in flight, leaving the manual
      completion
failures:
  - from_step: 4
    condition: Staff lack recovery authority.
    path: >-
      The menu marks re-authorization unavailable with its permission
      explanation.
    outcome: No recovery instruction is submitted.
    provenance: test
    source: >-
      react-console:lib/commerce/operations/__tests__/rules.test.ts#asks each
      intervention for its own key, so holding one does not offer another
rules_in_play:
  - BR-CAP-COM-FUL-004-05
  - BR-CAP-COM-FUL-008-03
  - BR-CAP-COM-FUL-008-06
  - BR-CAP-COM-FUL-005-02
  - BR-CAP-COM-FUL-005-05
assertions:
  - id: AS-JNY-COM-FUL-002-01
    statement: >-
      Staff interventions retain their reasons in the intervention log and order
      history.
    provenance: test
    source: >-
      services-commerce:modules/operations/tests/e2e/operations.e2e.spec.js#acknowledges
      then resolves the finding, with the interventions logged, the order’s
      history and the audit events recorded
  - id: AS-JNY-COM-FUL-002-02
    statement: Obligation resolution closes its related open exceptions.
    provenance: test
    source: >-
      services-commerce:modules/fulfillment/tests/e2e/obligation-register.e2e.spec.js#re-authorizes
      the failed obligation at sequence two, which the participant fails again,
      then resolves it with its exceptions
  - id: AS-JNY-COM-FUL-002-03
    statement: >-
      Recovery uses a fresh authorization and obsolete authorization cannot
      change its outcome.
    provenance: test
    source: >-
      services-commerce:modules/fulfillment/tests/integration/services/persistence/obligation-register.integration.spec.js#issues
      the next authorization for a failed obligation, naming the previous and
      superseding it; refuses any other state
e2e_policy: required
e2e_reason: >-
  Operations is a live console workflow that changes order work; adapter unit
  tests and service tests provide partial evidence, but an end-to-end browser
  scenario is still needed.
evidence:
  - >-
    services-commerce at c8b66a98e2490617aec38ba5c8165dd9bd0a8f9b: the
    end-to-end and integration suites named in the step and assertion sources.
  - >-
    react-console at baf6dae382d6f41dce976c7f848667ccc37e076f: the console pages
    and adapters named in the steps.
proved_by: []
---

# Operations staff recover and close a failed delivery

## Story

Operations staff notice failed delivery, inspect its order context and acknowledge the issue. They use their recovery authority to try delivery again. If the application still refuses, staff record how the failure is resolved so both delivery and its findings have an accountable conclusion.
