November Happy Hour will be moved to Thursday December 5th.

Commerce Order Events

Vote:
 

Hello All

I have been doing some reading on events within Episerver. I was looking at http://world.episerver.com/documentation/Items/Developers-Guide/EPiServer-Commerce/8/Orders/order-events/ and was wondering if there is any events within Commerce that I can hook into for when a purchase order is created / modified?

I am trying to sync the purchase order to a third party system if that helps.

Thanks

Paul

#147132
Apr 06, 2016 16:37
Vote:
 

Hi,

Not sure if I understand your question correctly - but you can simply listen to OrderGroupUpdated event. PurchaseOrder is an OrderGroup, so you can just convert it to a PurchaseOrder and do the processing there.

Regards,

/Q

#147137
Apr 06, 2016 17:44
Vote:
 

Just modify the code like so

private void Current_OrderGroupUpdated(object sender, OrderGroupEventArgs e)
    {
        if (send is PurchaseOrder)
        {
            Task.Run(()=> DoSomething(sender as PurchaseOrder, e));
        }
    }
#147237
Apr 08, 2016 11:11
Vote:
 

Thanks for the help guys.

#147238
Apr 08, 2016 11:26
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.