Order Processing Pipelines
Order processing pipelines are workflows executed automatically when an order moves from one status to another. When an order status changes, the pipeline associated with the new status is executed and can be customized for business logic and integrations.
The way to customize the order processing pipelines differs slightly from regular pipelines. It happens on a dedicated pipeline builder and requires an alias identifier for each pipeline.
Ucommerce comes with the following order processing pipelines out of the box:
Pipeline Alias | Order Status Trigger |
---|---|
ToCompletedOrder | Order set as completed |
ToCancelled | Order set as cancelled |
Implementing a Task
Tasks are implemented in the same way as other pipelines in Ucommerce by creating a new class that inherits from the interface
IPipelineTask<OrderProcessingInput, OrderProcessingOutput>
.
See Implementing a Task section on the Extending Pipelines page for details.
Adding a Task
Adding a task is done through the PaymentBuilder
returned by the AddPayments
extension method on IUcommerceBuilder
. It is recommended that you create an extension method to add your configuration.
Replace a task by placing your custom task before or after the default task, then remove the default task.
Use the extension method to register tasks
Last updated