Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents
none
minLevel1
maxLevel6
outlinefalse
styledisc
typelist
printablefalse

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.

Disposition reason

Reason declaration

Each disposition has a reason. Each being associated with one or more stock types. This is how stock queries select which dispositions should be taken into account.

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

image-20240326-162924.png

Store app reason

Only configured reason will be shown in the store app. The only page supporting dispositions are pack, pack_scan, bag, bag_scan and picking.

They are configure in the https://admin.onestock-retail.com/c00/config/store_app/entry/general_settings page of the backoffice.

image-20240326-164539.png
Info

The stock query used to show stock available in the store app is in_stock. It should not be changed.

Manipulating stock disposition

API

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

Code Block
languageyaml
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

Code Block
languageyaml
actions_after:
- type: notify_uatf
  parameters:
    decrement: true

Automatically delete disposition

To automatically delete a disposition, the corresponding piece group should automatically transiting to fulfillable. This can be achieved by using notifications, as a notification will be automatically triggered after the programmed delay.

DIY

image-20240326-140303.png

CODE

Code Block
languageyaml
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.

Note

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

Partial disposition

Default behavior

By default, when an disposition is declared in the store app, the entier order is instantaneously unclaimed.

Partial behavior

To declare disposition without unclaiming the order, it is possible to activate partial disposition. In this case, after all operations in the current page, only the unavailable line_item_groups will be unclaimed.

Page scope

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

Page and endpoint scope

To enable partial disposition at a page and endpoint scope, use the manual tag unclaim_policy_partial on endpoint.

The configuration can be found in the page https://admin.onestock-retail.com/c00/endpoint/my_endpoint_id of the backoffice.

image-20240327-142151.png