This Workflow action allows you to update the ItemInStockQuantity and the AccountInStockQuantity Pepperi fields for each line-item in the Transaction.
When an order is submitted these quantities will not be updated, unless indicated by this Workflow action.
The quantities are updated after the status of the order is changed, therefore this is a Post action.
Note: you don't have to manage inventory values in Pepperi by updating them at the time of the Transaction. You can upload inventory via ERP integration.
How to configure the Update Inventory Workflow Action
Indicate by which value to reduce the ItemInStockQuantity Field
Typically it's reduced by the Units Quantity, which is the quantity that was entered to the order. However, you may want to reduce it by another field/a custom field.
Indicate by which value to update the AccountInStockQuantity Field
Choose an option for the update - Overwrite or Add:
Account stock will be overwritten using this field value - it will be overwritten by the UnitsQuantity, which is the quantity ordered. This leaves the value of the items ordered, until the next order.
The field value will be added to the Account stock - it will be added to the current AccountInStockQuantity value, making the value cumulative over time.
For example, if you wanted to compare over a year, the total amount of an item that was ordered by a store, you could make it cumulative, and then at the end of the year change it to overwrite.
You may update both or just one of the fields.
Catalog Filter of Items Ordered in the Past by an Account using the Account in Stock Quantity Field
Once you have updated these fields, you may base a catalog filter on them.
An example of a useful filter is using the AccountInStockQuantity field >0 to indicate items that have been ordered in the past by the customer.
The customer then has a simple way, in one tap, of seeing all the items they have ordered in the past.
To create such a filter create a new filter and add the condition:
Transaction Line Item - > Item Account In Stock Quantity > 0
This will ensure that any item ordered by the Account in the past will be displayed in the filter.