There are times when customers need help with their orders, and that requires the store admin to investigate the issue under the customer’s view. From Magento 2.4, the Magento 2 Login as Customer feature has been made available for both open source and enterprise versions of Magento.
Enable Magento 2 Login as Customer
Enable the feature
- In the admin page click Stores -> Settings -> Configuration.
- In the left panel, expand Customers and choose Login as Customer.
Describe the fields in config
|Enable Login as Customer||Yes / No||Enable/Disable the Login as Customer feature|
|Disable Page Cache For Admin User||Yes / No||If Yes, the page cache will be disabled for the admin user.|
|Store View To Login To||Auto-Detection (default) / Manual selection||Automatic uses the default store setting for that company user. Use Manual Selection if you want the Admin user to select the store view when logging in as a customer.|
3. When complete, click Save Config and Clear Cache
Using Login as Customer
Login as Customer allows you to see the site just as the customer does, and allows you to troubleshoot and take other actions as the customer. This feature requires an admin account with access to Customers > Login as Customer in their role.
From Magento 2.4.1 onward, customers will also have to enable Allow remote shopping assistance from their Dashboard before an admin can log in:
If a customer has not enabled this option, then when an admin tries to log in to their account, an error message will be displayed: “The user has not enabled the "Allow remote shopping assistance" functionality. Contact the customer to discuss this user configuration.”
To skip this extra step, store administrators can disable the module LoginAsCustomerAssistance via command line:
php bin/magento module:disable Magento_LoginAsCustomerAssistance
then redeploy the site.
Login as Customer appears on the following pages:
- Customer Edit Page
- On the Admin sidebar, go to Customers -> All Customers.
- Find the customer in the grid and click Edit in the Action column.
- On the top control bar, click "Login as Customer"
- Order View Page
- On the Admin sidebar, go to Sales -> Orders.
- Find the order in the grid.
- In the Action column, click View.
- Click “Login as Customer”
- Invoice View Page
- Shipment View Page
- Credit Memo View Page
Admin connection will display on the header. Close session button will end the login session clear related caches