Setup Options for Reducing Inventory

Get details about some of the options you have when you set up inventory reduction for Order Management.

Use Extensible Flexfields

Use an extensible flexfield on an order line in Order Management to send an attribute value to a descriptive flexfield on the inventory transaction in Inventory Management.

You create the INVENTORY_TRX_INFORMATION_LINE context in Order Management and in Inventory Management, and can add up to 35 attributes in this context when you set up your flexfields.

Here are the attributes that you can use.

Extensible Flexfield on the Order Line

Descriptive Flexfield on the Inventory Transaction

Data Type

ATTRIBUTE_CHAR1 through ATTRIBUTE_CHAR20

ATTRIBUTE1 through ATTRIBUTE20

VARCHAR2

ATTRIBUTE_NUMBER1 through ATTRIBUTE_NUMBER10

ATTRIBUTE1 through ATTRIBUTE10

NUMBER

ATTRIBUTE_DATE1 through ATTRIBUTE_DATE5

ATTRIBUTE1 through ATTRIBUTE5

DATE

Use the Allow Inventory Transaction Attribute in Your Processing Logic

  • Use the Allow Inventory Transaction attribute in an assignment rule. For example, assign the predefined orchestration process to an order line only if the Allow Inventory Transaction attribute is Y.

  • Use the Allow Inventory Transaction attribute and the Sent to Inventory attribute in a payload that you use with the Order Information web service to get sales orders that have an inventory transaction.

  • Use the Allow Inventory Transaction attribute and the Sent to Inventory attribute in the line-selection criteria or branching condition on an orchestration process. Here are some examples.

    • If the Allow Inventory Transaction attribute is Y, then don't use a schedule task to process the order line.

    • Branch an orchestration process according to the value in the Allow Inventory Transaction attribute.

    The names that you use for these attributes in your rule sets and web service payloads are different. If you use a web service:

    • Use InventoryTransactionFlag instead of Allow Inventory Transaction.

    • Use InventoryInterfacedFlag instead of Sent to Inventory.

  • Create a validation rule set for the Allow Inventory Transaction attribute. Use it or the predefined Fulfillment Lines Are Interfaced to Inventory Management rule set as a condition in a processing constraint that you create. For example:

    • If Allow Inventory Transaction equals Yes on an order line, or if Order Management already sent the line to inventory, then don't allow an update on an attribute.

Transformation Rules and Order Management Extensions

Create a transformation rule or order management extension that sets the Allow Inventory Transaction attribute to Y on the order line.

Consider an order management extension that says:

  • If the order type is STD, and if the item is a standard and shippable item, then set the Allow Inventory Transaction attribute to Y.

  • It uses the On-Save event.

Here's the extension code.

def lines = header.getAttribute("Lines");
def orderType = header.getAttribute("TransactionTypeCode");
if(!orderType.equals("STD"))
return;
while (lines.hasNext()) {
  def line = lines.next();
  def itemSubTypeCode = line.getAttribute("ItemSubTypeCode");
  def inventoryItemId = line.getAttribute("ProductIdentifier");                                       
  def orgId = line.getAttribute("InventoryOrganizationIdentifier");                                   
  if(itemSubTypeCode.equals("STANDARD")){
    //Derive Shippable Flag value
    def item = getItem(inventoryItemId, orgId);  
    String shippableFlag = item.getAttribute("ShippableItemFlag");
    if("Y".equals(shippableFlag)){
      line.setAttribute("InventoryTransactionFlag","Y");
    }
  }
}
   
Object getItem(Long itemId, Long orgId) {
  def itemPVO = context.getViewObject("oracle.apps.scm.productModel.items.publicView.ItemPVO");        
  def vc = itemPVO.createViewCriteria();                                                              
  def vcrow = vc.createViewCriteriaRow();                                                              
  vcrow.setAttribute("InventoryItemId", itemId);                                                       
  vcrow.setAttribute("OrganizationId", orgId);                                                         
  def rowset = itemPVO.findByViewCriteria(vc, -1);                                                     
  def item = rowset.first();                                                                           
  return item;
}

where

Code

Description

line.setAttribute("InventoryTransactionFlag","Y")

Sets the value for the Allow Inventory Transaction attribute.

if(!orderType.equals("my_value")

specifies the order type. For example, test for the standard order type.

if(!orderType.equals("my_value")

Specifies the order type.

For example, test for the standard order type.

if(!orderType.equals("STD")

if(itemSubTypeCode.equals("STANDARD"))

Specifies the item subtype. You must use STANDARD.

if("Y".equals(shippableFlag)

Specifies that the item is shippable. You must set shippableFlag to Y.

Use this extension only for a standard item that you can ship.