InsureBook User Guide

InsureBook is an address book desktop application built to help insurance agents manage and organize their client information more effectively. Its primary purpose is to streamline the day-to-day workflow of agents, allowing them to store, access, update and keep track of client data with ease.

By combining the speed of a Command Line Interface (CLI) with the familiarity of a Graphical User Interface (GUI), InsureBook is optimized for fast, efficient use. If you're a quick typist, you'll find that InsureBook lets you perform contact management tasks faster than traditional point-and-click apps — all while maintaining clarity and control over your client base.

As a result, with InsureBook, we're not just insuring policies—we're insuring smiles!

How to Use This Guide

This User Guide is designed to help you get the most out of InsureBook. Here's how to navigate it effectively:

  1. Quick Start (For New Users)

    • If you're new to InsureBook, start with the Quick Start section
    • This section provides step-by-step instructions to get you up and running quickly
  2. Commands (For All Users)

  3. Command Summary (For Quick Reference)

    • The Command Summary section provides a quick overview of all commands
    • Use this section as a quick reference when you're familiar with the commands
  4. Additional Resources


---

Understanding Callout Boxes

Throughout this guide, you'll encounter different types of callout boxes that provide important information:

Note Box 📝

Provides additional information or clarifications about a feature or command. Look for these when you need more details about how something works.

Tip Box 💡

Offers helpful tips and best practices. These can help you use InsureBook more effectively.

Warning Box ⚠️

Highlights important warnings or potential issues. Pay special attention to these to avoid problems.

Danger Box

Indicates critical warnings or irreversible actions. Always read these carefully before proceeding.


---

Table of Contents

  1. How to Use This Guide
  2. Understanding Callout Boxes
  3. Quick Start
  4. Commands
  5. FAQ
  6. Known Issues
  7. Command Summary

Quick start

  1. Ensure you have Java 17 or above installed in your Computer.
    Mac users: Ensure you have the precise JDK version prescribed here.

  2. Download the latest .jar file from here.

  3. Copy the file to the folder you want to use as the home folder for your InsureBook.

  4. Open a command terminal, cd into the folder you put the jar file in, and use the java -jar InsureBook.jar command to run the application.
    A GUI similar to the below should appear in a few seconds. Note how the app contains some sample data.
    Ui

  5. Type the command in the command box and press Enter to execute it. e.g. typing help and pressing Enter will open the help window.
    Some example commands you can try:

    • list : Lists all contacts.

    • add n/John Doe p/98765432 e/johnd@example.com a/John street, block 123, #01-01 pol/1234567 : Adds a contact named John Doe to the Address Book.

    • delete 3 : Deletes the 3rd contact shown in the current list.

    • clear : Deletes all contacts.

    • exit : Exits the app.

Warning: Data Corruption

If the data file is corrupted:

  • InsureBook will start with an empty address book
  • Your previous data will not be loaded

Refer to the Commands below for details of each command.


Commands

InsureBook provides you with several types of commands to manage your client information effectively:

Client Management Commands

Policy Management Commands

Search Commands

General Commands

A command consists of a command word and zero or more parameters.

Example: add n/John Doe p/98765432 e/johnd@example.com a/John street, block 123, #01-01 pol/123456

Note

  • For each command, the correct syntax is specified under "Format"
  • Command words are case-insensitive
  • Words in UPPER_CASE are the parameters to be supplied by the user
  • Items in [square brackets] are optional
  • Items with ​ after them can be used multiple times including zero times

Client Management Commands

Adding a person : add

Adds a person to the address book.

Format: add n/NAME p/PHONE_NUMBER e/EMAIL a/ADDRESS pol/POLICY_NUMBER [pt/POLICY_TYPE] [r/RENEWAL_DATE] [note/NOTE] [t/TAG]…​

Tip: A person can have any number of tags (including 0)

  • NAME: Names must only include alphanumeric characters and spaces.
  • PHONE_NUMBER: Phone numbers must follow the E.164 standard.
  • EMAIL: The email must be in the localpart@domainname format. The localpart should only contain alphanumeric characters and these special characters, excluding the parentheses, (+_.-). The local-part may not start or end with any special characters. The domain name must: end with a domain label at least 2 characters long, have each domain label start and end with alphanumeric characters, and have each domain label consist of alphanumeric characters, separated only by hyphens, if any.
  • ADDRESS: The address can be any string value, but it must not be blank.
  • POLICY_NUMBER: The policy number must consist only of digits, ensuring that it is numeric and non‑blank.
  • POLICY_TYPE: Only the following case‑insensitive policy types are allowed: Life, Health, Property, Vehicle, Travel.
  • RENEWAL_DATE: The date must follow the DD-MM-YYYY format.
  • NOTE: There are no specific restrictions for notes; any string is accepted as a valid note.
  • TAG: A valid tag name must be entirely alphanumeric.

Warning: Duplicate Entries

A person is considered a duplicate if they have:

  • The same policy number, OR
  • The same name and email, OR
  • The same name and phone number

If you attempt to add a person that matches any of these conditions:

  • An error message will be shown indicating which condition was matched
  • The person will not be added
  • You should verify the information and try again with unique details

Examples:

  • add n/John Doe p/98765432 e/johnd@example.com a/John street, block 123, #01-01 pol/12345678 pt/Life r/31-12-2025 note/Basketball Player
  • add n/Betsy Crowe t/friend pol/654321 pt/Health e/betsycrowe@example.com a/Newgate Prison p/1234567 t/criminal

Expected Output:

  • Before running the command: Before Renew

  • After running the command: After Renew

Warning: Duplicate Policy Numbers

Each policy number must be unique in the system. If you attempt to add a person with a policy number that already exists:

  • An error message will be shown
  • The person will not be added
  • You should verify the correct policy number and try again

Tip: Names such as X Æ A-Xii Musk is not valid unfortunately as it contains non-ASCII characters.

Editing a person : edit

Format: edit INDEX [n/NAME] [p/PHONE] [e/EMAIL] [a/ADDRESS] [pol/POLICY_NUMBER] [pt/POLICY_TYPE] [r/RENEWAL_DATE] [note/NOTE] [t/TAG]…​

  • Edits the person at the specified INDEX. The index refers to the index number shown in the displayed person list. The index must be a positive integer 1, 2, 3, …​
  • At least one of the optional fields must be provided.
  • Existing values will be updated to the input values.
  • When editing tags, the existing tags of the person will be removed i.e adding of tags is not cumulative.
  • You can remove all the person's tags by typing t/ without specifying any tags after it.

Warning: Duplicate Entries

A person is considered a duplicate if the edit would result in:

  • The same policy number as another person, OR
  • The same name and email as another person, OR
  • The same name and phone number as another person

If your edit would create any of these duplicate conditions:

  • An error message will be shown indicating which condition was matched
  • The edit will not be applied
  • You should modify your edit to ensure the result is unique

Examples:

  • edit 1 p/91234567 e/johndoe@example.com pt/Health r/31-12-2025
  • edit 2 n/Betsy Crower t/

Expected Output:

  • Before running the command: Before Edit

  • After running the command: Before Edit

Deleting a person : delete

Format: delete INDEX

  • Deletes the person at the specified INDEX.
  • The index refers to the index number shown in the displayed person list.
  • The index must be a positive integer 1, 2, 3, …​

Warning: Irreversible Action ⛔

  • The delete command permanently removes the client's data
  • This action cannot be undone
  • Make sure you have selected the correct index before deleting

Examples:

  • delete 2
  • find n/Betsy followed by delete 1

Expected Output:

  • Before running the command: Before Delete

  • After running the command: After Delete

Policy Management Commands

Updating a policy renewal date : renew

Format: renew pol/POLICY_NUMBER r/RENEWAL_DATE

Warning: Single Policy Renewal ⚠️

  • Only one policy can be renewed at a time
  • To renew multiple policies, use the command separately for each policy
  • The pol/POLICY_NUMBER parameter must be a valid policy number in the system.
  • The r/RENEWAL_DATE parameter must be in the format DD-MM-YYYY.

Examples:

  • renew pol/123456 r/01-01-2026

Expected Output:

  • Before running the renew command: Before Renew

  • After running renew pol/123456 r/01-01-2026: After Renew

Viewing upcoming policy renewals : viewrenewals

Format: viewrenewals [n/NEXT_N_DAYS] [s/SORT_ORDER]

Warning: Integer Days Only ⚠️

  • The NEXT_N_DAYS parameter must be a positive integer
  • Decimal numbers or negative values are not accepted
  • Example: Use n/30 for next 30 days, not n/30.5 or n/-30
  • The n/NEXT_N_DAYS parameter must be between 0 and 365.
  • The search results can be sorted using s/SORT_ORDER by name or by date only. The default sort order is by date if unspecified.

Note on Sorting Order for name:

The sorting order is case-sensitive and follows standard computer ordering rules. This means that:

  • Capital letters (A-Z) first
  • Then lowercase letters (a-z)

For example: Alice, Bernice, Zebra, alpha, echo, zulu

Examples:

  • viewrenewals
  • viewrenewals n/60
  • viewrenewals n/60 s/name

