This example restricts purchases when the order email address uses a mobile carrier domain. Use it to prevent order issues caused by confirmation emails not reaching carrier email addresses.
Prerequisite: The initial setup for Customer limits must be complete. If you haven't done this yet, see "Initial Setup (Customer Limits)".
When the customer rule is enabled, it checks the domain of the order email address entered at checkout. Login status does not matter.
The email address domain does not match a blocked domain: purchase is allowed.
The email address domain matches a blocked domain: purchase is not allowed.
(1) Create a customer rule
Open the app admin → "Customer rules" → "Create rule".
(2) Enter the settings
Configure the following.
Field | Value |
|---|---|
Title | Any administrative title |
Customer accounts | Unchecked |
Order email address | Under "Block purchases from the email domains below," add the preset "Japanese carrier email domains." |
Eligible items | All items |
Product message | Enter if needed |
Display timing | Checkout only (set automatically) |
Alert message | Enter if needed |
Note: If you use email domain restrictions, the display timing is fixed to "Checkout only." It is not evaluated on the cart page.
(3) Save and enable the customer rule
After saving the settings, select "Enable." Saving alone does not apply the customer limit.
(4) Check the behavior
At checkout, enter a carrier email address and a different address separately, and check the results.
Email domains are matched by suffix. Setting "example.com" also restricts "sub.example.com." It is not case-sensitive.
You can add domains other than the preset by entering them individually in "Email domain."
Variables cannot be used in the product message or alert message for customer rules.