Order Management

Get Involved. Join the Conversation.

Topic

    murali kona
    Order management extension - how to retrieve old and new...
    Topic posted January 22, 2019 by murali kona, tagged Order Management 
    85 Views, 4 Comments
    Title:
    Order management extension - how to retrieve old and new customer id
    Summary:
    Order management extension - how to retrieve old and new customer id
    Content:

    Hi,

     

        We have created one order management extension to default some of the attributes in order header eff based on customer dff's. We have created a web service to get customer site dff values and called this service in OM extension to default order header eff attributes. Since this is expensive call, we would like to check if customer/party site id is changed or not in on save action. Is there anyway to get old and new value of customer id/party site id in order management extension?

     

    Thanks & Regards

    Murali.

    Comment

     

    • Prasad Kinkar

      Hi Murali,

      Could you please elaborate on business case where customer/party site id is changed in your implementation?

      Normally, such changes are prohibited and if at all, there's genuine need, the old and new ids reside in the same customer tables. You could create an extension to record such changes also and then track it like what was the old vs the current.

      Hope this helps.

      Thanks,

      Prasad.

      • murali kona

        Hi Prasad,

             Sorry if I miscommunicated anything. My meaning is if customer / party site id changed in order level. for example.

        Create order --> provide customer id/party site id and other details.

        --> Action : save (we have extension defined in 'on save' which gets called and in turn call the customer dff service and default attribute values)

        --> Modify the customer in order level

        --> Action : Save (since customer is changed, we want to get old customer id and new customer id values both. if both differs, then only we call the web service in OM extension)

        Please let me know if any more details needed.

         

        Thanks & Regards

        Murali. 

    • Prasad Kinkar

      Hi Murali,

      No issues. I understood now. You are referring to 'change is changed on order after initial addition'.

      Objective : To trigger web service call for determining the new order attributes based on new customer.

      Few options-

      1. Always call web service on every save - even if the customer is same and site is changed, your order attribute values might change. So always call web service on every save and submit.

      2. Create extension to ask - do you want to change customer/site on order? Yes / No - when order entry user attempts to change it  and if the response is Yes, trigger web service call for determining new attribute values.

      3. Create New report and record the customer id on it. You could have new and old customer id/ party ids on it.

      Let me know if it helps.

      Thanks,

      Prasad.

       

    • Shyam Singh Patel

      Hi Murali,

      we used the compare extension method for our GTM Code. we have EFF for End Customer, End Customer Address, End Customer Contact and similar for Delivery to, Delivery to Address and Delivery to Contact. when 1st time Order got created it set all value under one context ( you need to create 1 more context with all those EFF where it will save the value). In the second time when Order Revision happens, extension compares old value and new value if any change found it will raise a business event.

      Please see the attached extension and formulate for Customer change.

      Regards
      Shyam