Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.



Section


Column
width50%

Table of Contents

Warning

Firefox user notice:

Please use another web browser to view this document.

Sorry for the inconvenience.



Column
width30%

                                                                                                                                                                                                   Image RemovedImage Added

Magento 2 Company Accounts allows creating and managing company accounts, the one-parent-multiple-children hierarchies with apparent role boundaries of member-accounts. The module helps online vendors and their wholesale customers interact as brands, sophisticated engagement assured for best business-to-business practices.

Compatibility: Magento Open Source 2.3.X - 2.4.X, Magento Commerce 2.3.X - 2.4.X

Product Page


...

Command Line InstallationComposer Installation


Panel
borderWidth2px
borderStylesolid

1. Backup your web directory and store database


Panel
borderWidth2px
borderStylesolid

2. Download the Company Accounts installation package


Panel
borderWidth2px
borderStylesolid

 3. Upload contents of the Company Accounts installation package to your store root directory


Panel
borderWidth2px
borderStylesolid

 4. In SSH console of your server navigate to your store root folder:

No Format
cd path_to_the_store_root_folder

run the following command: :

No Format
php -f bin/magento module:enable Aheadworks_Ca

then:

No Format
php -f bin/magento setup:upgrade

after:

No Format
php -f bin/magento setup:static-content:deploy


Panel
borderWidth2px
borderStylesolid

5. Flush store cache; log out from the backend and log in again


Note

Make sure the installation is done from the FTP Administrator account. Otherwise, set 775 permissions to the store root directory after the extension is deployed.




Column
width50%


Panel
borderWidth2px
borderStylesolid

If you are installing an extension from Aheadworks for the first time, you need to add our composer repository to your Magento store:

Panel
borderWidth2px
borderStylesolid

1. Login to your ssh console and navigate to your store folder:

Panel
borderWidth2px
borderStylesolid
cd path_to_the_store_root_folder

Run the following command:

Panel
borderWidth2px
borderStylesolid
composer config repositories.aheadworks composer https://dist.aheadworks.com/

On successful execution of the command you will be able to use the composer to install the extensions.



Panel
borderWidth2px
borderStylesolid

To install the extension:

2. Login to your ssh console and navigate to your store folder:

Panel
borderWidth2px
borderStylesolid
cd path_to_the_store_root_folder



Panel
borderWidth2px
borderStylesolid

 3. Run the following command to install the latest version of the extension:

Panel
borderWidth2px
borderStylesolid
composer require aheadworks/module-ca

if you need to install a specific version, run this command:

Panel
borderWidth2px
borderStylesolid
composer require aheadworks/module-ca:<version>


Tip

Specify the version of the extension in <version>


Panel
borderWidth2px
borderStylesolid

When prompted, enter Public Key (Username) and Private Key (Password):


Note

Both Public Key (Username) and Private Key (Password) can be found in My Projects and Licenses in your personal account on our site:

Image Modified



Panel
borderWidth2px
borderStylesolid

4. Enable the extension:

Panel
borderWidth2px
borderStylesolid
php -f bin/magento module:enable Aheadworks_Ca

Next, register the extension:

Panel
borderWidth2px
borderStylesolid
bin/magento setup:upgrade

Recompile your Magento store if you are in the Production mode:

Panel
borderWidth2px
borderStylesolid
bin/magento setup:di:compile

To verify that the extension is enabled, run this command:

Panel
borderWidth2px
borderStylesolid
bin/magento module:status

Clean store cache, by running the following command:

Panel
borderWidth2px
borderStylesolid
bin/magento cache:clean

Log out and Log in the backend again.


Panel
borderWidth2px
borderStylesolid

To upgrade the extension:

5. To update or upgrade an extension:

Download the updated extension file. Take note of the module-name and version. Export the contents to your Magento root.

If a composer package exists for the extension, run one of the following.


Code Block
titleUpdate per module name:
composer update aheadworks/module-ca


Code Block
titleUpdater per version:
composer require aheadworks/module-ca:<version>

Run the following commands to upgrade, deploy, and clean the cache.

