0

I'm working through integration of orders from external sources into our Magento store. We sell directly through our Magento instance as well as through some other carts (cartLoom). When an order is received in CartLoom, it is sent along to some middleware scripts I've written that massage the CartLoom order data into a new Magento order, and submits it so the Magento store. This is working fine, but Magento is sending an order confirmation email, which is not desired because CartLoom has already done so.

In essence, I am just copying the order from an external source into Magento so we can centralize all our sales records. I don't want to completely disable all email confirmations though, since orders placed directly in our Magento store should notify the customer.

Is there an API call or cart/quote setting I can use to turn off customer notifications just for the order confirmation?

0

I'll guess that you're going through V1/orders/create. In that case, try to provide in body following content, too:

{
  "entity": {
    "email_sent": 1
  }
}

If you're using different approach, share it with us, and I'll update the answer.

  • I'm actually using V1/carts/{cartID}/order to create the order. The process is quite a bit longer - I go look up the customer in the store, or create a new customer, then grab a cart for that customer, put the stuff in it that they wanted in their order, then place the order on the cart using the above call. Can I add something similar to the body of the cart to suppress the email? – Kimball Mar 8 '17 at 23:44
  • There is no such option in /carts/{cartID}/order, unfortunately. You'll have to extend Magento2 API in order to be able to do this. – Sinisa Nedeljkovic Mar 9 '17 at 7:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.