Implementing customer search
A store associate can search for a customer and view the engagement of the customer with the store and the enterprise. This section describes the APIs, services, and other components that are used to implement customer search.
When a customer visits a store, a store associate can engage the customer in a purchase by identifying the customer and viewing the profile. The profile displays the basic details of the customer along with the order history.
Assumptions and limitations
- Supports only customers with
CustomerType=02
. - Supports exact match of phone number and email ID.
Solution
Find customer portlet
A store associate can search for a customer by using the complete phone number or email ID. Alternatively, the store associate can click Advanced search to search for a customer by using first and last name.
getCompleteCustomerList
API is called to retrieve the matching customers.
The API does an exact match of the phone number or email ID of the customer and returns the results.- If a single customer is returned as the search result, the Customer profile screen is displayed with contact details, shipping information, and order history of the customer.
- If multiple customers are returned as the search results, the Customer search results screen is displayed. The store associate can click View to view the Customer profile page..
Customer search results page
- Modify Search
A store associate can view and modify the search criteria by using the Modify search link.
- Customer search results
A store associate can view the list of customers based on the search criteria as a separate cards. This page displays basic information of the customer, such as name, phone number, email ID, and address. Clicking View opens the Customer profile page.
Customer profile page
- Customer details
- A store associate can view the basic details such as the name, phone number, email ID and
address of the customer. Email ID and phone number of the customer are taken from the customer's
contact details and not from the customer's address. Default shipping and billing addresses are also
displayed in the customer profile screen.
The
getCompleteCustomerDetails
API is called to get the customer details.By default only name, phone number, and email are visible. Clicking More info expands the customer details to display the default billing and shipping addresses and the Edit profile button. Clicking Hide collapses the section.
- Edit profile
- A store associate can modify the customer profile by clicking Edit
profile in the customer details section of the Customer profile
page. The Edit profile button is visible only when More
info is clicked. This action is resource permission controlled. (Edit customer
profile).When Edit profile is clicked, the
getCompleteCustomerDetails
API is called to populate the following details of the customer:- The contact information panel includes first name, last name, telephone number, and email address.
- The Address panel displays all the addresses with the default shipping and billing addresses followed by rest of the addresses.
- If the
getCompleteCustomerDetails
API call fails, an error message is shown with a link to retry editing. - When the changes are confirmed, the
manageCustomer
API is called to save the changes to the customer record. - A message is displayed to confirm that the customer details are successfully modified. In case of errors, appropriate error messages are displayed.
- Order history
- A store associate can view the order history of the customer in the Orders
panel of the Customer profile page.
The
getOrderList
API is called to get the list of orders for the current customer. If the order history has a long list of orders, it can be refined by using order date, order status, and order channel as the filter options. The store associate can also filter orders belonging to the current store only. Orders in 'Draft Order' and 'Canceled' statuses are not shown in order history.
- Filter orders
-
- When the store associate clicks the Filter option, the
getCommonCodeList
API is called (CodeType=ENTRY_TYPE
) to populate the entry type checkboxes. The order statuses are picked from a pre-defined list in the order-list-filter.config.ts file. This file is configurable, so you can customize the statuses as required. For more information about customizing order statuses under filter orders, see Adding custom order statuses to the filter criteria. - When the store associate selects the appropriate filter criteria and applies the filter, the
filter criteria is passed to the
getOrderList
API to retrieve orders that match the input criteria. Order status, date range, seller organization code, and a complex query with the appropriateEntryType
attribute is passed as input to thegetOrderList
API to retrieve orders. For Store, Online, and Call Center channels, theEntryType
isStore
,Online
, andCall Center
respectively.
- When the store associate clicks the Filter option, the
- Sort orders
- The store associate can sort orders under order history by using one of the following options:
- Oldest to newest
- Newest to oldest
By default, orders are sorted by the most recent first. The
getOrderList
API is called to sort the orders based on the sort option selected by user. If there is no order history to display, the Sort button is disabled.The options to sort orders are customizable. For more information about how you can customize the sort options, see Adding custom sort options to orders in the customer profile page.
Notes
The header in the Customer profile page displays a Notes button along with the count of notes associated with the customer profile. A store associate can click the button to view and manage the notes.
Each note has the note text, the user who added it (System or User), date when it was added, and a flag in case of important notes. The store associate can add new notes and mark them as important, if required.
When a store associate clicks the Notes button, the
getParticipantNoteList
API is called to display the notes that are already
associated with the customer's profile. When the store associate adds a note, the
manageCustomer
API is called to add a new note.