Panel
borderWidth2px
borderStylesolid
php bin/magento setup:upgrade --keep-generated
php bin/magento setup:static-content:deploy
php bin/magento cache:clean





Uninstalling M2 Company Accounts

Automatic removalManual Removal


Column
width50%

To uninstall the extension, run the following command:

Panel
php bin/magento module:uninstall Aheadworks_Ca

Please note: uninstall script works correctly only if the module was previously installed via Composer

Info

Note for a developer:

To use the uninstall script in the standard workflow, see Magento\Setup\Console\Command\ModuleUninstallCommand::validate(). The function should return an empty array for further correct processing. You can simply comment out the lines 319-338.




Column
width50%

1. Disable the module by executing the following commands:

No Format
php bin/magento module:disable Aheadworks_Ca
php bin/magento setup:upgrade

2. Remove the extension files from the following folder:

No Format
app/code/Aheadworks/Ca




Introducing M2 Company Accounts

Section

Business Advantages

Magento 2 Company Accounts facilitates the B2B model for an eCommerce business. Store admins find it easier to manage the accounts of companies, and project for higher sales as they see a broader purchasing strategy of the partner. Corporate customers get able to stay organized within a sharp structure with apparent role boundaries; they act as one but loose no individuality and always retain composure and feel the back of the colleague.

What Makes the module Different

What's new?

The latest version of the extension (1.6.0) enables the following:

  • Order Approval by the Company Admin
  • Order Approval by the Store Admin 
  • Additional email notifications related to operations with domains
  • Additional email notifications on occasions when users are assigned to the Company
  • Filtering and sorting of the My Orders grid in My Account


M2 Company Accounts on Backend

Section

Customizing the Extension

To access the settings of the extension, proceed to Stores > Settings > Configuration > Aheadworks Settings > Company Accounts. The configuration page is split into three sections: General, Email and New Company form Customization.

General Settings

The following configuration options are available in the General section:

  • Default Sales Representative - select a store-user to be the Default Sales Representative to deal with company accounts. The name and email address of the Default Sales Representative will be available to the company users on the Frontend. The Default Sales Representative is then a contact point regarding all company-related matters.
  • Enable Order Approval by Company Admin - set to Yes to subject orders to the Company Admin's approval in cases when order subtotals surpass the established by the Company Admin limit.
Tip

The Sales Representative extension can noticeably expand the concept of the Default Sales Representative.


Note

When Enable Order Approval by Company Admin is set from Yes to No, orders which were created when Enable Order Approval by Company Admin was set to Yes are subject to the rules as per respective setting. New orders, which were created starting the time Enable Order Approval by Company Admin was set to No, are not subject to the approval of the Company Admin.

Orders, which were created before Enable Order Approval by Company Admin was set to Yes, are not subject to the approval of the Company Admin.

Email

First, specify the sender of the notifications. Do that with the help of the Notification Email Sender drop-box. The options available here are native Magento 2 parameters which can be found and fine-tuned in Stores > Settings > Configuration > General > Store Email Addresses.

Next, select the templates for the notifications considering the following:

Configuration ParameterTrigger EventEmail RecipientComment
New Company SubmittedNew company account submitted for approvalAdmin

The Admin will not receive the email when a company is created on the Frontend, if the Default Sales Representative is not selected in the settings of the extension.  When a company is created on the Backend, a Sales Representative is selected automatically in the New Company form. The Admin receives the email in the latter case.

New Company ApprovedCompany account approvedCustomer
New Company DeclinedCompany account rejectedCustomer
Company Status ChangedThe status of the company account is updatedCustomer
New company User CreatedNew customer is added to the company account Customer
New Company Domain Created by Company AdminA new domain is assigned to Company Domains and has status ActiveAdmin
New Company User Assigned, Send To Company AdminA customer is assigned to the CompanyCustomer
New Company User Assigned, Send To Company UserA customer is assigned to the CompanyCustomer
Company Domain Approved by Sales RepresentativeThe Sales Representative approves the domainCustomerRequires M2 Sales Representative installed
Company Domain Status Changed by Sales RepresentativeThe Sales Representative changes the status of the domainCustomerRequires M2 Sales Representative installed
Company Domain Status Deleted by Sales RepresentativeA domain is deleted by the Sales RepresentativeCustomerRequires M2 Sales Representative installed
Company Domain Status Changed by Company AdminA domain receives a change of status, either from the Backend or FrontendAdmin
Company Domain Deleted by Company AdminA domain is deletedAdmin
Order was Sent for Approval

