summaryrefslogtreecommitdiff
path: root/design-documents/017-backoffice-inventory-management.rst
blob: 8275e7a76c884559a82b01a105b5a9f020e0b674 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
Design Doc 017: Backoffice Inventory Management
###############################################

Summary
=======

This document describe the complete list features for inventory management and
how will be shown.

Motivation
==========

User will use the backoffice to manage their inventory, prices and update stock.

Requirements
============

Access all information provided from the Merchant Backend API in a
understandable and accessible way

User should use the backoffice to manage inventory by:

* creating new products
* updating the products information
* inspecting inventory list
* deleting products from the inventory list

Proposed Solution
=================

Inspecting inventory
--------------------

.. image:: ../backoffice-product-list.svg
  :width: 800

Listing the product will shown this columns:

* image
* description
* sell price
* stock left (with next_restock in days if present)
* stock sold

Actions will be

* modify
* delete: with a confirm popup, it may fail if have some locked


Create and Update Product form
------------------------------

.. image:: ../backoffice-product-create.svg
  :width: 800
  
Update product will use the same form except for the ``product_id``

* product_id: BACKOFFICE_URL + id
* description: split in two fields, concatenated with a line separator

  * name: required, one line
  * extra: optional, free text area

* description localized: list with 

  * lang: dropdown list with supported lang + custom
  * description: text area

* unit: string
* price: amount
* image: image box that allows upload when clicked
* taxes: list with

  * name: string
  * value: amount

* Stock: button that opens more fields for stock control

  * stock remaining: number
  * address: first collapsed, then field for Location
  * next_restock: date
  * cancel: button to set the stock to infinity, closing the section

Stock management
----------------

* ``manage stock`` button will open the dialog below

* ``without stock`` will close the dialog and set stock props to not defined

* ``set/change`` button will open next restock sub dialog

* ``update`` button will close subdialog and set the next restock value to input date

* ``not known`` button will close subdialog and set next restock value to undefined

* ``never`` button will close subdialog and set next restock to never

* ``add`` button will show an input to increase the stock

* if stock as added ``add`` button will be ``add more`` and a label with ``+ <number>`` will be shown

* when updating the product, the option ``without stock`` will no be available 
  if the product already has stock

* when creating the product, ``current stock`` will be an input number
  
* when updating the product, ``current stock`` will be read only with a button ``update``

* when updating the stock, a new subdialog will appear with a confirm button.

.. image:: ../backoffice-product-create.stock.svg
  :width: 800


Alternatives
============

* price and stock columns in the list can be merged into a more complex column
  with the same information 

* rows in the table can be expandable when clicked to get access to some common
  actions like increase stock or change price

.. image:: ../backoffice-product-list.actions.svg
  :width: 800

* detail page was intentionally left out since all information can be access
  from the update page 

Q&A
===

* can we add the quantity locked in the product description? so we can add it
  to the inventory list to reflect the current activity.

* can we allow add extra data like order has in contractTerm?, this could be
  useful for frontend apps. example of usage: country/state to where the product
  is sold since taxes may vary