PROJECT: CRM Book


Overview

CRM Book is a desktop application targeted for salespeople. The user interacts with it using a CLI, and it has a GUI created with JavaFX. It is written in Java, and has about 10 kLoC. This application allows salespeople to organize their Leads, Contacts, and Accounts that suits their liking, as well as address problems that symptomatic in the sales industry, such as identifying duplicates.

Summary of contributions

  • Major enhancement: Added the ability to import a CSV file

    • What it does: When the user has a CSV file of Leads, he can directly import the file without adding the Leads one by one.

    • Justification: This feature improves the product significantly because a user can add a large number of persons into the CRM Book at the same time without typing so many add command

    • Credits: An open source library called Apache Commons CSV is used to process CSV files.

  • Minor enhancement: Added a remark command that allows the user to add/remove/edit the remark of a person.

  • Minor enhancement: Added a sort command that allows the user to sort all persons in the list by name alphabetically.

  • Code contributed: [Functional code] [Test code]

  • Other contributions:

    • Community:

      • Reported bugs and suggestions for other teams in class.

Contributions to the User Guide

Given below are sections I contributed to the User Guide. They showcase my ability to write documentation targeting end-users.

Add or remove a remark to a Lead or Contact: rem, remark

Adds or removes a remark to a particular Lead or Contact.
Format to add remark: rem [INDEX] r/[KEYWORD], remark [INDEX] r/[KEYWORD] Examples:

  • rem 1 r/Happy
    Adds the remark 'Happy' to the 1st Lead or Contact.

  • remark 4 r/
    Removes the remark of the 4th Lead or Contact.

Sort persons by name in alphabetical order: st, sort

Sorts all persons in CRM Book by name.
Format: st, sort

Importing a CSV file: i, import

When you have a CSV file of Leads, you can directly import the file to the CRM Book without adding them one by one.
Format: i PATH, import PATH

  • The path refers to the path of the file that the user wants to import.

  • The path must be a valid file path.

  • The columns in the CSV file should be name, phone, email, address respectively. The order has to be followed restrictively to guarantee the success of import.

Examples:

  • import ./sample.csv
    Imports the file sample.csv to the CRM Book

Contributions to the Developer Guide

Given below are sections I contributed to the Developer Guide. They showcase my ability to write technical documentation and the technical depth of my contributions to the project.

Remark feature

Current Implementation

To record more detailed information of a person, a new command RemarkCommand is implemented.

The RemarkCommand inherits from UndoableCommands since it is reasonable to make remark command execute in an undoable way.

RemarkCommand which is undoable is implemented this way:

public class RemarkCommand extends UndoableCommand {
    @Override
    public CommandResult executeUndoableCommand() {
        // ... remark logic ...
    }
}

The following diagram shows the inheritance diagram for RemarkCommand.

RemarkCommandDiagram

The model Person is modified to have a new field Remark.

The default value of the remark field of a person is an empty string. A user is not able to assign a remark to a person when adding the person. Therefore, all people in the CRM Book is originally without any remark by default.

The implementation of this command is much like the EditCommand. For example, when a user type remark 2 r\Likes to swim. Then the remark field of the 2nd person in the current list will be changed to Likes to swim. It’s similar to editing a person’s phone number or address.

The sequence diagram is shown below:

RemarkCommandSequenceDiagram

Design Considerations

Aspect: Implementation of RemarkCommand
  • Alternative 1 (current choice): Add a new remark command

    • Pros: Treat it as a command may be easy to understand. Only a few people needs a remark.

    • Cons: Cannot add a person with remark.

  • Alternative 2: Just make it a part of EditCommand and AddCommand

    • Pros: Only need to add remark field to every related class. We can add a person with remark.

    • Cons: We may have to type too many things when adding a person. Also, some people don’t have any remark.

Bulk Import Feature

Current Implementation

To add a large number of persons to the CRM Book at the same time, a new command ImportCommand is implemented.

The ImportCommand inherits from Command. It is implemented this way:

public class ImportCommand extends Command {
    @Override
    public CommandResult execute() {
        // … import logic …
    }
}

When an ImportCommand is called, the corresponding CSV file will be processed. Then persons will be added to CRM Book automatically like what a AddCommand can do but without manual typing.

The sequence diagram is shown below:

ImportCommandSequenceDiagram

Design Considerations

Aspect: CSV file format
  • Alternative 1 (current choice): Requires the CSV file to follow the given format

    • Pros: Easy to implement. No need to analyze too much about the file.

    • Cons: More work for users.

  • Alternative 2: Allow attributes not in order and allow different names for attributes

    • Pros: Hard to detect and implement.

    • Cons: More flexible to users. Can help users save time.