A new order was sent for approval by a Company User

Admin
Order Status ChangedCorporate order status is changedCustomer


Note

Make sure you have set the desired expiration period to the link which appears in the notifications on the following occasions:

  • in a reply to the “forgot the password” action;

  • when setting a password for a first-time entry to the company account.

 To check if the expiration period is satisfactory with your needs, and alter it, if need be, please proceed to Stores → Configuration → Customer configuration → Recovery Link Expiration Period (hours).

New Company Form Customization (for Frontend)

Warning

The customization made herein concerns only the New Company form on the Frontend. The New Company form on the Backend always remains static. The form on the Backend is not subject to changes according to the logic of the B2B interactions. 

To customize the New Company form, you can do the following:

  • rename the fields
  • shuffle the fields to the desired order
  • enable or disable fields
  • set fields as "Required" 
Note

Not all fields can be disabled or set as "Not Required".

The New Company form Customization section is split into three blocks: Company Information Customization, Company Administrator Customization and Legal Address Customization.

The Company Information Customization allows customizing the form as follows:

FieldEnable/DisableRequiredComments
Company Name--Mandatory field
Company Legal Name++
Company Email--Mandatory field
VAT/TAX ID++
Reseller ID++

The Legal Address Customization allows customizing the form as follows:

FieldEnable/DisableRequiredComments
Street Address--Mandatory field
City--Mandatory field
Country--Mandatory field
State/Province--Mandatory field
ZIP/Postal Code--Mandatory field
Company Phone Number++


Note

The "State/Province" field can be marked as required at the extensions's configurations, but can not necessarily be required on the company creation pages (frontend and backend).

The behaviour of "State/Province" is configured in Stores > Configuration > General > State Options > State is Required forIt is not possible to customize the Ste/Province field in the Company Accounts settings. You can only change the order of this field in the form. 

The Company Administrator Customization allows customizing the form as follows:

FieldEnable/DisableRequiredComments
First Name--Mandatory field
Last Name--Mandatory field
Email--Mandatory field
Job Position++
Phone Number++

To finalize the configuration, click on the Save Config button in the top right corner of the Settings page.

Adding reCaptcha to the New Company form

To secure your store from robot-messages and spam, enable Google reCaptcha for the New Company form. To do so, go to  Stores → Configuration → Security → Google reCaptcha → Frontend.

Enable the reCaptcha on the Frontend, and scroll down the section to enable reCaptcha for the New Company form. To do so, set Use in Create Company to Yes.

More on Google reCaptcha in Magento 2.


Company Accounts Grid

To get access to the company accounts, proceed to Customers > Companies.

The page shows a grid with the following columns:

  • ID - the identification number of the company account;
  • Status - the status of the company account: Pending Approval, Approved, Blocked or Declined;
  • Company Name - the name of the company;
  • Country - the country as per the legal address of the company;
  • City - the city as per the legal address of the company;
  • Customer Group - the customer group the company is assigned to;
  • Admin Email - the email of the Company-Admin;
  • Allowed Payment Methods (available on integration with Payment&Shipping Restrictions) - the list of payment methods specified for the company with the Payment&Shipping Restrictions module;
  • Sales Representative (available on integration with Sales Representative) - the Store User who is assigned to the company as the Sales Representative; 
  • Action - the Edit active link redirecting to the Edit Company page.

You can decline, block and approve company accounts individually or in bulk with the help of the Actions drop-box on the left, above the grid. Editing is only possible for an account via the Edit active link in the correspondent cell of the Action column. 


Creating / Editing Company Accounts

