IBM Support

Using attributes such as Department, Class and Sub Class in APIs such as manageItem API, getItemDetails API

Question & Answer


Question

Can we pass attributes such as Department, Class, Sub Class in item APIs such as manageItem and getItemDetails even though they are not exposed in API javadocs? We do see these attributes as database columns - DEPARTMENT, CLASS, SUB_CLASS in YFS_ITEM table but do not see any attribute in the API to update these fields.

Cause

These columns was added due to a customer requirement to allow writing their custom logic and populate the table. The fields were not added to the default template of the API because OOTB our application does not use these columns. The customers can add extra information to the records using this table and their own custom code.
To achieve backward compatibility, these columns exist in YFS_ITEM table. As no business logic is implemented OOTB, these attributes are not documented.

Answer

You can of course go ahead and use these attributes for your own implementation and use.


For example, you can test with the input XML for manageItem API:


<ItemList>
<Item Action="" ItemID="673981" OrganizationCode="DEFAULT" UnitOfMeasure="EACH">
<PrimaryInformation AllowGiftWrap="N" AssumeInfiniteInventory="N" Description="Blue large short Sleeve tshirt" IsDeliveryAllowed="N" IsHazmat="N" IsPickupAllowed="Y" IsReturnable="N" IsShippingAllowed="Y" ColorCode="Blue" SizeCode="large" ManufacturerName="adn" ShortDescription="Red Medium short Sleeve tshirt" Status="3000" UnitHeight="0.00" UnitHeightUOM="" UnitLength="0.00" UnitLengthUOM="" UnitVolume="0.00" UnitVolumeUOM="" UnitWeight="0.00" UnitWeightUOM="" UnitWidth="0.00" UnitWidthUOM="" ItemType="VARIENT_ITEM" IsModelItem="Y" ModelItemUnitOfMeasure="" Department="testdept" Class="testclass" SubClass="testsubclass"/>
<InventoryParameters ATPRule="" InventoryMonitorRule="" IsItemBasedAllocationAllowed="Y"/>
<ClassificationCodes HazmatClass="" StorageType="" HarmonizedCode="" Model=""/>
<ItemAliasList Reset="Y">
<ItemAlias AliasName="EAN1" AliasValue="24321"/>
</ItemAliasList>
</Item>
</ItemList>

The record gets updated in YFS_ITEM table and columns DEPARTMENT, CLASS and SUB_CLASS get populated.

Similarly the output template of getItemDetails API needs to be modified to include these fields under <Primary Information>.

However, you have another option for item attributes which is used OOTB. From 9.x version, we are populating additional data like Color, Height, Department under <AdditionalAttributeList> in the input of manageItem API. Kindly refer to the API javadocs for further details.

[{"Product":{"code":"SS6PEW","label":"Sterling Order Management"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"Documentation","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF033","label":"Windows"}],"Version":"9.3;9.4;9.5","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

Document Information

Modified date:
16 June 2018

UID

swg22010686