Table of Contents | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Context
Stock disposition is used to track temporarily unavailable stocks. Stock queries can take it into account for a stock export tempory stocks types, which can serve to flag temporarily unavailable units, or flag unites as undergoing a specific operation. Stock with dispositions can be deducted in stock queries, making unites unavailable in stock exports https://onestock.atlassian.net/wiki/spaces/DOCUMENTAT/pages/357007377/Stock+queries#Deductions. It should be reset during the next stock import to ensure consistency.
The acronym UATF means ‘Unable to Fulfill’stands for 'Unable to Fulfill', indicating that the store has temporarily unavailable stocks during order preparation.
Setting up dispositions
Configure dispositions
Adding a new disposition
You can define your own stock dispositions and give them the name you want. Each disposition has a key and a linked attribute.
The key is just an identifier, which is not meant to be displayed. You will see in the next paragraph how to define translations to have a name ready for display, in each language.
By default, the linked attribute . Attributes can be set to: in_stock
or not_in_stock
. These attributes are referenced in stock queries, and to allow user to easily deduct all dispositions linked to a given attributemarked as not_in_stock
.
Keys and attributes are configured in the backoffice, both from Configuration > Stock > General stock parameters
and Configuration > Store App > General Settings > UATF Reasons
Adding backoffice translations
To display a clean disposition name in the backoffice, you need to define a translation.
To do so, you need to add a backoffice translation for a new translation key: this key must be stock.dispositionTypes.<disposition_key>
Replace <disposition_key>
by the key you defined earlier for your stock disposition.
Here is the instruction to add a backoffice translation key: https://adminonestock.onestock-retail.com/c00/config/view/stock?subpath=stock.params page of the back office.
atlassian.net/wiki/spaces/DOCUMENTAT/pages/226492426/Translations#Add-a-new-translation-key
Setting up dispositions proposed in the Store App
(optional)Dispositions are also utilized to flag “unfulfillable” lines in the Store App. In cases situations where a product line cannot be prepared at the store due to missing either insufficient available stock or faulty defective remaining stock, dispositions can be applied implemented to flag mark the line and render it unavailablemake it unavailable.
You may decide to propose all the stock dispositions you defined before, or propose only some of them in the Store App (and for example, use the others only for warehouse stock dispositions).
“Unfulfillable” reasons are configured at Configuration/Store App/General Settings/UATF Reasons
those flagged as Store App enabled, this change can be donde both from Configuration > Store App > General Settings > UATF Reasons
or Configuration > Stock > General stock parameters
The configuration page displays all dispositions already configured in the stock page (above section). If you want to add a new UATF reasonstock disposition, you first have to add it the the Stock configuration .
(see paragraphe above).
For each stock disposition, you can define:
comment:
No comment: the user that marks the item as unavailable with this reason will not have the possibility to add a comment.
Optional comment: the user that marks the item as unavailable with this reason can add a comment to explain why it is unavailable.
Required comment: the user that marks the item as unavailable with this reason must add a comment to explain why it is unavailable.
Store App Enabled:
if enabled, this reason will be proposed to the users in the Store app.
if disabled, this reason will not be proposed in the Store app.
The Store App pages that support UATF declarations marking items as unavailable are the preparation pages, that is: pack
, pack_scan
, bag
, bag_scan
and picking
.
Adding store application translations
To display a clean disposition name in the Store App, you need to define a translation.
To do so, you need to add a Store app translation for a new translation key: this key must be uatf.<disposition_key>
Replace <disposition_key>
by the key you defined earlier for your stock disposition.
Here is the instruction to add a Store app translation key: https://onestock.atlassian.net/wiki/spaces/DOCUMENTAT/pages/226492426/Translations#Add-a-new-translation-key
Displaying unavailable stocks
In the backoffice, in the page Stocks > Unavailable items, you can see all piece groups in the state uatf
.
See https://onestock.atlassian.net/wiki/spaces/DOCUMENTAT/pages/688145/Stock#Unavailable-articles for more details.
You can also delete it to make this stock available again.
Note |
---|
Any Stock disposition created without a piece group will not be shown in the back office. |
Manipulating Stock Disposition
API
Dispositions can be declared through the API without using the store app. For example, you can declare “unfulfillable” lines in a scenario where a warehouse that doesn’t have a Store App notifies that some lines are “unfulfillable”.
https://developers.onestock-retail.com/paths/stock_dispositions/post
Piece group
A piece group is an internal entity used in the store app. It can be used to create stock disposition using its state uatf
.
Create disposition
In the transition from its initial state fulfillable
to uatf
, the action notify_uatf
creates as many stock disposition as the piece group quantity.
DIY
CODE
Code Block | ||
---|---|---|
| ||
action_after: - type: notify_uatf |
Delete disposition
The disposition is removed during the opposite transition from uatf
to fulfillable
.
DIY
CODE
Code Block | ||
---|---|---|
| ||
actions_after: - type: notify_uatf parameters: decrement: true |
Automatically delete disposition
To automatically delete a disposition, the corresponding piece group should automatically go to fulfillable
. This can be achieved by using notifications
, as a notification will be automatically triggered after the programmed delay. The notification used in the action send_change_state_notification
is change_state
and can be configured in Configuration > Outbound messages > Notifications.
DIY
CODE
Code Block | ||
---|---|---|
| ||
actions_after: - type: send_change_state_notification parameters: enable: true to: fulfillable |
Back office
In the https://admin.onestock-retail.com/c00/stock/uatf page, all piece group in the state uatf
are listed and can be deleted. See https://onestock.atlassian.net/wiki/spaces/DOCUMENTAT/pages/688145/Stock#Unavailable-articles for more details.
Note |
---|
Any Stock disposition created without a piece group will not be shown in the back office. |
|
What occurs when stock is marked unavailable in the Store App?
Default Action
By default, declaring a disposition in the store app results in the entire order being instantly unclaimed.
Partial Unclaiming
To declare a disposition without unclaiming the order, you can enable partial unclaiming. In this scenario, only the unavailable line_item_groups will be unclaimed after completing all operations on the current page.
Enable Partial Unclaim Per Stock Location - Recommended
It is recommended to activate partial unclaiming for a selection of store app pages for specific stock locations using the unclaim_policy_partial
tag. Simply select the pages from the dropdown menu.
Enabling partial unclaim per Store App page scope -
not recommendedNot Recommended
Info |
---|
The recommended approach is to activate partial unclaims per stock location thanks to the |
To enable partial disposition at a page scope, go to https://admin.onestock-retail.com/c00/config/store_app/entry/general_settings in advanced configuration
.
The possible values for unclaim_policy_partial
are pack
(for pack and pack_scan), bag
(for bag and bag_scan and picking
.