IBM Support

Implementing Order Line Extensibility for using Custom Attributes in Sterling OMS

Question & Answer


Question

How do you implement Order Line Extensibility for storing custom attributes in YFS_ORDER_LINE_EXTENSION in IBM Sterling Order Management?

Cause

Order Search screen needs to be extended to include custom attributes

Answer

  1. Create the Custom Attribute using manageAttribute API. Below is the input xml for reference –
    <AttributeList>
    <Attribute AllowMultipleValues="" AllowedValueLength="" AttributeDomainID="EntityAttribute_Custom" AttributeGroupID="AttributeGroupID" AttributeID="CustomAttribute-123" AttributePostFix=""
    DataType="TEXT" DerivedFromAttributeKey="" IsAllowedValueDefined="" IsValueMandatory="" LongDescription="" Operation="Create" OrganizationCode="DEFAULT" SequenceNo="" ShortDescription=""/>
    </AttributeList>



  2. Call manageEntityAttributeDomain to specify the table name to be used for extension using the below input xml -
    <EntityAttributeDomain AttributeDomainID=" EntityAttribute_Custom " DocumentType="0001" Operation="Create" OrganizationCode="DEFAULT" TableName="YFS_ORDER_LINE"/>


  3. Call manageEntityCustomAttribute API by passing EntityAttributeDomainKey obtained from the previous api’s output. Below is the Reference xml -
    <EntityCustomAttributeList>
    <EntityCustomAttribute Action="Create" AttributeDomainID="EntityAttribute_Custom" AttributeGroupID="AttributeGroupID" AttributeID=" CustomAttribute-123" EntityAttributeDomainKey="20160721145632233256" OrganizationCode="DEFAULT" Searchable="Y"
    Status="ACTIVE" />
    </EntityCustomAttributeList>


  4. Call manageEntityCustomAttribute API again to activate the CustomAttribute, as below -
    <EntityCustomAttributeList>
    <EntityCustomAttribute Action="Activate"
    EntityCustomAttributeKey="20160721145832233258"/>
    </EntityCustomAttributeList>


  5. To verify, Create a Sales Order using below input xml and verify the value of TEXT_1 column in YFS_ORDER_LINE_EXTENSION table. It should be populated with value as CustomAttribute-Value-456
    <Order  DocumentType="0001" DraftOrderFlag="N" EnterpriseCode="DEFAULT" IgnoreOrdering="Y">
    <PersonInfoBillTo Country="US" />
    <OrderLines>
    <OrderLine Action="CREATE"  DeliveryMethod="SHP" ItemGroupCode="PROD" Quantity="1" ShipNode="NODE" >
    <OrderLineTranQuantity OrderedQty="1" TransactionalUOM="EACH"/>
        <Item ItemID="ITEM"  UnitOfMeasure="EACH"/>
        <LinePriceInfo  IsPriceLocked="Y"  UnitPrice="100" />
            <CustomAttributes CustomAttribute-123="CustomAttribute-Value-456"/>
    </OrderLine>
    </OrderLines>
    </Order>

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

Document Information

Modified date:
16 June 2018

UID

swg21987629