Order workflow¶
Order states and changes¶
There are 2 ways of working with orders
- going forward through the process step by step using specific endpoints and set-new-state
- place/save the whole order and set the desired state.
State can never be set by the client directly. The api always goes through the whole process step by step and stops at the desired state or on validation problems.
Setting the state is optional. The default state is "checkout".
Refer to the graphic above to determine which state changes are available and what must be validated on entry and what will be done after entering the state.
state | description | order can be modifed | schema.org/OrderStatus |
---|---|---|---|
new | shopping basket | yes | |
checkout | shopping basket validated-items |
yes | |
placed | ready to continue with payment | yes | |
payment | payment in progress (on client side) | no | OrderPaymentDue |
paid | payment confirmed | no | |
inTransit | fulfillment in progress | no | OrderInTransit |
delivered | items delivered | no | OrderPickupAvailable ? |
fulfilled | order and payment completed | no | OrderDelivered |
canceled | "storniert" The support-team has taken take care of it. In the MVP there is no possibility to cancel an order by the customer. |
no | OrderCancelled |
expired | order has never reached state paid and wasn't touched for a defined time. But customer could resubmit the order like it would be in state checkout | yes | |
error | error occurred, but no money involved | no | OrderProblem |
fulfillmentError | serious problem and relevant for the business The support-team needs to take care of it |
no | |
deleted | the order gets removed from the database so no orders in this state really exist. |
no |
Order item states¶
Order item states can not be set or requested by the client individually they are a result of the process in the order state machine
state | description |
---|---|
new | shopping basket |
validationError | indicates a validation error in the item |
placed | ready to continue with payment |
inTransit | fulfillment in progress |
delivered | items delivered |
error | error occurred, but no money involved |
fulfillmentError | serious problem and relevant for the business The support-team needs to take care of it |
Last update: June 17, 2020 12:05:23