Order workflow¶
Order statuses and changes¶
There are 2 ways of working with orders
- Going step by step through the order process using specific endpoints, which will update the status of the order respectively.
- Place/save the whole order and set the desired status. The status can not be set by the client directly "to specific status, i.e. Checkout". The API always goes through the whole process step by step and stops at the desired status or on validation problems. Setting the desired status is optional. The default desired status is "checkout".
The graph above shows the order workflow, you can observe the different order status. Furthermore, the needed entries to fulfill/ validate each stage (status) of the order and the response after entering each status.
status | 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" If the order was canceled. If the product allows it the order can be canceled in the partner portal. |
no | OrderCancelled |
Expired | order has never reached status paid and wasn't touched for a defined time. But customer could resubmit the order like it would be in status 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 status really exist. |
no |
Order item statuses¶
Order item statuses can not be set or requested by the client individually they are a result of the process in the order state machine
status | description |
---|---|
New | shopping basket |
ValidationError | indicates a validation error in the item |
Checkout | order-item was not placed (pre-bookings weren't requested) |
Placed | ready to continue with payment |
InTransit | fulfillment in progress |
Delivered | items delivered |
PartiallyCanceled | some but not all tickets are canceled |
Canceled | all tickets are canceled |
Error | error occurred, but no money involved. If order item in that status, it's necessary to remove that order item or update it |
FulfillmentError | serious problem and relevant for the business The support-team needs to take care of it |
Ticket verification states¶
Ticket do not really have a state but they have 2 related things:
- isActive: yes/no → Ticket exists or is deleted/not valid/"torn apart"
- ticketVerificationStatus
status | description |
---|---|
(empty), null | No check required (default) |
AutomaticVerification | Ticket will be processed by the automatic verification function |
ToCheck | To be checked |
Trusted | Trusted → see Annual and seasonal passes Arosa Lenzerheide#1.12---Automatically-set-the-state-„trusted“-(9238) |
InProgress | In progress |
Confirmed | Checked, confirmed |
Rejected | Rejected |
Error | in case of an error while processing |
Canceled | canceled tickets instead of isActive in the order download and CRM export (notification service) |
Fulfilled | if ticket is active and there is no TicketVerificationState (only in the search index in the partner portal) |