Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 7 Next »

Context

A stock dispositions is an entity that is used to track temporarily unavailable stocks. Stock queries can take it into account for a stock export https://onestock.atlassian.net/wiki/spaces/DOCUMENTAT/pages/357007377/Stock+queries#Deductions. It should be reset during the next stock import to ensure consistency.

Setting up dispositions

Configure dispositions

Each disposition has a key and a linked attribute. Attributes are referenced in stock queries, and allow to deduct all dispositions linked to a given attribute.

Key and attributes are configure in the https://admin.onestock-retail.com/c00/config/view/stock?subpath=stock.params page of the backoffice.

image-20240326-162924.png

Setting up dispositions to be used as UATF in the Store App (optionnel)

Dispositions are also utilized to flag unfulfillable lines in the Store App. In cases where a line cannot be prepared at the store due to missing available stock or faulty remaining stock, dispositions can be applied to flag and render it unavailable.

Unfulfillable reasons are configured at Configuration/Store App/General Settings/UATF Reasons

The configuration page displays all dispositions already configured in the stock page (above section). If you want to add a new UATF reason, you first have to add it the the Stock configuration.

image-20240326-164539.png

Store App pages that support UATF declaration are preparation pages, so :pack, pack_scan, bag, bag_scan and picking.

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 create as many stock disposition as the piece group quantity.

DIY

image-20240326-135204.png

CODE

action_after:
- type: notify_uatf

Delete disposition

The disposition is removed during the opposite transition from uatf to fulfillable.

DIY

image-20240326-135537.png

CODE

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

image-20240326-140303.png

CODE

actions_after:
- type: send_change_state_notification
  parameters:
    enable: true
    to: fulfillable

Backoffice

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.

Stock disposition created without piece group will not be shown in the backoffice.

What Occurs When UATF is Declared 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.

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.

image-20240327-142151.png

Page scope - not recommended

The recommended approach is to activate partial unclaims per stock location thanks to the unclaim_policy_partial in the stock location page.

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.

image-20240327-140058.png
  • No labels