Spike: Improvements for Order model
Problem
@jejacks0n raised some concerns in the issue on the direction of the Customers Portal around the Order
model. We as engineers working in the Portal have all experienced frustrations around this model. Here are some of the problems that have surfaced:
- It is sort of a kitchen sink for all customers transactions.
- Contains minimal validations which can lead to data integrity issues.
- No formally defined state.
- Lack of documentation around those states or the model in general.
There are many different types of "things" that can be purchased:
- As a SASS subscription
- As a License
- As a Trial of a SASS subscription
- As a Trial of a License
- As an Add-on (CI minute or Storage; probably more in the future)
The handling of these different types of things downstream is actually quite different (expiring a sass subscription vs. a license for instance), but they're hard to understand without clear documentation and validation, which is currently lacking. This ultimately has, and will continue to drive a lot of issues we see in data integrity all the way into the communication between the different systems.
Proposal
Determine a plan of action to improve Orders by introducing state, validations, and documentation. It could be an opportunity to introduce new models that derive from Order (like SassSubscription) for instance.
Result
A plan that leads to more confidence and less frustration from engineers when working with Orders.