Adding custom order state

Hello Shopware community,

 

Is it possible to create a custom order state through code? instead of creating them manually?

I’ve looked a bit in the shopware code how states are made and can’t really seem to figure out how to do this. I noticed something about snippets for the state description. so is it necessary aswell to create snippets through code if you want to create order states through code?

I’m kind of confused about all this.

 

Thx in advance for any information :slight_smile: