Dynamic customer segments based on attributes, order history, cart data, and behavior. Visual rule builder, cart price rule integration, and REST API — the Adobe Commerce feature, free for Community Edition.
composer require magendoo/module-customer-segment
Automatically assign customers to segments based on rules. Segments update in real-time on customer events, on a cron schedule, or manually — you choose per segment.
Build complex conditions visually in the admin — combine customer attributes, order history, cart data, and product interactions with AND/OR logic. No code required.
Segment by email, name, DOB, gender, group, total orders, revenue, AOV, first/last order date, cart subtotal, viewed categories, purchased products, wishlist items, and more.
Use segments directly in Magento's cart price rules — target promotions to VIP customers, first-time buyers, high-AOV segments, or dormant accounts without custom code.
Full CRUD for segments plus customer-segment lookup. Create, update, refresh segments, and query which segments a customer belongs to — all via API.
Refresh specific segments or all active segments from the command line. Export segment customers to CSV. Integrate with deployment pipelines and cron jobs.
Preview which customers match a segment's conditions before saving. The 'Matched Customers' tab shows all assigned customers with export capability.
106 unit tests with 198 assertions. CSV injection prevention, formula injection protection, condition type allowlisting, and arbitrary class instantiation prevention.
composer require magendoo/module-customer-segment
bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento setup:static-content:deploy -f
bin/magento cache:flush
| Mode | Description |
|---|---|
| Manual | Admin clicks refresh button to update |
| Cron | Updated automatically on schedule (default: daily 2 AM) |
| Real-time | Updated on customer events (login, order, cart change) |
# Refresh specific segment(s)
bin/magento magendoo:customer-segment:refresh 1 2 3
# Refresh all active segments
bin/magento magendoo:customer-segment:refresh --all
# Export segment customers to CSV
bin/magento magendoo:customer-segment:refresh 1 --export --format=csv | Method | Endpoint | Description |
|---|---|---|
| GET | /V1/customer-segments | List all segments |
| GET | /V1/customer-segments/:id | Get segment by ID |
| POST | /V1/customer-segments | Create new segment |
| PUT | /V1/customer-segments/:id | Update segment |
| DELETE | /V1/customer-segments/:id | Delete segment |
| POST | /V1/customer-segments/:id/refresh | Refresh segment data |
| GET | /V1/customers/:customerId/segments | Get customer's segments |
Every module is built for production, but every store is different. If you need integration, customization, or enterprise support — let's talk.
Get in Touch GitHub