Developer forum

Forum » Ecommerce - Standard features » Change Order status during checkout

Change Order status during checkout

Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi guys,

I know it's a long shot but I have to ask.

Is there a way to control OrderStatus in the checkout process?

I mean, based on some criteria, to define what Order status the new order will be saved in.

I have some situations where I want to avoid sending over the order to ERP if the order has a specific status.

Thank you,

Adrian


Replies

 
Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
Reply

Hi Adrian,

 

AFAIK you can only do that with an CheckoutDoneOrderIsComplete Notification. New orders will take the default state of the order flow associated with the shop.

 

It's relatively simple, and using the API to set the state, would also trigger any email notifications you have associated with each state.

 

Best Regards,

Nuno Aguiar

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Nuno,

Thank you for the response.

I was aware of that part but I just wanted to check if there is another way of doing it.

I guess I will have to use it since there are no other options yet.

Thank you very much,
Adrian

 
Arnór Halldórsson
Arnór Halldórsson
Reply

Hi Guys,

Am I misunderstanding, but can't you just flip the Order.StateId property to the desired status id? In most of our older projects (using Integration framework v1) we have parameters on the LiveIntegration Addin dictating what statuses orders should take when they've been created / failed in the ERP, and when we're processing the sales order response from the ERP we flip the states.

F.e. I'm currently working on a webhook against LS Omni that should change the order status (In picking, payment failed, ready for pickup, etc..). The plan was to match the order status ids in the DW SQL with the status IDs from omni and just A = B when the webhook is triggered.

Best regards,
Arnór

 
Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
Reply

Hi Arnór,

 

You can, but what I understood Adrian asking was to set a different state automatically based on some logic, all ahead of sending the order to the ERP (meaning before Live Integration does something with it).

 

What you're doing is something else. If I undetstood you correctly you need to update DW's order state based on some actions/conditions in the ERP. That's accurate too, just set the corresponding OrderStateId.

 

 

Did I capture it accurately?

Nuno

 
Arnór Halldórsson
Arnór Halldórsson
Reply

Ahh I see, yes you captured it correctly :)

I Just wanted to be sure that the standard state functionalities hadn't changed before I continue my work :D

Thanks m8!

 

You must be logged in to post in the forum