This concept is intended to give an overview of the company profile information available for business customers. According to the new B2B requirements customers have been divided into two types:
An individual customer is a person who orders articles/products for his/her needs and does not belong to any organization. A business customer orders products for the needs of the company, i.e., this customer type represents the company as a buying organization. Each business customer has at least one user which should operate in the webshop. As part of the business customer, this user must be able to edit the company's profile information. This operation can be performed on business customers only. Individual customers (B2C customers) do not have the ability to view or edit company profile information because they are not related to a company.
It is possible for two users of a business customers to change their company profile information at the same time. If a user tries to save this information after another user has saved it, the second user should see a warning message stating that another user has just changed the company profile data and that the page needs to be reloaded first.
Company profile information is available for editing once the business customer has been created with the required data, Customer ID and Company Name. The back office page which shows this information should look like this:
On this page, back office administrators should modify all editable information for their customer: Customer ID, Company Name, additional company name (Company Name 2), Taxation ID, Industry, Description and one of the most important settings: the Active setting. This setting enables/disables all users of a business customer to enter the business webshop. However, non-active users will not be able to log in to the webshop.
Users of a business customer can view their company profile information on the Profile Settings page of their Account Settings. To do this, they must be logged in to the business webshop with their credentials.
Users of a business customer can also edit their company profile information clicking the edit icon in the Company Profile section of the Profile Settings overview page. The following screenshot shows the storefront page for editing the company profile:
Since company profile data needs to be plugged into some common artifacts for individual and business customers, several extension points were used in pipelines and ISML templates to display business customer-specific data, e.g. company profile data at least for the commerce management. In regards of the PWA storefront application the ICM provides some customer REST endpoints to transfer the necessary data to the PWA and vice versa. There are different REST endpoints for each customer type. The company data is only processed by the endpoints intended for business customers. Different request methods are provided to enable CRUD operations. For more in-depth information, Intershop recommends using the ICM Swagger UI. The PWA is an Angular application with integrated NgRx store functionality. This application provides different components to display common data used for both customer types and additional data for business customers only. The components associated with the business customer are only displayed if the logged-in customer is of that type.
For example, the Your Profile section must display department information and the Company Profile section must be visible and editable, if the user belongs to a business customer.
The following diagram shows the layout of the Profile Settings storefront page. Gray indicates information that applies to both private and business customers, and green indicates information that applies specifically to business customers. Based on the green areas you can also see where information specific to business customers appears on the page.
As mentioned in the introduction, two users of a business customer can edit their company data at the same time. The changes made by the user who saves first are transferred to the database. The second user will be prompted to reload the page if he/she tries to save his/her own changes. The image below shows the warning message displayed to the second user.
The operation that checks for company profile modifications on save is form validation. When a user opens the company profile edit page, the current values are stored as hidden fields in the web form that is displayed. These hidden fields are submitted along with the new values entered by the user in the form. On the server side, the values in the hidden fields are compared to the values stored in the database. If these values differ, it means that another user has already modified the profile and the new database values need to be loaded. If the compared values are the same (i.e. there are no changes made by another user), then the changes are saved to the database.
During the time from the initiation of the request to save the data to the actual saving of the new data, resource locking is performed on the CompanyProfile instance to ensure consistency of update operations.
Intershop Commerce Management features a simple and an advanced search mask for users and customers.
To search for business customers using the simple search, you can enter "company_name" or "company_name2" to search for. The advanced customer search currently supports only "company_name".
Note
It is not possible to leave the Company Name field empty when creating or modifying a customer. This is required information and it is not possible to create or update the customer information without providing this property.
Customers containing company information are business customers. To be able to import/export company profile information, the user should do so only for business customers. An individual customer has no company-related information.
First of all, you need a valid import file that has already been prepared, or you can export some customers first and use this exported file as the source for the import process.
Note
It is not possible to import company profile data (B2B customers) without specifying the Company Name in the source file. The import file validation should be successful, but the import process will fail without any updates.
Only business customers can view and edit company profile information in the storefront.
A warning message will be shown saying that another user has modified the company information and page reload has to be performed to view the changes. There is no option to save desired values if a page reload is required.
Perform the following steps to test how this shared information is handled:
In this way a user is notified that someone else already modified something.
Note
It is not possible to leave Company Name empty when modifying a customer. This is required information and it is not possible to update the company data without providing this property.
All customers and users have a boolean value for their Active setting. This setting defines whether a customer/user is active or inactive. There may be different active values for customers and users, e.g. active customer ("active" = true) - inactive user ("active" = false). Depending on the active value for both customer and user, the system will decide whether to confirm or deny access to the given user.
The following table shows different combinations for the active setting and the login status:
"Active" setting of customer | "Active" setting of user | Storefront |
---|---|---|
true | true | login possible |
true | false | login not possible |
false | true | login not possible |
false | false | login not possible |