C&F (Carrying & Forwarding) Level Integration
Author(s)
- Sanket Mal
- Dipak Moury
- Bishwanath Jana
Last Updated Date
[2025-07-07]
SRS References
Version History
| Version | Date | Changes | Author |
|---|---|---|---|
| 1.0 | 2025-07-07 | Initial draft | Bishwanath Jana |
| ... | ... | ... | ... |
Feature Overview
Objective:
Add a new C&F level between Manufacturer and Distributor in the B2B hierarchy, and update the warranty claim and order processing logic to handle parent reassignment scenarios and claim routing flows correctly.
Scope:
- Update hierarchy to: Manufacturer → C&F → Distributor → Dealer.
- Allow Distributors to be assigned under Manufacturer or C&F, and Dealers under Manufacturer, C&F, or Distributor.
- Implement dealer management APIs with parent consumer ID replacement for distributor ID.
- Order Continuity Management: When parent consumer is changed for a dealer or distributor:
- Existing in-progress orders continue under the previous parent consumer without disruption
- New orders created after the change are handled under the new parent consumer
- Support role management with parent consumer structure and component suggestions.
Dependencies:
- User and role management module.
- Warranty claim processing service.
- Order management system.
Requirements
- Hierarchy Management: Add C&F level between Manufacturer and other entities in the business hierarchy
- Flexible Parent Assignment: Allow entities to be assigned under multiple possible parents:
- Dealers can be under: Manufacturer, C&F, or Distributor
- Distributors can be under: Manufacturer or C&F
- C&F can be under: Manufacturer
- Dynamic Parent Reassignment: Support changing parent relationships while maintaining business continuity
- Warranty Claim Routing: Implement hierarchical warranty claim flow based on current parent relationships
- Order Continuity: Ensure ongoing orders continue processing with original seller even after parent reassignment
- Audit Trail: Maintain history of parent relationship changes for tracking and compliance
- Role-based Access Control: Update permissions based on new hierarchy levels
- Data Migration: Migrate existing relationships to accommodate new C&F level
Design Specifications
(Provide detailed design specifications, including UI/UX designs, API interfaces, and any other relevant architectural details.)
-
UI/UX Design:
- Update hierarchy selection dropdowns to include C&F level
- Create C&F management dashboard
- Modify entity assignment interfaces to show new parent options
- Add visual hierarchy tree view showing all levels
-
Data Models:
- Update entity relationship models to support flexible parent assignments
- Add C&F entity type and related permissions
- Modify warranty claim models to support multi-level routing
- Add order-seller relationship tracking for continuity
public enum DealershipType
{
None = 0,
Dealer = 1,
SubDealer = 2,
Distributor = 3,
CNF = 4
}
public enum AccessType
{
Owner = 1,
Dealer = 2,
Customer = 4,
Distributor = 8,
CNF = 16
}
public record DealerMaster
{
public Guid DealerId { get; set; }
public string DealerCode { get; set; }
public string DealerName { get; set; }
[Phone]
public string PhoneNumber { get; set; }
[Phone]
public string? WhatsappNumber { get; set; }
[EmailAddress]
public string EmailId { get; set; }
public string GSTNumber { get; set; }
public string PanNumber { get; set; }
public string? WebsiteUrl { get; set; }
public string? FBPageUrl { get; set; }
public string? InstagramPage { get; set; }
public DealershipStatus Status { get; set; }
public DealershipType DealershipType { get; set; }
public DealershipBrandType DealershipBrandType { get; set; }
// public Guid? DistributorId { get; set; } // Remove
public Guid? ParentConsumerId { get; set; } // newly added for parent consumer id
[System.Text.Json.Serialization.JsonIgnoreAttribute]
//public string? DistributorName { get; set; } // Remove
public string? ParentConsumerName { get; set; } // newly Added
public List<DealershipLocation> Locations { get; set; } = new List<DealershipLocation>();
public List<FileInformation> Files { get; set; } = [];
[System.Text.Json.Serialization.JsonIgnoreAttribute]
public int TotalNumber { get; set; }
public decimal CreditLimit { get; set; } = 0;
public decimal AvailableCreditLimit { get; set; } = 0;
public bool IsAgreementDone { get; set; }
public bool IsBranding { get; set; }
public bool SecurityDepositStatus { get; set; }
public DateTime? SecurityDepositDate { get; set; }
public decimal SecurityDepositAmount { get; set; }
public List<string> ListOfUser { get; set; } = new List<string> ();
} -
Third-Party Integrations:
(List any third-party services or tools that need to be integrated.) -
Workflow:
Dealer Management Workflow:
- Admin creates new dealer with parent consumer assignment
- System auto-generates default role for dealer
- Dealer information can be updated including parent consumer changes
- System maintains dealer hierarchy relationships
Role Management Workflow:
- System replaces distributor ID with parent consumer ID in role queries
- Role filtering works with new parent consumer structure
- Component suggestions provided based on dealer context
-
API Interfaces:
(Define the APIs required for this feature, including endpoints, methods, request/response formats.)Endpoint Method Parameters Response Response Status Codes /api/v1/dealer/addPOSTname(required, string): Dealer nameemail(required, string): Dealer emailphone(optional, string): Phone numberparentConsumerId(required, integer): Parent consumer IDDealer(Entity)201,400,500/api/v1/dealer/updatePUTdealerId(required, integer): Dealer IDname(optional, string): Dealer nameemail(optional, string): Dealer emailparentConsumerId(optional, integer): Parent consumer IDDealer(Entity)200,400,404,500/api/v1/dealer/getAllGETpage(optional, integer): Page numbersize(optional, integer): Page sizeparentConsumerId(optional, integer): Filter by parent consumer IDList of Dealer200,204,500/api/v1/allroleGETentityType(optional, string): Filter by entity typeparentConsumerId(optional, integer): Filter by parent consumer IDList of Role200,204,500/api/v1/component/suggestionsGETdealerId(required, integer): Dealer IDcategory(optional, string): Component categoryList of Component200,204,500 -
Third-Party Integrations:
(List any third-party services or tools that need to be integrated.) -
Workflow:
(Describe the end-to-end workflow of the feature, detailing how different components interact, including the sequence of events, data flow, and the user journey.)
Development Tasks & Estimates
(Break down the development process into smaller tasks and provide time estimates for each.)
| No | Task Name | Estimate (Hours) | Dependencies | Notes |
|---|---|---|---|---|
| 1 | Dealer Add API Development | 4 hours | Database schema | Create dealer with default role assignment |
| 2 | Dealer Add API Testing | 2 hours | Dealer Add API | Unit and integration tests |
| 3 | Dealer Update API Development | 1.5 hours | Dealer Add API | Update dealer information and relationships |
| 4 | Dealer Update API Testing | 1.5 hours | Dealer Update API | Unit and integration tests |
| 5 | Paginated Get Dealer API Development | 2 hours | Database schema | /dealer/getAll with pagination and filtering |
| 6 | Paginated Get Dealer API Testing | 2 hours | Get Dealer API | Unit and integration tests |
| 7 | Get All Role API Development | 1.5 hours | User management system | Replace distributor ID with parent consumer ID |
| 8 | Get All Role API Testing | 1.5 hours | Get All Role API | Unit and integration tests |
| 9 | Get Component Suggestion API | 3.5 hours | Component service | Suggest components based on dealer context |
| 10 | Get Component Suggestion Testing | 1.5 hours | Component Suggestion API | Unit and integration tests |
| 11 | Full Integration Testing | 8 hours | All above tasks | Comprehensive end-to-end integration testing |
| 12 | Total | 26.5 hours | All dependencies | Approximately 1 week for development |
Testing & Quality Assurance
(Outline the testing strategy and quality assurance measures for the feature.)
-
Unit Tests:
- Hierarchy assignment validation tests
- Order continuity preservation tests
- Parent reassignment business rule tests
-
Integration Tests:
(Describe how integration testing will be conducted.) -
Acceptance Criteria:
(Define the criteria that must be met for the feature to be considered complete.) -
Testing Tools:
(List any tools that will be used for testing.)
Deployment Considerations
(Describe any deployment considerations, including environment configurations, feature toggles, or migration steps.)
-
Configuration Changes:
(Detail any configuration changes required for this feature.) -
Rollout Plan:
(Outline the plan for rolling out the feature, including any phased releases.)
Risks & Mitigations
(Identify potential risks and the strategies to mitigate them.)
| Risk | Impact | Likelihood | Mitigation Strategy |
|---|---|---|---|
| Risk 1 | High | Medium | Strategy for mitigating Risk 1 |
| Risk 2 | Medium | High | Strategy for mitigating Risk 2 |
| ... | ... | ... | ... |
Review & Approval
(Include a section for review and approval by stakeholders.)
-
Reviewer:
Abhishak Kumar Roy -
Approval Date:
2025-07-03
Notes
(Add any additional notes or considerations related to the feature development here.)