To create a company account from the Backend, click on the Create a New Company button in the top right of the page. To edit a company account, click on the Edit active link in the correspondent cell of the Action column of the Companies Grid.

Once Create a New Company is clicked on, the module takes you to the Create/Edit a Company account page.

This is where you proceed with the following blocks: General, Account Information, Legal Address, Company Admin Information, Notes, Company Domains (only for the Edit Company page)and Allowed Payment Methods (only when Payment&Shipping Restrictions is installed).

General Company Information

The General block prompts some general information about the company:

  • Company Name - (required) the name of the company;
  • Status - the status of the account: Pending (default), Approved, Blocked and Declined;
  • Company Email - (required) the email of the company;
  • Sales Representative - assign the Sales Representative to monitor the activities of the company and receive notifications on thereof. You may set a default Sales Representative in the configuration of the extension;
  • Allow Quotes (available on installation of the Cart to Quote extension) - enable or disable access to RFQs for all company users.

Account Information and Legal Address

The Account Information block invites to enter some legal and financial details of the company account, if available:

  • Company Legal Name - the legal name of the company;
  • Tax id / VAT id - the tax or VAT number of the company;
  • Reseller id - the identification number of the reseller.

The Legal Address requires typical address details of the company as a legal unit. State/Province and Phone Number are optional herein.

Company Admin Information

The Company Admin Information block suggests you provide some details on the administrator of the company account:

  • Company Admin Email - (required) the email address of the Company-Admin (may differ to that one of the company);
  • First, Last Name - (required) the name of the Company-Admin; 
  • Job Position - the position of the Company-Admin;
  • Phone Number - the phone number of the Company-Admin (may differ to that one of the company);
  • Customer Group For Company Users - the group the users of the company account belong to being the customers of your store (General, Wholesale, Retail or any other you have on the list);
  • Associate to Website - the website of your store, the administrator is associated with as a customer;
  • Send Welcome Email From - the view of the store the administrator will receive emails from. 

The value of the Customer Group parameter will be assigned to all users of the company account, as chosen herein. Company account users are added by the Company-Admin (or by other company users with relevant role-permissions) on the Frontend.

You can assign a company user to a different group. Do that on the Customer Edit page: Customers → All Customers → Edit (link in the Action column) → Account Information .

Note

Customer email is a unique identifier in Magento. Therefore, if you use the email of an existing customer for Company Admin Email, this customer will have his/her individual account transformed into a Company-Admin account. All orders of that user will then be available (due permissions set) to all other users of the company. 

A customer can be the admin to only one company account. 


Warning

Deleting company users

  1. Make sure that deleting entities, like customers, may cause serious and irreparable disruption in other entities linked to thereof, like orders, company accounts end etc. Deleting a customer deletes his/her orders too.
  2. Deleting a customer who is the Company Admin is made not possible. A corresponding error will be shown on an attempt to do so, and no action will be applied. To overrun this restriction, reassign the Company-Admin in the Company Admin Information block on the Create/Edit Company page and then delete the desired customer profile.

Notes

The Notes block contains a text-field where you can leave notes about the company. These will be visible only to the Store-Admin.

Company Domains

This block is available only on the Edit Company page. When creating a company from scratch (that is when working on the New Company page), you will first have to save the company and then edit it to add company domains. 

Info

New customer accounts registered with emails which belong to the company domains will automatically be added as child accounts to the company. This solution may save a lot of time on assigning users to companies.

The Company Domains block comes with a grid and the Add new Domain button. The grid collects the domains assigned to the company account into the three columns: Domain Name, Status and Action. The Action columns contains the Delete active link.

To delete a domain from the grid, and untie it from the company account, use the respective Delete link. 

Note

When a domain is deleted, users whose emails belong to that domain are not removed from the company account. They continue to be the users of the company account.

To update the status of a domain, click on the name of the domain and update the status. The Configure Domain popup up will emerge. The popup has two fields: Domain Name and Status. Use Status to update the status of the domain.

Tip

