Add a new rule

This plugin allows you to create as many allocation rules you can use to associate different roles to different actions.

In order to create a rule, you need to go to YITH Plugins > Automatic Role Changer:

Automatic Role Changer

Now enter a unique rule for your rule in “Name the rule” and click on Add new rule:

Add new rule

You can now customize your rule, choosing between “The user will gain the role:” decide which role will be assigned to user for the action specified below:

Gain role

The second option is “Switch role”: the user roll will change from one to another based on the action options specified below:

Switch role

You can choose one of four options:

user role when

  • Customers purchase a specific product
  • The total amount of the order falls within a specified date/time range
  • Customers spend a minimum, a maximum or an amount in between
  • Customers purchase a product from a specific category or tag

Force apply rules

With the option “Force apply rules” you can search already existing orders (with no rules applied), and in a bulk operation apply the current rules.

NOTE: This procedure cannot be undone, use it with caution.

bulk rules

Set the dates you want and click on “Force apply rules”, you will recieve a warning asking you if you are sure you want to apply the change.

Purchasing a specific product

If you want to associate assigning a role with the purchase of a specific product, you can select your product in the section “Choose a product”

Select product

Right underneath, you will get to select a data range, selecting both the start date and the end date.

Date

N.B. If you set up an expiration date, purchasing said product will no longer assign roles after that day and all od the obtained roles will be removed.

For instance, you might create an allocation rule for a role that’s only available during December (to create a Christmas discount, using YITH Role Based Prices) which expires on the last day of the month.

After this day, the role will be removed from all of the customers who obtained and it will be no longer possible to obtain it using this rule.

Ultimately, you can state if a customer already has a specific role, so that the role won’t be assigned in their case. To do so, choose the role a customer already has from “Do not apply this rule to users with the following role(s)”:

Specific role

Price range

You can assign a role based on price, there are 2 options:

  • Order total
  • Total spend by customer

For both options you can set a minimum, maximum or a specific range of money spent. If you select one of these options, it will display a new section where you can select the price range and date range:

total spend range

Purchasing a product from a specific category or tag

In case you want to extend the assignment of a specific role to a whole category or tag, by selecting the third option, you will see the “Select a taxonomy” section

Category and tag

So by inserting the initials of a specific category or tag, you will be able to select it from the displayed list:

Select category product

Expiration settings and date range

Expiration settings

For every rule that you create, you can choose whether the role is assigned for ever or if it can be granted only for a limited time.

So, for example, if your customer gets the GOLD role because he’s purchased product X, he can get this role only for 30 days. After that time, when the role ‘expires’, the previous role will be restored.

To set an expiration for the new role, scroll down in the rule settings. You’ll find a field called Set duration for the roles (days). Enter any value in days.

expiry settings

When this time has passed, the previous role will be restored.

So, if a customer switches from Customer role to Gold and the Gold role is limited to 30 days, after 30 days, the role Gold will be removed and the Customer role will be restored.

Set a date range

For every rule you can also set an application time range, so the rule is applied only if the conditions are fulfilled during that time range. Before or after the dates that you enter there, the rule will be disabled.

Email notifications

Two emails are added to the default WooCommerce ones:

Emails

These two emails will inform customers and admin the moment a role is assigned after a transaction.

Admin email

You have the option to set more than one email address for the admin emails.

receipients

How to create the new roles you wish to assign

You are free to assign any role available, after a transaction on your WordPress website, however the plugin won’t let you create new ones. To do this we recommend using this free plugin: Members.

Once the plugin is installed and activated, you will find the option to create new roles, in the “users” section:

New role

Now you will be able to select all the allowed actions for users that obtain the role you’ve created:

Capabilities

YITH Role Based Prices

YITH Role Based Prices allows you to show different prices based on the role your users have, and offer dedicated discounts or increase the product prices.
Choose all the prices you want to show: Regular price, Sale price and Role-based price.

The integration with YITH Role Based Prices allows you to forget about changing roles manually and automate your marketing strategies: your users will automatically see the updated price if they buy a given product, make a total spend etc.

To start using both plugins together, all you have to do is to activate both of them from the Plugins page in your WordPress dashboard.

Then, start configuring role-based price rules as explained in detail here for global rules and here for product rules.

Note: to make the role-based price show correctly, please, make sure that your users have no more than one role assigned. If they happen to have more than one user role at the same time, no role-based prices will be shown.

Example

Configure three custom rules with YITH Role Based Prices plugin.

  1. 10% off for the role New customer
  2. 20% off for the role Returning customer
  3. 50% off for the role Loyal customerprice rules role based prices

Then, create the switch rules from YITH Automatic Role Changer settings panel:

  1. Switch from New customer to Returning customer if the customer’s total spend exceeds £500.
  2. Switch from Returning customer to Loyal customer if the customer’s total spend exceeds €1,000.Automatic role changer rule

If you want to read more about how to configure YITH WooCommerce Role Based Prices, please, refer to the plugin official documentation.