Status actions are an older automation feature that applies special behavior when a mapped status field contains certain values.
How It Works
Status actions use two config sections together:
- field_map_status links a target field to a status field
- status_actions defines what should happen for each incoming status value
"field_map_status": {
"stock": "vendor_status"
},
"status_actions": {
"Discontinued": {
"zeroStock": ""
},
"Backordered": {
"setStock": 0
},
"Active": {
"assignStatus": "item_status"
}
}
Supported Functions
| Function | What it does |
|---|---|
| assignStatus | Copies the incoming status value into another mapped field |
| zeroStock | Sets the target field to 0 |
| setStock | Sets the target field to a specific numeric stock value |
Why It Is Considered Legacy
The helper methods behind zeroStock and setStock are explicitly marked deprecated in the code. For most new automations, it is easier to understand and maintain the logic with more direct transformation steps.
Recommendation
Only use status actions when you are maintaining an older automation that already depends on them. For new automations, prefer clearer field mapping and explicit transformation logic so the behavior is easier to see and test.