Rules Engine
Rules Overview
The Rules Engine automates inventory management by monitoring conditions and triggering actions automatically.
Key Features
- Real-time monitoring of inventory conditions
- Automated alerts and notifications
- Control IoT devices based on sensor readings
- Priority-based execution (Low, Medium, High, Critical)
- Cooldown periods to prevent alert fatigue
How Rules Work
1
Monitor: System continuously checks defined conditions
2
Evaluate: When conditions are met, the rule triggers
3
Execute: Configured actions are performed automatically
4
Log: All rule executions are logged for audit
Creating Rules
Simple Rule Creation
- Navigate to Rules → New Rule
- Enter basic information:
- Name: Descriptive name for the rule
- Description: What the rule does
- Priority: Low, Medium, High, or Critical
- Select what to monitor:
- Bulk Items: Monitor stock levels
- Unit Items: Track individual assets
- Sensors: Monitor sensor readings
- Cameras: Detect motion or events
- Define conditions (see Conditions section)
- Configure actions (see Actions section)
- Set cooldown period to prevent repeated triggers
- Save and activate the rule
Tip: Start with simple rules and test them before creating complex automation chains.
Setting Conditions
Available Conditions by Item Type
Bulk Items
- Stock level below minimum
- Stock level above maximum
- Out of stock
- Expiry date approaching
Unit Items
- Location changed
- Not seen for X days
- Unauthorized movement
- Maintenance due
Sensors
- Temperature above/below threshold
- Humidity out of range
- Digital input on/off
- Analog value comparison
Cameras
- Motion detected
- Object identified
- Zone violation
- Camera offline
Condition Logic
Logic | Description | Example |
---|---|---|
ALL | All must be true | Temp > 25°C AND Humidity > 80% |
ANY | One must be true | Door open OR Motion detected |
Configuring Actions
Available Actions
🔔 Send Alert
Send notifications to users or groups
- Email notifications
- SMS alerts (if configured)
- In-app inbox messages
- Dashboard notifications
🌡️ Control Device
Control other sensors or devices
- Turn sensors on/off
- Set analog values
- Trigger relay outputs
- Adjust temperature setpoints
✏️ Update Item
Modify item properties
- Change status
- Update location
- Add notes
- Flag for review
📋 Create Task
Generate work orders or tasks
- Reorder request
- Maintenance ticket
- Inspection task
- Transfer order
Action Parameters
Each action type has specific parameters you can configure:
- Recipients: Who receives alerts (users, roles, or groups)
- Message Template: Customizable alert content
- Device Target: Which device to control
- Control Value: What value to set (on/off, numeric)
- Priority: Urgency level for generated tasks
Rule Examples
Common Rule Scenarios
Low Stock Alert
Alert when office supplies run low
- Condition: Printer paper quantity < 10 reams
- Action: Send alert to office manager
- Cooldown: 24 hours
Temperature Control
Maintain server room temperature
- Condition: Temperature sensor > 25°C
- Action: Turn on cooling system
- Priority: Critical
Asset Movement
Track high-value equipment
- Condition: Laptop leaves designated area
- Action: Send security alert + Log event
- Priority: High
Maintenance Reminder
Schedule equipment maintenance
- Condition: Days since last service > 90
- Action: Create maintenance task
- Cooldown: 7 days
Best Practice: Test rules in a non-production environment first. Use the Rule Event Log to monitor rule performance and adjust as needed.