Creating a state machine
Alongside Shopware’s built-in machines you can create your own — for example to model a subscription lifecycle, a return process or any custom workflow of your own.
Create a new machine
Section titled “Create a new machine”- Go to Settings → Plugins → State Machine Manager.
- Click Create state machine at the top right.
- Fill in:
- Technical name — the internal identifier, in
entity.stateformat (for examplesubscription.state). Only lowercase letters, numbers and underscores are allowed. See Naming conventions. - Name — the readable display name your team will see.
- Technical name — the internal identifier, in
- Click Save.
Both fields are required. If the technical name does not follow the entity.state format, an inline error explains what to fix.
After saving you are taken to the machine’s detail view, where you can start adding states and transitions.
Recommended order of work
Section titled “Recommended order of work”A new machine starts empty. Building it up in this order avoids validation warnings along the way:
- Add the states first — every status the process can be in. See Managing states.
- Pick the initial state — the one an entity starts in. See Managing states.
- Add the transitions between them — the allowed moves and the action that performs each. See Managing transitions.
- Arrange the diagram so the flow reads clearly. See The visual editor.
- Validate to confirm there are no missing pieces. See Validation.
Next steps
Section titled “Next steps”- General settings — edit an existing machine’s name and initial state.
- Managing states