Situation:
I have a Spring Boot application that stores Project Entities with associated Announcement Entities. This Announcement Entities have 1 to N Contact Entities.
The Contact table has fields like: first name, last name, e-mail, mobile, and so on.
If we create a project and an announcement, we must specify at least one contact. Previously, the contact was created in the database using text input fields.
Now it is a requirement to get the contact data from our CRM system. At the same time, it should also be possible to trace which contact is assigned to which Project in the CRM System.
Problem:
Unfortunately, I don't have much experience with software architecture. Whatever my supervisor wants me to work out a solution for this. I would be very grateful if you could help me a little and give me a direction to go.
My idea:
At first, This bidirectional relation between the CRM System and my service sounds redundant to me. I would suggest to fetch the contact data from an CRM Endpoint by company name (a company can create a project) and provide the found contacts as dropdown or autocomplete textfield. If a contact not exist, a new contact will be created about another CRM Endpoint. Next, I would persist the project-announcement-contact relationship in my service. In the CRM system I would only create a new contact if needed. For the CRM system I would create an endpoint that returns projects/announcements by contacts. this is a bit weird, but that's how I understand the requirement.
Second Problem:
What if a contact changes in the CRM system. I have to reflect that somehow in my service. Should i use event driven design here and a message broker?
I would be very grateful if someone with experience could give me some hints and tips.
Aucun commentaire:
Enregistrer un commentaire