1.1 – Form to Service Module Transition:

  • You have created a form in the add-lead module.
  • Create a new service named “lead-processing”.
  • If the service name is already taken, append a number (e.g., “lead-processing-1” or “lead-processing-2”).
  • Transfer your form to one of the modules in this service.
  • Call this service in your app->module.

1.2 – Submission Module:

  • Add a submission module within the same service, using a different module name.
  • Use the session ticket to submit the form.
  • When using a session ticket, configure the submission module from the service into the ticket and perform the insertion/updation of the lead.

1.3 Notification Email Trigger:

  • In the submission module, add another template to notify the lead’s email with the lead details.
  • Include your email as a CC recipient in the notification email.

1.4 Update the lead:

  • To enable lead editing functionality, a link should be provided from the “manage-lead” page.
  • The link format possibly be: https://test.wordpoets.com/lead-processing/edit-lead/{object_id of lead}”.
  • In your app, create a new module named “edit-lead” to handle lead editing functionalities.
  • This module will utilize a service called the “add-lead” form to display lead information.
  • Utilize database (DB) services to retrieve the details of the lead using its object ID.
  • Populate the lead editing form with the fetched values, placing each value in its corresponding form control (e.g., first name in the “first_name” form control).
  • Implement an “update” button within the editing form.
  • When the “update” button is clicked, the lead information will be updated.
  • It’s essential to ensure that this update operation modifies the existing lead with the edited data and does not create a new lead.

By following these steps, you’ll create a “Lead Processing” service with the necessary functionality to add and manage leads, store lead information in the database, and send notification emails.