When a domain is on the grid, it is not possible to change the name thereof. The Configure Domain popup up will have it disabled. You will have to delete the domain with the 'incorrect' name and add a new domain.

Mind the following when updating the status of a domain:

  • Inactive → Active: new customers whose emails are within the domain will be assigned to the company, the customers will have status Active
  • Inactive → Pending: new customers whose emails are within the domain are NOT assigned to the company
  • Active → Inactive: starting the moment of the status change, new customers whose emails are within the domain will NOT be assigned to the company automatically. Existing company users whose emails are withing the domain will remain active company users.
  • Active → Pending: starting the moment of the status change, new customers whose emails are within the domain will NOT be assigned to the company automatically. Existing company users whose emails are withing the domain will remain active company users.
  • Pending → Active: starting the moment of the status change, new customers whose emails are within the domain will be assigned to the company automatically, and the customers will have status Active
  • Pending → Inactive: new customers whose emails are within the domain are NOT assigned to the company

To add a domain, click on the Add New Domain button. The Configure Domain popover will prompt you to enter the name for the domain and specify its status. The status may take one of the three options: Inactive (by default), Pending and Active.

To save the domain, click on the Save button in the top right. To cancel the operation - Cancel. 

Domains entered here by the Store-Admin will appear in the Configure Domains grid on the Frontend.

Note

Customers who are already registered on your store, and whose emails belong to the newly configured domain will NOT be added to the company automatically. If need be, you will have to do it manually.   


Info

There are some domains which cannot be submitted as company domains (gmail, yahoo, 10mins emails, etc). If the Store-Admin or Company-Admin tries to submit them, a popup is displayed: “This domain address can’t be used“.

More examples of 'forbidden' domains can be found here:

Allowed Payment Methods

The Allowed Payment Methods block gets available on integration with the Payment&Shipping Restrictions module. The blocks comes as a list of payment methods available for multiple selection. Selected payments will then be available to all company users at checkout.

Once finished, click Save in the top right corner of the page to save the company account. Alternatively, you may use one of the the other buttons claiming a correspondent action with the present company account.

Tip

If no payment method is selected, default Payment Restriction configuration is applied.

Learn more on setting Payment Restriction defaults.

Learn how to enable/disable payment methods in Magento 2. 

The list of native Magento 2 payment methods can be extended by the following extensions from Aheadworks:


Deleting Company Accounts

When the status of a company is Declined, the Company Edit Page displays the Delete button. Click on the button to remove all company data including that of the sub-accounts and company account itself. A popup is displayed: “Do you want to delete this company permanently? Company data and related sub-accounts will be deleted.” Click on Yes to finalize the proceed, click on No to cancel the operation.

Note

 The email of the deleted sub-account of the Company-Admin can be used for the registration of a new customer account. 


Tip

This can be a solution in cases when a company account is created by mistake and the email address is to be freed for a customer account.



Company Account as a Customer Attribute

According to the logic of the present extension, Company Account is a customer attribute. Thereby, discounts, refunds or rewards to a particular customer within the Company are visible and available to all the company users.

Moreover, the Backend will feature the Company and Status in Company columns added to the Customers Grid, alongside other company information in the layouts of orders, invoices, etc. 


Managing Orders Placed by Company Users

When M2 Company Accounts is installed on the store, the Orders grid is enhanced with the Company column. The column features the name of the company, the Company User of which has placed the order.

Furthermore, the Status column features "Company Pending Approval" for orders which are subject to the approval of the Company Admin.

Note
titleAuthorize.Net particulars

When a native action, except Print Invoices (see the Actions dropbox above the grid), is applied to orders with status Company Pending Approval or Rejected by Company Admin, an error is displayed, the action is not performed.

When Authorize and Capture is set for Payment Action in Authorize.net settings †, action Print Invoices is available for orders with the above statuses. When Authorize Only, the Print Invoices action is not available for orders with the above statuses

† Stores → Configuration → Sales → Payment Methods → Authorize.Net → Basic Authorize.Net Settings

The Store Admin can approve/reject orders instead of the Company Admin. This is only possible for orders with status Company Pending Approval.

