IBM Support

Running the changeOrder application package interface to set PersonInfoShipTo blanks the other attributes in Sterling Order Management

Troubleshooting


Problem

Attempts to run changeOrder application package interface(API) to set PersonInfoShipTo blanks the other attributes in IBM Sterling Order Management.

Symptom

Steps to reproduce:

  1. Create a new order and ensure details like firstname,lastname, address etc is filled.

  2. Run changeOrder API in API tester to update few attributes in the PersonInfoShipTo element as shown below:
    <Order OrderHeaderKey="20140227131542263614">
       <OrderLines>
           <OrderLine OrderLineKey="20140227131555263616">
    <PersonInfoShipTo AddressLine1="AddressLine12"/>
           </OrderLine>
       </OrderLines>
    </Order>


    In the above scenario, the PersonInfoShipTo element is passed with few attributes different from the element already present for the order.
    All the other values(first name, last name, address line 3 etc) that are not passed in the new element are set to blank.

Cause

This behavior is expected in the product.

Diagnosing The Problem

When you call the changeOrder API to edit the PersonInfoShipTo for an order/orderline, the product will first check if there exists a PersonInfoKey with the new parameters passed in the input.xml:
-If yes, then current PersonInfoKey will be stamped on order/orderline.
-If no, then a new entry is created in the YFS_PERSON_INFO table.

The reference to this entry is stored in the YFS_ORDER_HEADER and YFS_ORDER_LINE tables as the ShiptoKey. This ShipToKey is mapped to the PersonInfoKey in the YFS_PERSON_INFO table.

When a changeOrder call is made, the product creates a new entry in YFS_PERSON_INFO table(as the attributes of the element are now different and a matching entry is not found already in the table) and updates this ShipToKey on the order/orderline as well.

Resolving The Problem

Pass all the attributes in the input.xml so that the new element and corresponding entry in YFS_PERSON_INFO table has the updated/required values.
This will ensure that specific attributes in the PersonInfoShipTo element are updated and the values of other attributes are retained.

Here is an sample changeOrder input xml:

<Order OrderHeaderKey="20140227131542263614">
   <OrderLines>
       <OrderLine OrderLineKey="20140227131555263616">
           <
PersonInfoShipTo AddressLine1="AddressLine1"
               AddressLine2="AddressLine2" AddressLine3="AddressLine3"
               AddressLine4="" AddressLine5="" AddressLine6=""
               AlternateEmailID="" Beeper="" City="" Company="ABCD"
               Country="US" DayFaxNo="" DayPhone="" Department=""
               EMailID="" ErrorTxt="" EveningFaxNo="" EveningPhone=""
               FirstName="Fname" HttpUrl="" JobTitle="" LastName="Lname"
               MiddleName="" MobilePhone="" OtherPhone="" PersonID=""
               PreferredShipAddress="" State="" Suffix="" Title=""
               UseCount="" VerificationStatus="" ZipCode="99999"/>
</OrderLine>
   </OrderLines>
</Order>

[{"Product":{"code":"SS6PEW","label":"Sterling Order Management"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"--","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF034","label":"Windows Mobile"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"9.2.1;9.2;9.1;9.0","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

Document Information

Modified date:
16 June 2018

UID

swg21659767