Managing customer groups

Everybody knows that every website is different. Some sites only sell products to Business to Consumer (B2C) while others sell to Business to Business (B2B) or both.

In the B2C market it is pretty common to only have one customer group called Retailer. While the B2B market is related to the Wholesaler. Beside these two, we could also have groups such as Platinum, Gold, Silver, Special members, or groups based on their location. So the options are unlimited. Setting up the correct infrastructure for your customers helps you to segment these groups and offer them different prices.

Magento offers by default the following groups: General, NOT LOGGED IN, Retailer, and Wholesale.

Tip

By default, all groups are related to the Tax Class: Retail Customer. You may need to change this depending on your locale regulations.

Getting ready

To step through this recipe, you will use a Droplet created in Chapter 2, Magento 2 System Tools at DigitalOcean https://www.digitalocean.com/. We will be using an NGINX, PHP-FPM, Composer-based setup including sample data. No other prerequisites are required.

How to do it…

For the purpose of this recipe, let's assume that we need to add additional customer groups. We want to create the following groups: Platinum, Gold, and Silver. The following steps will guide you through this.

  1. First login to the backend of Magento, and go to Stores | Other Settings | Customer Groups.
  2. Click on the Add New Customer Group button and create three new groups for Platinum, Gold, and Silver. Connect them to the Tax Class: Retail Customer for now and click Save Customer Group.
  3. Make sure to update your indexers. When you have your crontab configured correctly, you do not have to worry about this. Magento 2 will update this for you every minute.
  4. Now click on Customers | All Customers in the default menu. Select all the customers you want to upgrade to another group by marking them on the left of the grid.
  5. Click on the drop-down Actions menu and choose Assign a Customer Group. A new menu will be listed where we can pick one of the newly created groups. Select one of the options, and click OK in the pop-up window:
    How to do it…
  6. To confirm the changes are OK, click the edit link on the right. In the Customer View tab we see the Personal Information and the listed Customer Group:
    How to do it…
  7. Congratulations, you have just finished configuring Customer Groups in Magento 2.

How it works…

Let's recap and find out what we did throughout the preceding recipe. In Steps 1 through 6, we configured different Customer Groups and connected them to the appropriate customer.

There's more…

Creating customers groups basically does nothing. It is the relation to marketing or segmentation that makes the difference. In Magento 2, we got Catalog and Cart Price Rules. When combining them with the Customers Group we are able to create member discounts.

Go to Marketing | Promotions | Catalog Price Rules, or Cart Price Rules and click Add New Rule. In the General Information section we see the Customer Groups list.

Now go ahead and create a new rule and use one of the groups. Here is an example. Create a new rule called Platinum 25%, and select the Customer Groups Platinum. Now go to the Actions tab menu and choose the Apply rule: Percent of product price discount. In the Discount Amount commit 25. This is the amount of percent the Platinum member gets discounted from the total of his shopping cart.

Make sure when testing that the customer login is in this group.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.149.250.11