Steven J
Steven J

Reputation: 143

Magento Webhook Order Status Update

I would like to figure out if I can use webhooks with Magento and AfterShip to update the order status to "Delivered" (new order status to be created) after the package has been marked as delivered from the tracking information.

Aftership has a webhook system they use and Magento seems to be open to integration but I don't know anything on this subject.

I would like to do something like this:

1) Order is marked as "shipped" (default 'complete' status with new label) after order has left our facility
2) AfterShip tracks package and sends emails along the way
3) AfterShip sends email about delivery of package & sends "webhook order status update" to matched Order ID
4) Order Status in Magento is changed/put at "Delivered"

Thanks again to anyone who can offer information or help!

Upvotes: 0

Views: 1222

Answers (1)

teddychan
teddychan

Reputation: 389

  1. When you input the tracking number in magneto, aftership will get the tracking number from your system every 3 hrs.

  2. This setting and message content is set in AfterShip.com after login.

  3. You need to code a webhook script at your server side, say, using PHP. When the package is "Delivered", aftership will fire the webhook and post the tracking info to your webhook endpoint. Your webhook script should receive the tracking update (with the order ID).

  4. By using 3, your webhook know which ORDER ID need to be changed to "Delivered"

I hope this is what you want to know.

Upvotes: 0

Related Questions