To approve/reject an order, go to Backend → Sales → Order # ____ page and refer to the Approve and Reject buttons in the top right. Mind, for orders with status Company Pending Approval buttons Approve and Reject substitute native Magento 2 CTA buttons.

The following takes place when the Store Admin clicks on the Approve button: 

  • The order receives the default status like any new order
  • Actions "Approve" or “Reject” are not displayed 
  • Native Magento 2 CTA buttons are displayed

The following takes place when the Store Admin clicks on the Reject button: 

  • The order receives status “Rejected by Company Admin”
  • Other CTA buttons are not available (including Reorder)

Company Accounts on Frontend

Section

Starting Company Accounts

Creating a company account on the Frontend is similar to creating a customer account. When the module is successfully installed on your store, the Sign-In or Create New Account page will have an extra block - New Company Account. The Customer clicks on the blue button Create a Company Account to start a company account.

On clicking on the Create a Company Account button, the user is redirected to the New Company page, where he/she is prompted to fill in the New Company form. The form will have the fields as specified in the extension configuration.

 

On creation of the account, a notification arrives to the email inbox of the Company-Admin. The notification will have a link to set a password and enter the account for the 1st time. Please mind, the link is subject to expiration ( the period of link validity is set in Backend → Stores → Configuration → Customer configuration → Recovery Link Expiration Period). The link stays active even when it expires. In this case, instead of taking the user to the "Set Password" page, it will take him/her to the 'Forgot password' page. On entering the email address in the offered field, a new notification with a re-activated link will be forwarded to the user to set a password and enter the account.  

Note

Customers, who already have customer accounts with your store, will not be able to link already registered email addresses to a Company-Admin or company user account. An email address is a unique identifier.

Only the Store-Admin can assign a customer account to a Company-Admin account or company user account. Do that on the Customers page. Tick out a user, and click on the Actions folding list. Select the Assign to the Company option. The option can be applied to customers in bulk. 

Make sure, that all orders of a customer, now assigned to the company, will become visible to other company users who have due permissions to view company orders.

Users assigned to a company from the Backend will receive the Default Role with permissions specified by the Company-Admin on the front. On creation of a company, the Default Role is configured as follows: Name - New User, Permissions - view Company Information (only).


Managing Company Accounts

Customers use My Account on the Frontend to manage company accounts in the same fashion as they do for individual customer accounts. The list of features is extended here with those of Company Information, Company Users and Roles & Permissions.

Company Information

Company users find the details on the company in My Account→ Company Information. This information is given in the way it was provided by the Company-Admin on creating the company account. 

To edit the information, the Company User clicks on the Edit active link next to the title of the page .

For the Company-Admin only, the Company Information page also shows the Company Domains section. Other company users are not able to see the section. 

This is where all company domains are collected into a grid of the following columns: Domain Name, Status and Action. The Action cells contain the Delete and Deactivate/Activate links which allow to manipulate the domains as follows:

  • On clicking on the Delete link, the domain record is deleted from the grid, company users whose emails are withing the deleted domain are not removed.
  • On clicking on the Activate link, the inactive domain receives status Active
  • On clicking on the Deactivate link, the active domain receives status Inactive

Only Delete is displayed for domains with the Pending status.

To add a domain, the Company-Admin clicks on the Add New Domain button. A popup emerges prompting to indicate a domain name.

On clicking on the Send for Approval button, the popup is closed, the record is added into the grid with status Pending. On clicking the Cancel button, the popup is closed and the record is not saved.

Domains entered here by the Company-Admin will appear in the Company Domains grid on the Backend.

Info

New customer accounts registered with emails which belong to the company domains will automatically be added as child accounts to the company. This solution may save a lot of time on assigning users to companies.


Note

When the email of an existing customer is changed into the one withing a company domain, the user is not added to the company automatically.


Info

There are some domains which cannot be submitted as company domains (gmail, yahoo, 10mins emails, etc). If the Company-Admin tries to submit them, a popup is displayed: “This domain address can’t be used“.

More examples of 'forbidden' domains can be found here:

