Clients

Client and team member logic

Product Requirements Document (PRD): Comprehensive Email Role Validation Across Clients, Team Members, and Leads

Objective

Ensure distinct roles by validating email addresses during client, team member, and lead creation to prevent duplicate roles for the same email.

Functional Requirements

1. Validation during Client Creation

Scenario: While creating a client using the "Create Client" form:
Validation: If the entered email belongs to an existing team member or lead, prevent client creation.
Error Message:
"You can’t add a team member or lead as a client."

2. Validation during Service Purchase (Catalog)

Scenario: When an email associated with a team member or lead attempts to purchase a service via the catalog:
Validation: Check if the provided email matches a team member or lead's email.
Error Message:
"You can’t add a team member or lead as a client. Please provide another email."

3. Validation during Team Member Creation

Scenario: While creating a team member using the "Add Team Member" form:
Validation: If the entered email belongs to an existing client or lead, prevent team member creation.
Error Message:
"This email is already associated with a client or lead. You can’t add it as a team member."

4. Validation during Lead Creation

Scenario: While creating a lead using the "Add Lead" form:
Validation: If the entered email belongs to an existing client or team member, prevent lead creation.
Error Message:
"This email is already associated with a client or team member. You can’t add it as a lead."

5. Validation during Team Member Creation for Existing Leads

Scenario: While creating a team member using the "Add Team Member" form:
Validation: If the entered email belongs to an existing lead, prevent team member creation.
Error Message:
"This email is already associated with a lead. You can’t add it as a team member."

6. Restrict Service Purchase for Logged-In Team Members

Scenario: Logged-in team members should not have the option to purchase services.
Behavior:
Remove the Service Purchase button for logged-in team members.

Acceptance Criteria

Client Creation Form Validation:
If a team member or lead’s email is entered, the system prevents client creation and displays the error message:
"You can’t add a team member or lead as a client."
Catalog Validation:
If a team member or lead’s email is used for service purchase, the system displays the error message:
"You can’t add a team member or lead as a client. Please provide another email."
Team Member Creation Form Validation:
If a client or lead’s email is entered, the system prevents team member creation and displays the error message:
"This email is already associated with a client or lead. You can’t add it as a team member."
Lead Creation Form Validation:
If a client or team member’s email is entered, the system prevents lead creation and displays the error message:
"This email is already associated with a client or team member. You can’t add it as a lead."
Team Member Creation Validation for Leads:
If an email associated with an existing lead is entered, the system prevents team member creation and displays the error message:
"This email is already associated with a lead. You can’t add it as a team member."
Service Purchase Restriction:
Logged-in team members do not see the Service Purchase button.


Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.