How to cancel an order status programmatically from an external ERP system?

Hi,

We have requirement to update order status driven by external system (ERP).

Where we should add method (in API?) and how to connect it with statuses (with turned option to send email to customer).

Thanks in advance,
Pawel

What exact status do you want to set for an order?

We have to implement setting statuses like:

  1. Set status to “Sent”, send e-mail to customer and set Visible on storefront = Yes
  2. Set status to “Canceled”, don’t send e-mail to customer and set Visible on storefront = Yes

We don’t have to make any “shipping” – we just want to change Status and decide about Sending email and Visibility on storefront.

Optionally – sending “Comment” would be great.

So main case is:

  1. ERP requests API method with order_id parameter
  2. API parse this request and set Status for order_id + optionally set e-mail and other parameters in “Status history” table

Thanks in advance!

A post was split to a new topic: How to set an order as shipped programmatically from an external ERP system?