Observer Pattern

This question is answered

Hello,

I will try to explain our use case: we have correctly linked an e-commerce store on NAV 2013. We are able to create customers and orders on NAV when someone place an order on the ecommerce.  Orders are in and everything works fine.... just a details. When orders in NAV are shipped and invoiced we need to change order state also on the ecommerce store. Does exist some sort of  objesrver patter we can implement on nav.. so when something changes on NAV (order status, customers details and so on) so we can react and sync changes on our ecommerce too?

We are using WS at moment..  but maybe someone done someting cleaver using WCF....

Hope I'm been clear enough.

 

Regards,

Gianmaria

 

 

Verified Answer
  • Hi,

    since you can only consume web services (the source of action is always external), you would need a small program that does the polling for you. We have made such a program (very small .net c# code) to have a "worker process" for post-processing data which has been delivered by other interfaces. It is in the task scheduler of the host and starts every 5 minutes. Sounds like low-tech, but it's very reliable.

    In your case, such a program might be called periodically and updates the order status info in the ecommerce store database. For a real event-driven callout, you would need to do things with either linked objects (link the order status field to a table/field in NAV) or .net interop.

    with best regards

    Jens

All Replies
  • Hi,

    since you can only consume web services (the source of action is always external), you would need a small program that does the polling for you. We have made such a program (very small .net c# code) to have a "worker process" for post-processing data which has been delivered by other interfaces. It is in the task scheduler of the host and starts every 5 minutes. Sounds like low-tech, but it's very reliable.

    In your case, such a program might be called periodically and updates the order status info in the ecommerce store database. For a real event-driven callout, you would need to do things with either linked objects (link the order status field to a table/field in NAV) or .net interop.

    with best regards

    Jens