Creating customer groups programtically



I am trying to look for way to add a new customer group programatically. I dont see any examples, does anybody have any idea about this? I want to update pricing based on customer groups, and if new customer groups are passed in the file I should create them.

Edited, Jan 30, 2019 22:30

Hi Siddharth,

Please provide more information about which authentication provider that you are using? Membership or identity or anything else?

Jan 31, 2019 3:17

@Binh: I am using Membership authentication. I see that this is tied to customers, but I also import different SKU prices based on customer groups. So, during the import process I will need to check if a customer group exists and if it doesnt I will need to create one.

Jan 31, 2019 16:31

Hi Siddharth,

Sorry for misunderstanding a bit. The customer groups  are not depended on which authentication provider is using. The customer groups that you want to add more is a dictionary type in Episerver Commerce system.

You have 2 ways to add more are programming or configuring. See the details in this link 

Edited, Feb 11, 2019 2:08

@Binh: Thank you. 

Feb 11, 2019 2:49