{
  "test_id": "ORCL.O2C.OM.CHG.CANCEL",
  "scenario_name": "Cancel Sales Order",
  "application": "Oracle Fusion Cloud",
  "product": "SCM / Order Management",
  "module": "Order Management",
  "process": "Order Changes",
  "business_flow": "Order-to-Cash",
  "scenario_type": "Positive / Functional",
  "priority": "High",
  "automation_status": "SyntraFlow Ready",
  "library": "Syntra Standard",
  "canonical_url": "https://www.syntraflow.cloud/oracle-erp-testing-tool/test-library/scm/order-management/order-changes/cancel-sales-order/",
  "objective": {
    "intro": "The objective of this test is to verify that an authorized Order Management user can cancel an entire sales order, or a specific order line within it, in Oracle Fusion at various points in the fulfillment lifecycle, and confirm the resulting status and release of any reserved supply.",
    "confirms": [
      "the selected sales order or order line is eligible for cancellation given its current fulfillment status",
      "an entire unfulfilled sales order can be cancelled, and a single line can be cancelled independently on a multi-line order",
      "the cancellation reason is accepted and retained against the transaction where a reason code is required",
      "the cancelled order or line status correctly updates to Cancelled",
      "reserved supply associated with a cancelled line is correctly released back to available-to-promise",
      "other lines on the order remain unaffected when only a single line is cancelled",
      "cancellation is correctly blocked or restricted once shipment or invoicing has occurred",
      "the cancellation is retained in order history rather than removing the record"
    ],
    "scope_note": "This scenario does not claim that every downstream shipment, invoicing or credit interaction is covered — those depend on the customer's specific Oracle Fusion configuration and are addressed by separate test scenarios."
  },
  "preconditions": [
    "Oracle Fusion Order Management is configured and available to the test user.",
    "An existing submitted sales order exists, with at least one line eligible for cancellation.",
    "The order or line has not already shipped or been invoiced, where full cancellation is required.",
    "The order or line has not already been cancelled.",
    "The test user has the appropriate security/privilege to cancel sales orders."
  ],
  "test_data": [
    {
      "field": "Order Number",
      "example": "${ORDER_NUMBER}"
    },
    {
      "field": "Item",
      "example": "${ITEM}"
    },
    {
      "field": "Line Status",
      "example": "${LINE_STATUS}"
    },
    {
      "field": "Cancellation Scope",
      "example": "Full Sales Order or Specific Line"
    },
    {
      "field": "Fulfillment Stage",
      "example": "Before Reservation / After Reservation / Shipped / Invoiced"
    },
    {
      "field": "Reserved Quantity",
      "example": "${RESERVED_QUANTITY}"
    },
    {
      "field": "Cancellation Reason",
      "example": "${CANCEL_REASON}"
    },
    {
      "field": "Order Entry Specialist",
      "example": "${ORDER_ENTRY_SPECIALIST}"
    }
  ],
  "business_steps": [
    {
      "step_number": 1,
      "step_name": "Sign In to Oracle Fusion",
      "action": "Sign in to Oracle Fusion Cloud with a user that holds sales order cancellation privileges.",
      "test_data": "${ORDER_ENTRY_SPECIALIST}",
      "expected_result": "The user successfully signs in and lands on the Oracle Fusion home page.",
      "validation_type": "action"
    },
    {
      "step_number": 2,
      "step_name": "Navigate to the Sales Order",
      "action": "Navigate to the Order Management work area and search for the target sales order.",
      "test_data": "${ORDER_NUMBER}",
      "expected_result": "The correct sales order is located and its current status is confirmed as eligible for cancellation.",
      "validation_type": "action",
      "note": "This single business step replaces multiple technical actions such as opening search, entering the order number, clicking Search and selecting the result."
    },
    {
      "step_number": 3,
      "step_name": "Select Cancel (Full Order or Specific Line)",
      "action": "Select the Cancel action for the entire sales order, or for a specific line where only a line-level cancellation is required.",
      "test_data": "${ITEM}",
      "expected_result": "The Cancel Order (or Cancel Line) page or dialog opens for the selected scope.",
      "validation_type": "action"
    },
    {
      "step_number": 4,
      "step_name": "Enter Cancellation Reason",
      "action": "Enter the reason for cancelling the sales order or line.",
      "test_data": "${CANCEL_REASON}",
      "expected_result": "The cancellation reason is accepted without unexpected validation errors.",
      "validation_type": "action"
    },
    {
      "step_number": 5,
      "step_name": "Review Impact on Reserved Supply",
      "action": "Review the reserved supply, if any, that will be released as part of the cancellation before submitting.",
      "test_data": "",
      "expected_result": "The reserved-supply impact of the cancellation is correctly displayed for review.",
      "validation_type": "action"
    },
    {
      "step_number": 6,
      "step_name": "Confirm Cancellation",
      "action": "Confirm and submit the cancellation.",
      "test_data": "",
      "expected_result": "Oracle Fusion successfully processes the cancellation request without unexpected errors.",
      "validation_type": "action"
    },
    {
      "step_number": 7,
      "step_name": "Verify Status Updated",
      "action": "Confirm the sales order's or line's status following the cancellation.",
      "test_data": "${LINE_STATUS}",
      "expected_result": "Order or line status updates to Cancelled, with the cancellation reason correctly recorded where required.",
      "validation_type": "business_assertion"
    },
    {
      "step_number": 8,
      "step_name": "Verify Reserved Supply Released",
      "action": "Confirm that any reserved supply for the cancelled scope has been released, and that other lines on the order are unaffected.",
      "test_data": "${ORDER_NUMBER}",
      "expected_result": "Reserved supply is correctly released back to available-to-promise, and remaining order lines are unaffected by the cancellation.",
      "validation_type": "business_assertion",
      "note": "This is the main business assertion for the scenario — a cancellation must correctly release reserved supply and must not silently remove order history."
    }
  ],
  "expected_results": [
    "An entire eligible sales order, or a specific eligible line, cancels successfully.",
    "Order or line status updates correctly to Cancelled.",
    "Cancellation reason is correctly recorded where required.",
    "A cancelled full order and a cancelled single line both behave correctly, and other lines remain unaffected by a single-line cancellation.",
    "Reserved supply associated with the cancelled scope is correctly released back to available-to-promise.",
    "Cancellation is correctly blocked or restricted once shipment or invoicing has occurred.",
    "The cancellation remains traceable in order history.",
    "No unexpected save errors occur."
  ],
  "validation_checkpoints": [
    "Cancelled order or line status updates correctly.",
    "Reserved supply is correctly released back to available-to-promise.",
    "Other lines on the order remain unaffected by a single-line cancellation.",
    "Cancellation history and audit trail are correctly recorded."
  ]
}
