Customers
The Customers module in Flux CRM is responsible for managing customer information, including customer types, their contracts, accounting details, and various interactions like events, email traffic, and vouchers. Currently, the customers section is built using Blade templates, with plans to migrate to Vue.js in the future.
Structural Overview
Frontend (Blade.php)
Customer-related views are currently handled using Blade templates. These include:
- Customers List Page: Displays all customers in the system, allowing filtering and searching by name, email, or customer type.
- Create Customer Page: Used to create new customers. This form is accessible both during contract creation and as a standalone form.
- Customer Details Page: Shows detailed information about a specific customer, including their linked contracts, partners, events, and accounting history.
These views are built with Laravel's Blade templating engine and use standard form submissions for data input.
Web Routes
Web routes that serve the customer-related views are defined in web.php. Key routes include:
GET /customers: Fetches the customers list view.GET /customers/create: Opens the form to create a new customer.GET /customers/{id}: Displays details of a specific customer.GET /customers/edit/{id}: Opens the form to edit an existing customer.
These routes direct users to Blade views where customer data is displayed and managed.
API Calls (For Future Vue.js Migration)
As the migration to Vue.js progresses, API calls will replace some of the Blade form submissions. This section will be updated when the migration occurs.
Flow of Customers
Customers List
The Customers List page shows all customers in the system. Users can filter by customer type (company or individual) and search for customers using their name, email, or other details. This page provides an overview of each customer’s key details and actions to view or edit them.
Creating a Customer
Customers can be created either as part of the contract creation process or independently through the Create Customer form. When creating a customer, users:
- Choose whether the customer is a Company or a Normal Customer.
- Enter customer information, including name, contact details, addresses, and partners.
- (For companies) Enter additional data like company name.
The form validates all necessary fields before submission.
Customer Types
There are two main types of customers:
- Companies: Business entities.
- Normal Customers: Individuals.
These two types of customers are handled similarly but may have different data fields.
Editing a Customer
The Edit Customer form allows users to modify customer details. This includes:
- Changing customer information (e.g., name, address, email).
- Managing customer addresses (multiple addresses can be linked to a single customer).
- Updating partners for customers.
Once edited, changes are validated and saved in the database.
Relationships with Other Features
Addresses
Customers can have multiple addresses (e.g., billing and shipping addresses). These addresses are linked to customer records and are used during contract creation or order processing.
Linked Contracts
Every customer has a history of contracts they’ve entered into. These contracts can be accessed from the Customer Details page, showing all relevant details like contract status, products, and services.
Partners
For customers, partners (other contacts or organizations) can be linked to the customer profile.
Customer Events
The system tracks important upcoming events related to the customer, such as engagements, weddings, flights, or other significant personal or business milestones. These events are displayed on the Customer Details page, allowing the business to plan communications, offers, or follow-ups based on the customer’s life events. This feature helps businesses stay engaged with customers and provide timely, relevant interactions.
Email Traffic
The system tracks email communications with the customer. These emails are stored and displayed on the Customer Details page, allowing users to view past interactions or notifications sent to the customer.
Vouchers
If applicable, vouchers are associated with a customer. These can be viewed and managed from the Customer Details page. Users can attach & detach vouchers directly from the customer’s profile.
Change History
Every update to a customer’s profile is tracked through a change history system. Users can see when and what changes were made, providing accountability and transparency.
Accounting
The Accounting section on the Customer Details page provides a summary of all financial interactions with the customer. This includes:
- Open Amounts: Outstanding payments the customer owes.
This information is essential for managing customer accounts and keeping track of financial obligations.