Here is a list of all the default statuses available for Order Fulfillments, as well as how the transitions to each occur.
See Changing Status for the implementation details of changing between these statuses.
NEW
The status a fulfillment starts in when it is newly generated in the CartOrderFulfillmentGenerationService
.
CAPTURING_PAYMENT
Indicates that payment is currently being captured for the fulfillment.
Note: Capturing payment for the fulfillment potentially involves claiming amounts that were previously captured during the checkout process.
CapturingPaymentStatusChangeHandler
NEW
API call to status change
AutoCaptureVirtualOrderCreatedListener
when a virtual fulfillment is generated during order creation (see Auto-capture After Order is Created)
FulfillmentCaptureWebhookListener
when a payment transaction results are received via a webhook, the transaction was successful, and all the captures are completed.
FulfillmentCapturingPaymentListener
to capture the entire fulfillment
By default, this is used to capture payments which were only authorized on checkout. However, if checkout is configured to capture already, this capturing flow can be skipped and go straight to FULFILLING
or FULFILLED
instead (see Intermediate Fulfilling Step).
CAPTURE_AWAITING_RESULT
Indicates that one or more capture transactions have been attempted for the fulfillment amount but the system is awaiting asynchronous transaction results. Note: if one of the captures is awaiting result in a multiple-payment scenario, then the order fulfillment will still have the awaiting result status.
Note
|
Most projects will not use this status. This status will only be used if support for asynchronous transaction results is enabled. Please refer to the following configuration section for more details. |
CaptureAwaitingResultPaymentStatusChangeHandler
CAPTURING_PAYMENT
API call to status change
FulfillmentCapturingPaymentListener
when one or more for payment capture transaction is awaiting results.
PAYMENT_CAPTURE_FAILED
Indicates that the fulfillment payment was unable to be captured.
PaymentCaptureFailedStatusChangeHandler
CAPTURING_PAYMENT
CAPTURE_AWAITING_RESULT
FulfillmentCapturingPaymentListener
when any transaction for payment capture failed
PAYMENT_CAPTURED
Indicates that the fulfillment payment was successfully captured.
PaymentCapturedStatusChangeHandler
CAPTURING_PAYMENT
CAPTURE_AWAITING_RESULT
PAYMENT_CAPTURE_FAILED
(see Handling Failures)
FulfillmentCapturingPaymentListener
when all transactions for payment capture succeeded
API call to status change (see Handling Failures)
FULFILLING
Indicates that the fulfillment is currently in the process of being fulfilled.
This status should be used when there is a system which can process virtual fulfillments. To use this status, the system responsible for virtual fulfillments must listen for this status change to FULFILLING
, attempt to perform the fulfillment, and then trigger Broadleaf to update this status to FULFILLED
or FULFILL_FAILED
.
This intermediate status is not enabled by default (see Intermediate Fulfilling Step).
FulfillingStatusChangeHandler
NEW
(if skipping payment capture; see Order Services Configuration)
PAYMENT_CAPTURED
API call to status change
AutoFulfillPaymentCapturedListener
after payment is captured, if configured to auto-fulfill (see Auto-fulfill After Payment is Captured)
AutoFulfillVirtualOrderCreatedListener
after order is created, if configured to auto-fulfill (see Auto-fulfill After Order is Created)
FULFILL_FAILED
Indicates that the fulfillment failed to be fulfilled.
Only used if FULFILLING
is being used. This status is not enabled by default (see Intermediate Fulfilling Step).
FulfillFailedStatusChangeHandler
FULFILLING
API call to status change
Custom message listener
FULFILLED
Indicates that the fulfillment has been fulfilled.
FulfilledStatusChangeHandler
NEW
(if skipping payment capture; see Order Services Configuration)
PAYMENT_CAPTURED
API call to status change
AutoFulfillPaymentCapturedListener
after payment is captured, if configured to auto-fulfill (see Auto-fulfill After Payment is Captured)
AutoFulfillVirtualOrderCreatedListener
after order is created, if configured to auto-fulfill (see Auto-fulfill After Order is Created)
CANCELLED
Indicates that the fulfillment has been cancelled.
CancelledStatusChangeHandler
NEW
PAYMENT_CAPTURED
PAYMENT_CAPTURE_FAILED
FULFILL_FAILED
REFUND_AWAITING_RESULT
API call to status change
PaymentReversalFulfillmentCancelledListener
to reverse authorize or refund payments, if applicable
REFUND_AWAITING_RESULT
Indicates that a refund request was sent to the payment gateway for this fulfillment, but we must wait to receive the transaction results asynchronously.
When the payment gateway has a result, it sends a webhook notification that is handled by PaymentTransactionServices webhook endpoints. Once the transaction results are recorded in PaymentTransactionServices, a message sent throughout the Broadleaf ecosystem to notify of the transaction results. This message is picked up by the FulfillmentAwaitingRefundResultWebhookListener
, which determines if the transaction is a refund related to a fulfillment, and if so, it attempts to determine the fulfillment can be given an updated status. The fulfillment status is changed from REFUND_AWAITING_RESULT
to CANCELLED
if the payment is refunded or reversed successfully and to REFUND_FAILED
if the payment wasn’t refunded.
CANCELLED
REFUND_FAILED
Indicates that payments were not successfully refunded for the fulfillment. This status may be used when cancelling previously-captured fulfillments or executing a fulfillment return.
CANCELLED
REFUND_AWAITING_RESULT