DEV Community

Cover image for WooCommerce Order Status Updates via Email Leveraging Postmark Inbound Capabilities
Vikas V
Vikas V

Posted on • Edited on

WooCommerce Order Status Updates via Email Leveraging Postmark Inbound Capabilities

This is a submission for the Postmark Challenge: Inbox Innovators.

What I Built

I created a WordPress WooCommerce plugin called Postmark Inbound Order Status Updater. This plugin integrates WooCommerce order management with Postmark’s Inbound email processing to enable order status updates via email replies.

Here’s how it works:

  • When WooCommerce sends an order confirmation email to the admin, the plugin adds a special Postmark inbound email address as the only Reply-To address.
  • When the admin replies to that email with keywords like complete, cancel, or refund, Postmark processes the inbound email and sends a JSON payload to the plugin’s webhook.
  • The plugin extracts the order number from the original email, so the admin does not need to mention it explicitly in the reply.
  • It then verifies the sender’s email, updates the corresponding WooCommerce order’s status accordingly, and triggers all WooCommerce hooks and notifications tied to order status changes.
  • Finally, the plugin sends a confirmation email back to the admin.

Additionally, the plugin includes an admin settings page to configure the inbound email address and allowed admin email addresses, a webhook URL display, and a log viewer that stores inbound requests and status updates long-term in the WordPress database.

This makes it simple for store managers to update order statuses just by replying to order emails — no need to log into WooCommerce admin.

Future possibilities: This plugin can be extended to accept inbound emails containing customer reviews or feedback, allowing customers to reply to order emails with their reviews which could be parsed and saved automatically.

Demo

Since this is a WordPress plugin, you can install it on any WooCommerce-enabled WordPress site.

Testing Instructions:

  1. Configure your Postmark inbound email in the plugin settings.
  2. Set the Postmark inbound webhook URL as shown in the settings (e.g., https://yourdomain.com/wp-json/pmib/v1/inbound).
  3. Place an order on your WooCommerce store to trigger the new order email to the admin.
  4. Reply to the order email using the configured inbound email with keywords like complete, cancel, or refund.
  5. The plugin will parse the reply, extract the order number from the original email, update the order status, and send confirmation email back to you.
  6. Check the plugin’s admin logs page to view processed inbound emails and status changes.

_Screenshots and detailed usage _

Step 1: Configuring Wordpress and WooCommerce
1. Configuration-wordpress

Step 2. Configuring Postmark
2. Configuration-postmark

Step 3. Checking if Order Received
3. Order Received

Step 4. Order Processing (First time checking)
4. Order Processing

Step 5. Reply to email
5. Reply to email

Step 6. Order Complete (First time checking)
6. Order Complete

Step 7. Complete Acknowledgement Via Email
7. Complete Acknowledgement

Step 8. Checking In Postmark Active Centre
8. Checking In Postmark Active Center

Step 9. Checking Inbound Processing Logs
9. Checking Inbound Processing Logs

Code Repository

The full plugin source code is available here:

Link to GitHub Page(Code no longer available)

How I Built It

I built this plugin using WordPress and WooCommerce hooks, integrating with Postmark’s Inbound API through a custom REST API endpoint registered via register_rest_route.

Key features implemented:

  • Added the inbound email as the exclusive Reply-To in WooCommerce new order emails.
  • Verified inbound emails come from allowed admin emails before processing.
  • Parsed inbound email content to detect order status update commands (complete, cancel, refund).
  • Extracted the order number from the original order confirmation email to identify which order to update, removing the need for explicit mention in replies.
  • Updated the corresponding WooCommerce order status programmatically, ensuring all WooCommerce hooks and actions run properly.
  • Sent confirmation emails on status updates.
  • Stored inbound email payloads and logs in a custom database table for long-term tracking.
  • Created a settings UI in WordPress admin to manage inbound email and allowed admins.
  • Displayed logs with toggled views to keep important info concise yet accessible.
  • Designed the system to be extendable in the future to support inbound customer reviews or feedback via email replies.

This project helped me explore integrating transactional email inbound workflows with WooCommerce and creating custom WordPress REST endpoints and admin UIs. Postmark’s reliable inbound webhook and email parsing made it straightforward to trigger backend actions from email replies.

Top comments (2)

Collapse
 
swati_gupta_5bf39d895fd71 profile image
swati gupta

This is an interesting project! The integration of WooCommerce with Postmark for handling order status updates via email is an excellent way to streamline communication. It would be great to see how this can scale for large eCommerce sites, especially considering the growing demand for efficient email communication in the web hosting and eCommerce industries. Keep up the great work!