Skip to main content

Customer Management

This section documents the customer management capabilities of our Transportation Management System (TMS), focusing on how customers are created, updated, and integrated with our system.

Overview

Our TMS provides comprehensive customer management functionality that allows users to:

  1. Create and import customers from QuickBooks
  2. Manage customer hierarchies (Head Office and Distribution Centers)
  3. Configure company-specific customer settings

These capabilities ensure that all customer data is properly structured for efficient transportation management and EDI communication.

Customer Data Model

The customer functionality is implemented through several components:

  1. Core Models:

    • Customer: Main customer entity with basic information
    • CustomerByCompany: Links customers to specific companies with company-specific settings
    • CustomersByCompanyView: View for displaying consolidated customer information
  2. Support Components:

    • CustomerService: Service object for customer operations
    • CustomerHierarchyManagement: Concern for managing customer hierarchies
    • CustomerProcedures and CustomerByCompanyProcedures: Database procedure wrappers
  3. Database Tables and Procedures: The system uses the following tables and stored procedure to manage these complex relationships:

    • Hub.dbo.CUSTOMERS

    • Hub.dbo.CUSTOMERS_BY_COMPANY

    • Hub.dbo.vw_customers_by_company

    • Hub.dbo.pr_insert_update_company

    • Hub.dbo.pr_insert_update_customer_by_company

    • Hub.dbo.pr_get_customer

    • Hub.dbo.pr_get_customers_by_company

    • Hub.dbo.pr_get_customers_by_page

Customer Hierarchy

The system supports a hierarchical customer structure with different levels that is critical for proper EDI document routing and transportation management:

  1. Head Office (Hierarchy 1): Top-level customer representing the main company

    • Has self-referencing relationships (belongs_to_ho_id points to its own customer_id)
  2. Distribution Center (Hierarchy 2): Secondary location belonging to a head office

    • References its parent Head Office through belongs_to_ho_id
  3. Store Branch (Hierarchy 3): Store location belonging to a distribution center

  • References its parent Head Office through belongs_to_ho_id and its parent Distribution Center through belongs_to_dc_id

Hierarchy Assignment

While manually creating a new customer, users can assign the hierarchy of the customer.

While importing the customer information, the system can automatically detect related customers and assign corresponding hierarchies.

When determining hierarchy, the system looks for similar customers based on address matching.

Creating Distribution Centers

When a customer has different shipping and billing addresses, the system automatically creates distribution center.

QuickBooks Integration

Customers can be imported from QuickBooks and mapped to the TMS database.

For more detailed information on the QuickBooks integration, see the QuickBooks Integration documentation.

Web Interface Operations

The web portal provides a complete interface for customer management:

  1. Customer Listing:

    • View all customers with filtering and sorting options
    • Display customer hierarchy information
  2. Customer Creation/Editing:

    • Create new customers directly in the web interface
    • Edit existing customer information and settings
    • Update customer hierarchy relationships

Company-Specific Customer Settings

The system allows different settings for the same customer across different companies, which is essential for multi-company operations:

  1. CustomerByCompany Model:

    • Links a customer to a specific company
    • Stores company-specific settings for the customer
    • Enables different business rules per company for the same customer
  2. Settings Managed:

    • Payment terms and credit limits
    • Shipping preferences and warehouses
    • Document settings (invoices, packing slips)
    • Currency preferences
    • Tax handling rules

Customer Workflow

The complete customer management workflow in the TMS web portal includes:

This customer management functionality is tightly integrated with the EDI processes, enabling the TMS to handle the complete transportation lifecycle from customer setup through order processing, shipment tracking, and invoicing.