Skip to main content
Version: Fleeto

C&F (Carrying & Forwarding) Level Integration

Author(s)

  • Sanket Mal
  • Dipak Moury
  • Bishwanath Jana

Last Updated Date

[2025-07-07]


SRS References


Version History

VersionDateChangesAuthor
1.02025-07-07Initial draftBishwanath 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

  1. Hierarchy Management: Add C&F level between Manufacturer and other entities in the business hierarchy
  2. 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
  3. Dynamic Parent Reassignment: Support changing parent relationships while maintaining business continuity
  4. Warranty Claim Routing: Implement hierarchical warranty claim flow based on current parent relationships
  5. Order Continuity: Ensure ongoing orders continue processing with original seller even after parent reassignment
  6. Audit Trail: Maintain history of parent relationship changes for tracking and compliance
  7. Role-based Access Control: Update permissions based on new hierarchy levels
  8. 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:

    1. Admin creates new dealer with parent consumer assignment
    2. System auto-generates default role for dealer
    3. Dealer information can be updated including parent consumer changes
    4. System maintains dealer hierarchy relationships

    Role Management Workflow:

    1. System replaces distributor ID with parent consumer ID in role queries
    2. Role filtering works with new parent consumer structure
    3. Component suggestions provided based on dealer context

  • API Interfaces:
    (Define the APIs required for this feature, including endpoints, methods, request/response formats.)

    EndpointMethodParametersResponseResponse Status Codes
    /api/v1/dealer/addPOSTname (required, string): Dealer name
    email (required, string): Dealer email
    phone (optional, string): Phone number
    parentConsumerId (required, integer): Parent consumer ID
    Dealer (Entity)201, 400, 500
    /api/v1/dealer/updatePUTdealerId (required, integer): Dealer ID
    name (optional, string): Dealer name
    email (optional, string): Dealer email
    parentConsumerId (optional, integer): Parent consumer ID
    Dealer (Entity)200, 400, 404, 500
    /api/v1/dealer/getAllGETpage (optional, integer): Page number
    size (optional, integer): Page size
    parentConsumerId (optional, integer): Filter by parent consumer ID
    List of Dealer200, 204, 500
    /api/v1/allroleGETentityType (optional, string): Filter by entity type
    parentConsumerId (optional, integer): Filter by parent consumer ID
    List of Role200, 204, 500
    /api/v1/component/suggestionsGETdealerId (required, integer): Dealer ID
    category (optional, string): Component category
    List 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.)

NoTask NameEstimate (Hours)DependenciesNotes
1Dealer Add API Development4 hoursDatabase schemaCreate dealer with default role assignment
2Dealer Add API Testing2 hoursDealer Add APIUnit and integration tests
3Dealer Update API Development1.5 hoursDealer Add APIUpdate dealer information and relationships
4Dealer Update API Testing1.5 hoursDealer Update APIUnit and integration tests
5Paginated Get Dealer API Development2 hoursDatabase schema/dealer/getAll with pagination and filtering
6Paginated Get Dealer API Testing2 hoursGet Dealer APIUnit and integration tests
7Get All Role API Development1.5 hoursUser management systemReplace distributor ID with parent consumer ID
8Get All Role API Testing1.5 hoursGet All Role APIUnit and integration tests
9Get Component Suggestion API3.5 hoursComponent serviceSuggest components based on dealer context
10Get Component Suggestion Testing1.5 hoursComponent Suggestion APIUnit and integration tests
11Full Integration Testing8 hoursAll above tasksComprehensive end-to-end integration testing
12Total26.5 hoursAll dependenciesApproximately 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.)

RiskImpactLikelihoodMitigation Strategy
Risk 1HighMediumStrategy for mitigating Risk 1
Risk 2MediumHighStrategy 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.)