---
# System prepended metadata

title: Untitled

---



ISSUES
- Make subtotal, tax, and shipping optional in product and order schema. Default to 0.

- Refactor order-storage
    - Save on the timeline the whole order when it is an add/update event.
    - This removes the need of an orders an line_items table, since we keep the whole order serialized as JSON.
    - Add an additional possible status for the order `Imported`, that allows the line items to have different status.
    - Timeline schema: order_id PK, update_date (nosso/processed) PK, state, order object (timestamp (createdAt), order details, line items)
    - evaluate if how easy it would be to migrate the orders 

- Change lineItemId to be optional.
- Readd the `purchase` event listener. Use approach previously defined to set the lineItemId.
- Remove lineItem specific status change. 
    - remove `orderUpdate` event