I have been developing magento 2 extension for custom shipping method, I have developed it where I calculate the shipping amount with some certain scenarios, everything is working on frontend.

Now I need to call courier api when shipping is shipped from admin side, I am done with this part as well in observer but I don't think it sounds sensible to ship item through api in observer because I need to send customer an email for successful shipment.

Is there any process in magento where I can specify my shipping request code and then the shipping is done and tracking number is added? The default email will be sent to customer with tracking code.

PS: I want to send shipment tracking number to customer as well.

  • Just to be clear, you have used an observer on shipment create event to call the courier API and now want to put the tracking number into the shipment and make sure Magento send shipment notification to the customer email? Jan 30, 2018 at 22:37
  • @AlvinNguyen yes, I don't want to send him email twice, because when I check notify customer via email then it should not send him success email and after that send him tracking email as well. There should be a single email sent to customer.
    – CodeGenius
    Jan 31, 2018 at 7:34
  • @AlvinNguyen can you help me in this?
    – CodeGenius
    Feb 7, 2018 at 7:54


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.