This concept is created to give an overview of the company profile information available for business customers. According to the new B2B requirements customers were split 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 buying organization. Every business customer has at least one user which should operate in the web shop. As part of the business customer this user has to 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 possibility to view or edit any company profile information because they do not refer to a company.
It may occur that two customers modify their company profile information at the same time. If one customer tries to save this information after another one has saved it, a warning message should be visible for the second customer saying that another customer has just changed the company profile data and page reload is needed 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. Depending on this setting all customers will be enabled/disabled to enter the business web shop. This means that non-active customers will not be able to log into the web shop.
Customers can view their company profile information on the Profile Settings page of their Account Settings. To do that, they must be logged in to the business web shop with their credentials.
Customers can also edit their company profile information clicking the edit icon within the Company Profile section of the Profile Settings overview page. The following screenshot shows the storefront page dedicated to editing the company profile:
Since company profile data have 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. This is especially true for the storefront application where user profiles have to display common customer information (e-mail setting, password setting, user profile settings - first name, last name, etc.) mixed with business customer-specific information (company profile data) depending on the customer type.
For example the Your Profile section has to show information for customer's department if it is a business customer, the Company Profile section has to be visible and editable for business customers only.
The following diagram shows the schema of the Profile Settings storefront page. There are two different colors that mark 1) common information for both individual and business customer, and 2) specific information for the business customer information. Green color shows places on the page where business customer-specific data is displayed. This specific data is retrieved and shown using the IS7 extension point feature. In this way we can use existing artifacts and extend them for our purposes.
As already mentioned in the introduction, two customers can edit their company information at the same time. The first one, who saved the changes, is lucky. His/Her changes go to the database. The second customer will be prompted to reload the page when he/she tries to save his/her own changes. The picture below illustrates the warning message which will be displayed to the second customer.
How Does Checking for Modifications Work?
The operation which checks for company profile modifications on save is form validation. When a customer opens the company profile edit page, the current values are stored as hidden fields in the web form that is shown. These hidden fields are submitted together with the new values that the customer entered in the form. At the server side, the values in the hidden fields are compared with the values stored in the database. If these values differ, it means that another customer already modified the profile and loading of the new database values is needed. If compared values are equal (means, no changes by another), then changes made by the customer are saved to the database. During the time from initiating the request for saving the data to actual saving of the new data, resource locking on CompanyProfile instance is performed to assure consistency in update operations.
Intershop Commerce Management features a simple and an advanced search mask for users and customers.
Regarding business customers in simple search you can type in "company_name" or "company_name2" to search for. At this moment advanced customer search is working with "company_name" only.
Note
It is not possible to leave "Company Name" empty on creation or modification; this is required information and it is not possible to create or update the customer information without providing this property.
Customers containing company information means business customers. To be able to import/export company profile information the user should do this for business customers only. An individual customer does not contain any company-related information.
First of all, you need a valid import file already prepared or you can first export some customers and use this exported file as source for the import process.
Note
It is not possible to import company profile data (B2B customer) without providing Company Name in the source file. Import file validation should be successful but the import process will fail and nothing will be updated.
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 page reload is necessary.
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 on modification; 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 if a customer/user is enabled or disabled (active/inactive). We may have 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 |