You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+18-15Lines changed: 18 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,15 +4,13 @@ A comprehensive automation plugin for Medusa v2 that provides a flexible rule-ba
4
4
5
5
## Features
6
6
7
-
-**Automation Triggers**: Create automations triggered by events, schedules, or manual actions
8
-
-**Automation Management**: Create, edit, and delete automation triggers with automatic cleanup of related data
9
-
-**Rule-Based Conditions**: Define complex conditions using rule attributes (e.g., inventory levels, order status)
10
-
-**Multiple Action Types**: Execute various actions including email notifications, Slack messages, SMS, push notifications, and custom actions
11
-
-**Event Subscribers**: Built-in subscribers for common Medusa events (inventory updates, order events, payment events)
12
-
-**Admin Panel**: Manage automations directly from Medusa Admin
13
-
-**Flexible Rules**: Support for multiple rule types and operators (equals, greater than, less than, contains, etc.)
14
-
-**Slack Notifications**: Rich Slack notifications with Block Kit support including headers, action buttons, and dividers
15
-
-**Extensible Actions**: Add custom action handlers to extend automation capabilities
7
+
-**Automation Triggers**: Create automations triggered by events, schedules, or manual actions ([see details](#automation-triggers))
8
+
-**Rule-Based Conditions**: Define complex conditions with support for arrays, relations, and multiple data types ([see details](#rules-and-conditions))
9
+
-**Rich Attribute Support**: Pre-configured attributes for Products, Variants, Tags, Categories, and Inventory ([see available attributes](./docs/configuration.md#available-attributes-reference))
10
+
-**Multiple Action Types**: Execute various actions including email notifications, Slack messages, SMS, push notifications, and custom actions ([see details](#actions))
11
+
-**Event Subscribers**: Built-in subscribers for common Medusa events ([see available events](./docs/configuration.md#available-subscribers))
12
+
-**Admin Panel**: Manage automations directly from Medusa Admin ([see details](#admin-panel))
13
+
-**Extensible**: Add custom action handlers and extend automation capabilities
16
14
-**Type-Safe**: Full TypeScript support with exported types and workflows
17
15
18
16
## Compatibility
@@ -50,6 +48,8 @@ The plugin includes database migrations for automation models. Run migrations to
50
48
medusa migrations run
51
49
```
52
50
51
+
See [Database Migrations](./docs/configuration.md#database-migrations) for more details about the created tables.
52
+
53
53
### 3. Access Admin Panel
54
54
55
55
Navigate to **Notifications > Automations** in your Medusa Admin dashboard, or directly access:
@@ -63,17 +63,20 @@ Navigate to **Notifications > Automations** in your Medusa Admin dashboard, or d
-**Schedule**: Time-based triggers with configurable intervals (In progress)
68
68
-**Manual**: Triggered manually from the admin panel
69
69
70
+
See [Available Subscribers](./docs/configuration.md#available-subscribers) in the configuration documentation for a complete list of supported events.
71
+
70
72
### Rules and Conditions
71
73
72
-
Each automation can have multiple rules that define when actions should be executed:
74
+
Each automation can have multiple rules that define when actions should be executed. Rules support primitive fields, relations (arrays), nested objects, and various operators for complex conditions.
73
75
74
-
-**Rule Attributes**: Available attributes for conditions
75
-
-**Operators**: Comparison operators (equals, greater than, less than, contains, in, etc.)
76
-
-**Rule Values**: Values to compare against
76
+
For detailed information, see:
77
+
-[Available Attributes Reference](./docs/configuration.md#available-attributes-reference) - Complete list of attributes for each event type
78
+
-[Rule Operators](./docs/configuration.md#rule-operators) - All supported operators with examples
79
+
-[Rule Values](./docs/configuration.md#rule-values) - Supported data types and usage
77
80
78
81
### Actions
79
82
@@ -83,7 +86,7 @@ When automation rules pass, actions are executed. Supported action types include
83
86
-**Slack**: Send Slack messages with Block Kit formatting
84
87
-**Custom**: Extend with custom action handlers
85
88
86
-
See [Configuration Documentation](./docs/configuration.md) for details on built-in subscribers, available actions, and extending functionality.
89
+
See [Actions](./docs/configuration.md#actions) and [Slack Notification Provider](./docs/configuration.md#slack-notification-provider)in the configuration documentation for details on configuring and extending actions.
-**Rule**: `inventory_level.stocked_quantity` is greater than `1000`
139
+
-**Action**: Send Slack notification
109
140
110
141
## Best Practices
111
142
@@ -114,4 +145,10 @@ Create a scheduled automation that runs periodically:
114
145
3.**Monitor Performance**: Keep an eye on automation execution and performance
115
146
4.**Use Appropriate Triggers**: Choose the right trigger type for your use case
116
147
5.**Combine Rules**: Use multiple rules to create complex conditions
117
-
6.**Document Automations**: Add descriptions to explain automation purpose
148
+
6.**Document Automations**: Add descriptions to explain automation purpose
149
+
7.**Choose the Right Operator**:
150
+
- Use `in`/`not in` for exact matches in arrays (e.g., checking if product has specific tags)
151
+
- Use `contains`/`not contains` for partial matches (e.g., checking if category name contains a substring)
152
+
- Use `empty`/`not empty` for null checks
153
+
8.**Use Array Values Correctly**: When using array operators (`in`, `not in`, `contains`, `not contains`), use the chip input to add multiple values
154
+
9.**Leverage Relations**: Use relation-based attributes (e.g., `product.tags.id`, `product.categories.name`) to create powerful automations based on related data
0 commit comments