How to create customer groups programmatically in Magento 2

- Magento 2

Magento 2 Development

To create customer groups programmatically in Magento 2, use $group->save() on the model returned by the GroupFactory:

'

Source: stackexchange question, Robbie Averill

More tips from the cookbook

'