by runthings.dev on WordPress.org
Automatically assign WooCommerce orders to departments based on products/categories with email routing and AutomateWoo integration.

Department taxonomy management screen - Main interface for managing departments, viewing assigned orders, and configuring department settings.
Order Departments for WooCommerce enables large organizations to automatically route orders to the appropriate departments based on the products or the categories of the products in each order.
For each department, a quick access menu is created below the WooCommerce.
The built in WooCommerce order emails can be re-routed so that only the relevant dept gets the order notification thats relevant to them.
The AutomateWoo integration then allows for further workflow automation based on department assignments.
This plugin provides complete AutomateWoo integration, allowing you to create sophisticated workflows based on department assignments. The integration includes custom actions, triggers, rules, and variables specifically designed for department-based automation.
Department Assignment Timing Tip: This plugin assigns departments immediately during order processing using the product/category rules you configure in the taxonomy screens. This happens early enough to affect WooCommerce’s core systems like email sending. AutomateWoo workflows run later in the process, so relying solely on AutomateWoo actions for department assignment would be too late to override WooCommerce’s built-in emails and other core functionality.
Using AutomateWoo for Email Handling: If you prefer to handle all emails through AutomateWoo workflows instead of the built-in email routing:
This approach gives you the flexibility to use AutomateWoo’s advanced email features (templates, conditions, delays, etc.) while still benefiting from automatic department assignment.
Collection Variables (all departments):
* {{ order.departments_names }}: List of all department names assigned to the order
* {{ order.departments_emails }}: List of all department email addresses (automatically deduplicated)
Per-Department Variables (flexible access):
* {{ order.department_names }}: Department names with index/all/count options
* {{ order.department_emails }}: Department emails with index/all/count options
* {{ order.department_count }}: Number of departments assigned to the order
Collection Variables support separator, prefix, and suffix parameters:
* {{ order.departments_names | separator: ';' }} → “Sales;Technical;Support”
* {{ order.departments_names | prefix: 'Dept: ', suffix: ' Team' }} → “Dept: Sales Team, Dept: Technical Team”
* {{ order.departments_emails | separator: '; ' }} → “sales@example.com; tech@example.com”
Per-Department Variables support mode, index, separator, prefix, and suffix parameters:
Mode Options:
* {{ order.department_names }} → First department name (default mode: index)
* {{ order.department_names | mode: 'all' }} → All department names
* {{ order.department_names | mode: 'count' }} → Number of departments
Index Access:
* {{ order.department_names | index: '1' }} → First department name
* {{ order.department_names | index: '2' }} → Second department name
* {{ order.department_emails | index: '1' }} → All emails from first department
Formatting:
* {{ order.department_names | prefix: 'Team: ', suffix: ' Dept' }} → “Team: Sales Dept”
* {{ order.department_emails | separator: '; ' }} → Multiple emails separated by semicolon
Sales & Technical Support: Route orders containing software to Technical, hardware to Sales
{{ order.departments_emails }} to automatically send order notifications to the right team{{ order.department_count }} for mixed ordersMulti-location Fulfillment: Route orders to appropriate warehouses/locations
{{ order.departments_names }} in fulfillment emails to specify handling locationSpecialized Teams: Route complex products to specialist departments
{{ order.department_names }} for single-department orders{{ order.department_names | mode: 'count' }} exceeds normal thresholdsCRM Integration: Trigger department-specific workflows in external systems
{{ order.departments_names }} to CRM systems for proper lead assignment{{ order.departments_emails }} for automated follow-up sequencesImportant: Email routing behavior depends on whether the order’s assigned departments have email addresses configured:
Notes:
Create workflows using the department triggers, rules, and variables to:
{{ order.departments_emails }}{{ order.departments_names }}Built by Matthew Harris of runthings.dev, copyright 2025.
Visit runthings.dev for more WordPress plugins and resources.
Contribute or report issues at GitHub repository.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, see http://www.gnu.org/licenses/gpl-3.0.html.
Icon – SEO by pictohaven from [https://thenounproject.com/browse/icons/term/seo/](Noun Project) (CC BY 3.0)