Company Users

The Company Users page lists all the company account users. The data is presented in a table of the following columns: ID, Name, Email, Phone Number, Roles, Job Position, Status and Actions.

The status of a company user may take one of the two values: Active or Inactive. To activate/deactivate a user, click on a corresponding active link in the Actions column.

Note

When a company user receives status Inactive he/she is not able to enter the company account. Furthermore, inactive users are not be able to use their email addresses to start new accounts.

Deleting users from a company account is not possible on the Frontend. Should need be, this operation is possible on the Backend. However, make sure that deleting entities from the store, deletes or damages the entities interlinked with thereof.  

To edit or add a company user, the Company User clicks on the Edit active link or the Add New User button respectfully.

All fields in the New User form are mandatory. They are text fields prompting User's job position, name, email and phone number, as well a drop-box User Role to pick out a role of the user within the company account (Administrator by default). When no suitable role is found in the drop-box, the Customer User proceeds to the next step. 

Roles and Responsibilities

To browse, edit and add new roles, the Customer User gos to Roles and Permissions in My Account. The page features a table with all the roles available in the account. Company users can see the number of users which belong to a role, the name and id of the role. 

To edit or add a new role, the Customer User clicks on the Edit active link or Add New Role button respectively.

There are three blocks on the Create/Edit Role page: General Information, Store Credit & Refund and Reward Points (the later two require respective modules from Aheadworks installed). 

The General Information block prompts the following:

  • Role Name - the Company Admin/User suggests the name for the role (required field). 
  • Set as Default - the Company Admin/User ticks the check-box to set the given role as Default. Users assigned to the company from the Backend receive the Default Role. Only one role can be the Default Role. When the role is (already) default, the checkbox Set as Default is disabled.
  • Order Limit per Role (visible only to the Company Admin) - the Company Admin/User indicates the threshold for the subtotals of orders when the Company User of the given role is not able to complete an order without the approval of the Company Admin. 
  • Permissions - the Company Admin/User decides the access the role has to: all account information, company information, company users, roles, orders, reward points, credit balance and quotes. Set how much of the access is allowed to the role: viewing, and/or adding, and/or editing. 
Info

When nothing is entered into the Order Limit per Role field, there is no order limit for the role, i.e. the Company User if the given role can complete orders of any subtotal.

When "0" is entered, then every order requires approval.


Tip

Corporate customers use Order Limit per Role to ensure that Company Users do not spend over the given amount of money, particularly when they are not authorized to do so.

Note

Do not mistake the Administrator role and the Administrator account of the company account. Make sure the company users are not confused by this too. The Company Admin can change the name of this role, as well as the permissions to his/her convenience. 


Tip

If the Company Admin wants to change the administrator of the Company, he/she does that on the Company Information Page (on the Frontend) or from the Companies Grid (on the Backend). The Company Admin may later reassign the former Company Administrator to the company under a different role, to assign him/her to a different company or to delete his/her account. Make sure, the Company Admin does not delete the Administrator of the company account, never mind how many users with the Administrator role they have within the account.

The Store Credit & Refund and Reward Points blocks feature two text-fields, each to set the limit of credit balance and reward points available to the role per order.

'0' (zero) is the text-box value for unlimited usage of either reward points or credit balance. "0" is the value by default. The Customer Admin leaves '0' if he/she wants the role to have access to all reward points or credit balance available for the company. Roles with limit values different from '0' are not able to spend more reward or credit points than that value.

Once finished, the Company User clicks on the Save button. The User will be redirected to the Roles page.


Managing Orders

When the Company User places an order which subtotal exceeds the Order Limit per Role value, the Checkout page features the following note below the button Place Order button: “Your order will be sent to the company admin for approval“. On clicking on the Place Order button, a success page is opened saying “Your order was successfully sent for approval to company admin”. The order receives status "Company Pending Approval".

To approve or reject orders, the Customer Admin goes to My Account → My Orders.

The native Magento 2 My Orders grid is enhanced with the Created By field, featuring the name of the Company User who created the order.

