Customer Index Importer Service
Overview
In order to design the CRM demo app, there is a need to integrate a full text search which can make the demo app more complete as searching in any application is an expected feature. To accomplish it, Adam and Jack have decided to design the CustomerIndexImporter Service. It is connected to Meili search which manages searchable records of customers. Furthermore the service has an integration with the Customer service which stores all the details of a customer.
Here is an overview of the service :
Introduction
This document describes the CustomerIndexImporter Service and the required artefacts that must be designed for the service. This service establishes a connection between meilisearch (which is responsible for searching a customer detail in the UI) and customer service (which stores all of the details of a customer). As you read through this document, you will discover the different artefacts that have been designed for this service.
What is the scope of the CustomerIndexImporter Service
This service maintains a comprehensive set of customer information and handles the customer information and to enrich the search for the customer.
Here is an overview of the service that has been created for the Customer Index Importer Service :
By taking the reference from the above, Adam and Jack have designed and built the service in the tool. The service contains different information CustomerIndex as Domain namespace and Customer as an Integration namespace. Since Julia is an experienced Java Spring Boot Developer, the service was built as a Java Spring Boot Low-Code.
Designing of Customer Index Importer Service
The designing of the service has been classified into the following namespaces:
Domain Namespace
The Customer Index Importer Service has the domain namespace CustomerIndex. This domain namespace contain business events as CustomerLifecycleEvent and CustomerUpdateEvent which define that something has happened during the execution of business logic.
Business Event
In Customer Index Importer Service the CustomerLifecycleEvent is used for the creation or a status change of a customer and the CustomerUpdateEvent is used for updating the customer data. The payload for both events contains the customerId, which is an important information for the agents.
Agents
The two designed agents CustomerLifecycleEventAgent and CustomerUpdateEventAgent listen to the events designed in the domain namespace. The agents get triggered once the event is sent by the customer service. The agents use the property customerId of the event's payload to fetch the data from the customer service via the integration namespace. Then they transform the output for the full text search and send it to the meilisearch.
Integration Namespace
After designing the domain namespace, Adam and Jack have decided to design the integration Namespace. It has Customer as a namespace which is responsible for fetching the customer details.
You have successfully covered important artefacts about the CustomerIndexImporter Service.