# Deals & Pipeline

The MailTrixy Deals & Pipeline module provides a visual sales pipeline to track opportunities from first contact through to close. Manage multiple pipelines, customize stages, forecast revenue, and keep your entire team aligned on deal progress.

## Multiple Pipelines

MailTrixy allows you to create and manage multiple pipelines to represent different sales processes within your organization. Common use cases include:

- Sales Pipeline: Track new business opportunities from lead to close.
- Renewal Pipeline: Manage subscription renewals and upsell opportunities for existing customers.
- Partnership Pipeline: Track partnership deals with different stages (introductions, negotiations, agreements).
- Custom Pipelines: Create pipelines for any process that has sequential stages (hiring, onboarding, project delivery).

Each pipeline operates independently with its own stages, deals, and analytics. Team members can be granted access to specific pipelines based on their role.

## Custom Stages

Each pipeline consists of ordered stages that represent the phases of your sales process. Stages are fully customizable:

- Stage Name: A descriptive label (e.g., "Qualified Lead", "Proposal Sent", "Negotiation", "Closed Won").
- Stage Color: Assign a color to each stage for quick visual identification on the Kanban board. Choose from a palette of 16 predefined colors or enter a custom hex code.
- Win Probability: Set a percentage (0-100%) that represents the likelihood of closing a deal in this stage. This probability is used in the weighted revenue forecast. For example, "Proposal Sent" might be 40%, while "Contract Signed" might be 90%.
- Stage Order: Drag and drop stages to reorder them. The order defines the visual left-to-right flow on the Kanban board.
- Rotting Period: Optionally set a number of days after which a deal in this stage is flagged as "rotting" (stale). Rotting deals display a warning indicator to prompt follow-up action.

### Default Stages

New pipelines come with a set of default stages that you can customize or replace:

Stage | Color | Win Probability
--- | --- | ---
New Lead | Blue | 10%
Qualified | Cyan | 25%
Proposal Sent | Yellow | 40%
Negotiation | Orange | 60%
Closed Won | Green | 100%
Closed Lost | Red | 0%

## Deal Properties

Each deal captures essential information for tracking the opportunity:

- Deal Name: A descriptive title for the opportunity (e.g., "Acme Corp - Enterprise License").
- Deal Value: The monetary value of the deal in the workspace currency. Supports decimal values for precision.
- Currency: The deal currency, defaulting to the workspace currency but overridable per deal for international sales.
- Expected Close Date: The projected date for closing the deal. Used in revenue forecasting and displayed on the deal card.
- Contact: The primary contact associated with the deal. Linked to the CRM contact record for full context.
- Company: The company or organization the deal is with.
- Assigned To: The team member responsible for the deal. Used for workload distribution and performance tracking.
- Priority: High, Medium, or Low priority indicator.
- Lost Reason: When a deal is moved to "Closed Lost", a reason must be selected from a configurable dropdown (e.g., "Price too high", "Chose competitor", "No budget", "No response", "Custom reason"). Lost reasons are tracked in pipeline analytics to identify improvement areas.
- Custom Fields: Add custom fields to deals just like contacts. Useful for tracking deal-specific data like contract length, product line, or referral source.

## Drag-and-Drop Kanban Board

The pipeline view defaults to a Kanban board interface where each column represents a stage and each card represents a deal.

- Drag and Drop: Move deals between stages by dragging their cards from one column to another. The stage change is saved immediately and logged in the deal activity timeline.
- Deal Cards: Each card displays the deal name, value, assigned team member avatar, expected close date, and priority indicator. Rotting deals show a red clock icon.
- Column Totals: Each stage column header shows the count of deals and the total value of deals in that stage.
- Quick Actions: Hover over a deal card to access quick actions: edit, assign, change priority, add note, or delete.
- Filters: Filter the board by assigned team member, date range, deal value range, or priority level.
- List View: Toggle between Kanban and list view. The list view shows deals in a sortable table format with all properties visible.

## Revenue Forecast

MailTrixy calculates a weighted revenue forecast based on deal values and stage win probabilities:

- Weighted Value: Each deal's weighted value = Deal Value x Stage Win Probability. For example, a $10,000 deal in the "Proposal Sent" stage (40% probability) has a weighted value of $4,000.
- Total Forecast: The sum of all weighted deal values across the pipeline. Displayed at the top of the pipeline view.
- Monthly Forecast: Deals are grouped by their expected close month to show a monthly revenue forecast chart. This helps predict cash flow and resource planning.
- Forecast vs. Actual: Compare forecasted revenue against actual closed-won revenue over time. The comparison is shown as a bar chart with forecasted and actual side by side.

> Tip: Regularly update expected close dates and stage assignments to keep your forecast accurate. Stale deals with outdated dates will skew projections.

## Deal Assignment

Deals can be assigned to team members individually or automatically:

- Manual Assignment: Select a team member from the "Assigned To" dropdown when creating or editing a deal.
- Round-Robin: Enable round-robin auto-assignment in pipeline settings. New deals are automatically assigned to available team members in rotation.
- Skill-Based: Assign deals based on team member skills or specializations. For example, enterprise deals go to senior account executives while SMB deals go to the general sales team.
- Reassignment: Reassign a deal at any time. The previous assignee and the new assignee are both notified by email and in-app notification.

## Pipeline Analytics

The pipeline analytics dashboard provides insights into your sales performance:

- Conversion Rate: The percentage of deals that move from one stage to the next, and the overall lead-to-close conversion rate.
- Average Deal Size: The mean value of closed-won deals over a selected time period.
- Sales Cycle Length: The average number of days from deal creation to close. Broken down by pipeline, stage, and team member.
- Win/Loss Ratio: The ratio of closed-won to closed-lost deals. Displayed as a trend line over time.
- Lost Reason Analysis: A breakdown of why deals were lost, presented as a pie chart. Helps identify patterns and address common objections.
- Team Leaderboard: Rank team members by number of deals closed, total revenue, and average deal size.
- Stage Duration: Average time deals spend in each stage. Identifies bottlenecks in the sales process.

## Deal Activity Timeline

Each deal has its own activity timeline that records every action and event:

- Stage changes with timestamps and the team member who moved the deal.
- Emails sent to and received from the deal's associated contact.
- Notes added by team members.
- Assignment changes.
- Value or close date modifications.
- Workflow automation actions that affected the deal.

The timeline provides a complete audit trail, ensuring full transparency into how each opportunity was managed.