The Company Admin can approve/reject orders with status Company Pending Approval only. To do so, the Company Admin clicks on the View Order active link in the Action column and proceeds to the Order # ___ page.

Info

Customers can sort the My Orders grid by clicking on the name of the column.

Customers can filter the My Orders grid with the help of the Filters button above the grid.

The Order # ___ page displays the following active links to approve or reject orders: Approve and Reject, correspondingly. These links are only displayed to the Company Admin.

When the Company Admin clicks on "Approve", the following takes place:

  • The confirmation message is displayed: "The order has been successfully approved"
  • The order receives the default status like any new order
  • The links "Approve" or “Reject” disappear from the Order # ____ page
Note
titleAuthorize.Net particulars

When Authorize and Capture is set for Payment Action in Authorize.Net settings †, and Authorize.Net was used as a payment method for the given order waiting for the Company Admin's approval, the payment as per the order will be processed even without the approval from the Company Admin. The Store Admin will be able to capture the payment. When Authorize Only is selected for Payment Action, orders waiting for the approval from the Company Admin will not have their payments processed until the approval is given.

† Stores → Configuration → Sales → Payment Methods → Authorize.Net → Basic Authorize.Net Settings

When the Company Admin clicks on "Reject", the following takes place:

  • The confirmation message is displayed "The order has been rejected"
  • The order receives status “Rejected by Company Admin”
  • The links "Approve" or “Reject” disappear from the Order # ____ page
  • The order remains in the My Orders grid

Integrations

Section

Integration Options

The Company Accounts module is integrated with Aheadworks Reward Points, Store Credit & Refund, Cart to QuotePayment & Shipping Restrictions, Requisition ListCompany Credit and Sales Representative. These modules make up an essential bundle for business-to-business model of eCommerce. There are no particulars in setting or operating that integration, but for that of the Sales Representative, which is explained below. Such an approach further makes the use of Company Accounts similar to the B2C experience, easy and flawless.

You may learn more on the extensions and the embodiment of the integrations from the manuals below:

Warning
titleA note on compatibility with Reward Points
  1. Reward Points 1.8.0 or newer is compatible ONLY with Company Accounts 1.4.1 or newer
  2. Reward Points 1.7.2 or older is compatible ONLY with Company Accounts 1.4.0 or older

Integration with M2 Sales Representative

When M2 Sales Representative is installed on the store alongside M2 Company Accounts, the Admin gets able to appoint Sales Representatives to companies. Sales representatives can be appointed to companies automatically in compliance with the company users' belonging to a customer group, or manually and individually to each company. By appointing sales representatives to companies, that is users created with the help of M2 Sales Representative, the Admin can demarcate access for these users to the data on the companies. 

M2 Company Accounts, when used on its own, has an option of assigning sales representatives to companiesWith regard to this fact, M2 Sales Representative is meant to enhance M2 Company Accounts as follows:

  • Sales Representative (Conditions) is added as an option to the dropdown Default Sales Representative at Stores → Configuration → Aheadworks Extensions → Company Accounts 

  • A hint is added to explain the use of Sales Representative (Conditions) and to give quick access to Stores → Configuration → Aheadworks Extensions → Sales Representatives → Conditions: “If Sales Representative (Conditions) is selected, Default Sales Representative is assigned to a new company according to conditions specified here {link to SR conditions}”

  • Sales Representative (Conditions) is the default value of Default Sales Representative when M2 Company Accounts and M2 Sales Representative are installed one after another for the first time on the store. Otherwise, if M2 Company Accounts has already been in use, and M2 Sales Representatives is added to the store, the default value of Default Sales Representative remains unchanged. The latter aspect allows companies which have been created before the installation of M2 Sales Representative to keep on working with the appointed to them earlier sales representatives.



Product Page

Need Customization?

You can always find the latest version of the software, full documentation, demos, screenshots, and reviews on http://aheadworks.com
License agreement: https://aheadworks.com/end-user-license-agreement
Contact Us: https://aheadworks.com/contact
Copyright © 2021 Aheadworks Co. http://www.aheadworks.com

...