Revoke a Magento 2 B2B customer’s approval without deleting the account

3 min read

Silver customer card with a coral pause badge, a teal access key and separate session windows.

Ending a wholesale relationship need not mean deleting the customer account. In Customer Approval, withdrawing approval changes status but calls for notification and actual-access checks. The previous guide covers registration and the first decision; here we focus on an account previously approved.

Choose the correct account and scope

Record customer ID, Website, previous Approval Status and decision reason in an internal change record. Do not identify the account by email alone. Adobe distinguishes Global and Per Website accounts. In module version 1.0.3, action availability also depends on enabling the module for the customer’s Website; do not assume the same outcome across every domain.

Under Customers > All Customers, open the correct profile and use Not Approved if the button is available. The action sets is_approved to notapproved; it does not delete the customer or change their group in this operation. Read back the saved state. Do not clear the attribute: the inspected helper treats a missing or empty value as approved, so that is not a revocation method.

Separate the decision from notification

Before changing status, inspect Not Approved notification settings, template and sender. The default message discusses rejected registration, which may not suit ending an existing relationship. Prepare wording explaining the situation and support contact without disclosing internal reasons or other customers’ information.

In the code, status saving precedes an email attempt if the relevant notification is enabled. A transport failure may be logged without rolling status back. A success message does not establish email delivery. Separately confirm account state, dispatch attempt and delivery outcome in the mail system used.

Check a new login and an existing session separately

The module’s mechanisms run in frontend authentication and the customer_login event. The inspected admin action does not explicitly invalidate all browser sessions or OAuth tokens. Do not treat it as confirmation of immediate termination of every already-open channel. Core and other extension behavior needs checking on the actual installation.

Keep a previously logged-in session on a test account, then check it alongside a fresh login after changing status. Record the expected error or CMS page according to Not Approve Customer Login. Separately cover other domains in use, external login and APIs. Adobe describes Force Sign In as OAuth token revocation, not proof of logging out every ordinary session; match the procedure to the actual channel.

Finish the change while preserving service history

Agree how existing orders and documents will be handled. Withdrawing approval does not itself cancel them. The temporary catalogue opening plan separately covers guest access: account rejection is not automatically a confidentiality policy for the whole offer. Base acceptance on agreed actions and visible content, not only the status label.

Plan a larger change only after trying one account; the mass action processes customers sequentially, not as one indivisible operation. Approving again is a separate decision and may also trigger a message. Record operator, time, outcomes and exceptions without passwords or tokens. Here we reviewed code and prepared a procedure: we changed no shop customers, sessions or messages.

Previous Next

KOWAL.BLOG

Choose your language

Available versions open the corresponding page. More languages are being prepared.

English (UK) Français Deutsch Español Italiano Português Nederlands Svenska Dansk Norsk Suomi Lietuvių Latviešu Eesti Čeština Slovenčina Magyar Română Български Ελληνικά Slovenščina Hrvatski Polski English (US)