Expected Output:

  • Before running the viewrenewals command: Before View Renewals

  • After running viewrenewals n/200 s/name: After View Renewals

View policy renewals in date range : filter

Format: filter sd/START_DATE ed/END_DATE [s/SORT_ORDER]

Warning: Valid Date Range ⚠️

  • The END_DATE must be later than or equal to the START_DATE
  • Both dates must be in DD-MM-YYYY format
  • Example: sd/01-01-2024 ed/31-12-2024 is valid
  • Example: sd/31-12-2024 ed/01-01-2024 is invalid (end date before start date)
  • The sd/START_DATE parameter must be in the format DD-MM-YYYY.
  • The ed/END_DATE parameter must be in the format DD-MM-YYYY.
  • The search results will include policy renewals between the specified start date and end date.
  • The search results can be sorted using s/SORT_ORDER by name or by date only. The default sort order is by date if unspecified. Name sorting follows the same rules as mentioned in the viewrenewals command.

Examples:

  • filter sd/01-03-2025 ed/31-03-2025
  • filter sd/01-01-2025 ed/30-06-2025 s/name

Expected Output:

  • Before running the filter command: Before Filter

  • After running filter sd/01-06-2025 ed/01-01-2026: After Filter

Search Commands

Listing all persons : list

Shows a list of all persons in the address book.

Format: list

Each person card in the list displays:

  • Name
  • Phone number
  • Email address
  • Physical address
  • Policy number
  • Policy type (Life, Health, Property, Vehicle, or Travel)
  • Renewal date (displayed as "Renewal date: DD-MM-YYYY")
  • Tags (if any)

The policy type and renewal date are clearly labeled to help insurance agents quickly identify the types of policies and when they need to be renewed.

Locating persons by keyword : find

Searches given person fields by specific keyword and returns any matching entries Format: find [n/NAME]…​ [p/PHONE]…​ [e/EMAIL]…​ [a/ADDRESS]…​ [pol/POLICY_NUMBER]…​ [pt/POLICY_TYPE]…​ [t/TAG]…​ [s/SORT_ORDER]…​

  • At least one of the optional fields must be provided.
  • Each field may be provided more than once except SORT_ORDER.
  • The fields follow the same rules and constraints as detailed in the add command.
  • NAME and ADDRESS field may contain more than one word.
  • The search is case-insensitive. e.g hans will match Hans
  • The order of the values matter for a field but not for different fields. e.g. n/Hans Bo will not match Bo Hans but n/Hans n/Bo will match Bo Hans
  • Partial search for Name, Phone number, Email address, Physical address and Policy number is allowed
  • Exact search is required for Policy type and Tags
  • Partial words e.g. n/Han will match Hans
  • Partial numbers e.g. p/123 will match 91234567
  • Partial search for emails must be concatenated with @ followed by at least 2 characters e.g. e/ice@ex will match alice@example.com but alice@e will not match alice@example.com
  • Persons matching at least one field will be returned (i.e. OR search). e.g. n/Hans n/Bo will return Hans Gruber, Bo Yang
  • Tags are supported. You can add one or more tags using t/TAG. The search for tags is not case-sensitive and must be an exact word.
  • Policy types are supported. You can search for specific policy types using pt/POLICY_TYPE. Valid policy types are: Life, Health, Property, Vehicle, and Travel. The search is not case-sensitive.
  • The search results can be sorted using s/SORT_ORDER by name or by tag only. The default sort order is by name. Tag sorting sorts by entries with the most number of tags first. Name sorting follows the same rules as mentioned in the viewrenewals command.

Examples:

  • find n/olive
  • find n/Amy p/999
  • find n/alex n/david
  • find t/friends t/colleagues s/tag

Expected Output (Partial name searching example):

  • Before running the find command: Before Find Command Example 1

  • After running find n/olive: After Find Command Example 1

Expected Output (Tag searching example):

  • Before running the find command: Before Find Command Example 2

  • After running find t/friends t/colleagues s/tag: After Find Command Example 2

General Commands

Viewing help : help

Shows a message explaining how to access the help page.

Format: help

Expected output after running help : Help

Clearing all entries : clear

Format: clear

Warning: Irreversible Action ⛔

  • The clear command permanently removes ALL client data
  • This action CANNOT be undone
  • Double-check that you really want to delete everything

Expected output after running clear: Clear

Exiting the program : exit

Format: exit

Expected output after running exit: InsureBook closes.

FAQ

Q: How do I add a new person to the address book?

A: Use the add command. For example, add n/John Doe p/98765432 e/johnd@example.com a/John street, block 123, #01-01 pol/123456 pt/Life r/31-12-2024 note/Basketball Player.

Q: How do I edit a person's information?

A: Use the edit command. For example, edit 1 p/91234567 e/johndoe@example.com pt/Health r/31-12-2024.

Q: How do I delete a person from the address book?

A: Use the delete command. For example, delete 1.

Q: How do I clear all entries from the address book?

A: Use the clear command. For example, clear.

Q: How do I exit the program?

A: Use the exit command. For example, exit.

Q: How do I update a policy renewal date?

A: Use the renew command. For example, renew pol/123456 r/31-12-2025.

Q: How do I view upcoming policy renewals?

A: Use the viewrenewals command. For example, viewrenewals n/60.

Q: How do I filter policy renewals in a date range?

A: Use the filter command. For example, filter sd/01-03-2025 ed/31-03-2025.

Known Issues

I: I'm unable to add a new person to the address book.

A: Ensure that all fields are filled out correctly and that the phone number, email, and policy number are in the correct format.

I: I'm unable to edit a person's information.

A: Ensure that the index is correct and that all fields are filled out correctly.

I: I'm unable to delete a person from the address book.

A: Ensure that the index is correct and that the index exists in the address book.

I: I'm unable to clear all entries from the address book.

A: Ensure that you have the correct permissions to clear the address book.

I: I'm unable to exit the program.

A: Ensure that you have saved all changes before exiting the program.

I: I'm unable to update a policy renewal date.

A: Ensure that the policy number is correct and that the renewal date is in the correct format.

I: I'm unable to view upcoming policy renewals.

A: Ensure that the program is up to date and that there are no issues with the data file.

I: I'm unable to filter policy renewals in a date range.

A: Ensure that the start and end dates are in the correct format and that the data file is up to date.

Command Summary

Client Management Commands

Command Format
add add n/NAME p/PHONE_NUMBER e/EMAIL a/ADDRESS pol/POLICY_NUMBER [pt/POLICY_TYPE] [r/RENEWAL_DATE] [note/NOTE] [t/TAG]…​
edit edit INDEX [n/NAME] [p/PHONE] [e/EMAIL] [a/ADDRESS] [pol/POLICY_NUMBER] [pt/POLICY_TYPE] [r/RENEWAL_DATE] [note/NOTE] [t/TAG]…​
delete delete INDEX

Policy Management Commands

Command Format
renew renew pol/POLICY_NUMBER r/RENEWAL_DATE
viewrenewals viewrenewals [n/NEXT_N_DAYS] [s/SORT_ORDER]
filter filter sd/START_DATE ed/END_DATE [s/SORT_ORDER]

Search Commands

Command Format
list list
find find [n/NAME]…​ [p/PHONE]…​ [e/EMAIL]…​ [a/ADDRESS]…​ [pol/POLICY_NUMBER]…​ [pt/POLICY_TYPE]…​ [t/TAG]…​ [s/SORT_ORDER]…​

General Commands

Command Format
help help
clear clear
exit exit

Glossary

Term Meaning
Agent Refers to the insurance agent who uses InsureBook to manage and organize client information.
Client Refers to an individual’s entry in InsureBook, containing contact information (name, phone, email, address) and at least one insurance policy.
InsureBook A desktop application (with both a CLI and GUI) that helps insurance agents manage and organize client information.
CLI (Command Line Interface) A text-based interface where users type commands to interact with the application.
GUI (Graphical User Interface) A visual interface that displays buttons, text fields, and other elements, providing a more familiar point-and-click experience.
Policy An insurance policy associated with the client. The policy number is a unique numeric identifier (e.g., “123456”).
Policy Type Category of an insurance policy. Valid options include Life, Health, Property, Vehicle, or Travel.
Renewal Date The date (DD‑MM‑YYYY) on which the policy is due to be renewed. Used by commands like renew, viewrenewals, and filter.
Tag A label that can be attached to a client for categorization or quick reference (e.g., “friend,” “colleague,” “VIP”).
Command Word The keyword used to invoke a specific operation in InsureBook (e.g., add, edit, delete, find).
Parameter Additional information following a command word, usually prefixed with a letter and slash (e.g., n/NAME, p/PHONE_NUMBER).
Index The number shown beside a client’s entry in the displayed list. Used to identify which client to edit or delete.
Duplicate Entries If you try to add or edit a client so that it shares a policy number or certain combination of name/phone/email with an existing client, InsureBook treats it as a duplicate and blocks the action.
Sort Order Some commands (like viewrenewals and find) let you sort results by name or tag.
Data File The file (often named addressbook.json) where InsureBook stores all client data.