Client grouping

icon picker
Client group rules

Here’s the enhanced version of the client group rules section with additional logic and limits to avoid conflicts between groups:

Overview:

This document outlines the implementation of the feature allowing Superadmin and Admin to add rules to client groups within Agency Handy. These rules enable more granular client management based on properties like categories and locations. Once created, the rules automatically group current clients and will continue to add new clients to the appropriate group if they meet the specified rules.

User Stories:

Client Group Rule Creation:
As a Superadmin/Admin, I want to create and apply rules to client groups based on client properties, such as location and category, so I can better manage groupings and streamline client segmentation.
Rule Logic:
As a Superadmin/Admin, I want the flexibility to use "AND" and "OR" logic to create more complex rules for assigning clients to groups.

Functional Requirements:

Client Group Prerequisite:
A Client Group must exist before applying rules. Superadmin/Admin can create groups manually.
Each group may include one or more clients that meet the selected rules (based on properties like location or category).
Rule Logic Interface:
The interface allows Superadmin/Admin to select a client group and define rules by choosing properties:
Client Category: Choose from a list of pre-existing categories.
Client Location: Select from a dropdown list of available countries.
Rule Logic:
Users can apply AND/OR logic between multiple rules, allowing for greater control over client grouping.
Rule Application Process:
Step 1: Select the client group from a dropdown of existing groups.
Step 2: Choose a property (Client Category or Client Location).
Step 3: Select a value (e.g., a specific country or category).
Step 4: Use AND/OR to combine rules and add additional criteria as needed.
Rule implementation:
Once a rule is saved it apply to the existing client list
This rule will apply for new added clients as well
Multiple Rule Support and Limits:
Multiple rules may be applied to a single group using AND/OR logic.
The system prevents conflicting rules between groups by requiring rules in each group to be unique.
Example: If Group A is defined by "Client Category = Retail AND Location = USA," Group B cannot be created with the exact same rule set.
Rule Exclusivity Check:
The system will automatically validate rules and prevent overlapping criteria across groups to ensure clients are not simultaneously added to multiple groups with the same rules.
If conflicting rules are detected, the user will be prompted to modify the rules before saving.
Rule Management:
Superadmin/Admin can edit, delete, or add new rules to existing groups as needed.
A client can only belong to one group if the same criteria apply to multiple groups.

Acceptance Criteria:

Client Group Rule Creation:
The Superadmin/Admin can create rules for client groups based on location and category properties.
A rule validation system will prevent conflicting or duplicate rules across multiple groups.
Property Selection and Validation:
Admin can select a Client Category and/or Location for grouping.
The system will ensure that no two groups can have the same combination of properties.
Multiple Rule Logic:
The system supports combining rules with AND/OR logic to refine the client selection within a group.
Unique Rule Enforcement:
The system will flag any rule conflicts between groups and prompt Admins to resolve them before saving.
Rule Management:
Admins can edit or remove existing rules as required, with any changes immediately reflected in client groupings.

FAQ:

What happens if a client qualifies for two groups with similar rules?
The system ensures that no two groups have identical rules. If similar rules are created, the system will prompt the Admin to modify them to ensure exclusivity.
Can a client be moved between groups without manual intervention?
Yes, clients will be automatically grouped based on the rules set. If the rules change, clients may move to different groups accordingly.
Can a service be in more than one group?
A service can only belong to one group at a time. To move a service, the Admin must remove it from the current group and add it to another.
If a client matches two separate group rules send the client to the first match group

Example

Rule Example:

Add a client to Client Group 1 if:
Country is USA OR
Category is Category 1 AND
Company Name is ABC OR
ZIP is 20000 And
state Dhaka or
type paid

Breaking Down the Logic:

The conditions here involve both OR and AND logic, which must be applied carefully. Let's break down the conditions to understand how they work in practice:
A client will be added to Client Group 1 if any one of the following is true:
The client's Country is USA, OR
The client’s Category is Category 1 AND their Company Name is ABC. OR
The client’s ZIP code is 20000.
This is a mix of OR and AND conditions. The rules can be interpreted in parentheses like this:

How the System Would Process This:

The system evaluates each condition step by step:
First, it checks if Country is USA. If true, the client is added.
If not, it checks the combination of Category and Company Name together. If both are true, the client is added.
Lastly, if those aren’t true, it checks if ZIP is 20000. If true, the client is added.
In summary, the rule adds clients to Client Group 1 if any of the OR conditions are true, while ensuring that the AND logic between conditions is correctly applied.

Example 1:

Client 1:
Country: USA
Category: Category 2
Company Name: DEF
ZIP: 30000
Result:
This client will be added to Client Group 1 because the country is USA. The rest of the conditions don't matter since one of the OR conditions is already true.

Example 2:

Client 2:
Country: Canada
Category: Category 1
Company Name: ABC
ZIP: 10000
Result:
This client will be added to Client Group 1 because both Category is Category 1 and Company Name is ABC are true (satisfying the AND condition).

Example 3:

Client 3:
Country: UK
Category: Category 1
Company Name: XYZ
ZIP: 20000
Result:
This client will be added to Client Group 1 because the ZIP is 20000, which satisfies one of the OR conditions.

Example 4:

Client 4:
Country: Canada
Category: Category 2
Company Name: ABC
ZIP: 10000
Result:
This client will not be added to Client Group 1 because none of the conditions are met:
The country is not USA,
The category is not Category 1 with Company Name ABC,
The ZIP is not 20000.

How the System Would Process This:

The system evaluates each condition step by step:
First, it checks if Country is USA. If true, the client is added.
If not, it checks the combination of Category and Company Name together. If both are true, the client is added.
Lastly, if those aren’t true, it checks if ZIP is 20000. If true, the client is added.
In summary, the rule adds clients to Client Group 1 if any of the OR conditions are true, while ensuring that the AND logic between conditions is correctly applied.
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.