> **Before you begin:** The Sales Opportunity module must be enabled before use.
> Go to **Settings → System Upgrade**, locate the **Sales Opportunity** module, and activate it.
> Once enabled, the **Sales Opportunity** menu item will appear in the CRM navigation.
What Is the Sales Opportunity Module?
The Sales Opportunity module is a visual tool for managing and tracking your sales process from the first contact with a potential customer all the way to closing the deal. It is also known as a **Sales Funnel** or **Sales Pipeline**.
Each pipeline is made up of stages. Each customer or lead is represented by a card that moves through those stages as the deal progresses.

Real-World Example
Here is how a typical sales pipeline works in practice:
- A visitor fills out a form on your website.
- The lead is automatically added to your pipeline at **Stage 1: Initial Contact**.
- Your sales representative sends product information — the card moves to **Stage 2: Send Catalog**.
- A follow-up phone call is scheduled — the card moves to **Stage 3: Follow-up Call**.
- A contract is prepared and sent — the card moves to **Stage 4: Contract Sent**.
- The deal is either **Won** (Successful End) or **Lost** (Unsuccessful End).
At every step you can see exactly where each lead or customer stands and what needs to happen next.
Benefits
- **Better sales tracking** — see every deal in one place, sorted by stage.
- **Improved conversion rate** — spot bottlenecks and act before deals go cold.
- **Organized pipeline management** — multiple teams can manage separate pipelines simultaneously.
- **Accountability** — each card has a responsible user, so nothing falls through the cracks.
- **Full history** — every change is recorded so you can review what happened at any point.
Setting Up Your First Pipeline
> **Navigation:** **Settings → Customization → Profile Form Editor → Sales Opportunity Section**
Step 1 — Open the Sales Opportunity Settings
- Click **Settings** in the CRM navigation bar.
- Go to **Customization → Profile Form Editor**.
- Scroll to the **Sales Opportunity** section.
- Click **Add New** or click the name of an existing pipeline to edit it.

Step 2 — Name Your Pipeline
- Enter a name for the pipeline in the **Sales Opportunity Name** field (for example: *New Customer Acquisition* or *B2B Sales*).
Step 3 — Define Stages
Each pipeline can have its own stages. For each stage you define:
- **Status** — the name of the stage (for example: *Initial Contact*, *Send Catalog*, *Contract Sent*).
- **Type** — the role of the stage in the pipeline:
| Type | Meaning |
|---|---|
| Start | The entry point of the pipeline |
| Stage | A regular in-progress step |
| Hold | A waiting or paused step |
| Successful End | The deal was won |
| Unsuccessful End | The deal was lost |
Click **Add Row** to add more stages. Drag rows to reorder them.
Step 4 — Define Lead Sources
Lead sources describe where a potential customer came from (for example: *Website*, *Referral*, *Exhibition*, *Cold Call*).
- In the **Lead Sources** section, click **Add Row**.
- Enter each source name.
- Click **Save**.

Permissions
Each sales pipeline has its own permission settings. You control who can view or edit it through the role management system.
Granting Access to a Pipeline
- Go to **Settings → Role Management**.
- Find the role you want to give access to.
- Click **Edit Role Permissions**.
- Locate the Sales Opportunity permissions.
- Toggle on the required permission (view, edit, or manage).
- Click **Save**.
> **Note:** Users who have limited permissions will only see their own assigned cards on the board. System administrators see the full board.

The Kanban Board
The Kanban Board is the main workspace of the Sales Opportunity module. It shows all active cards grouped into their current stage.
Opening the Board
- Click **Sales Opportunity** in the CRM navigation.
- Click **Kanban Board**.
- In the pipeline selector at the top, choose the pipeline you want to view.

Board Layout
Each column on the board represents one stage. Each card inside a column is one opportunity.
- The **column header** shows the stage name and the count of cards in that column.
- Non-end stages show a **total amount** at the bottom of the column — the sum of all product values on cards in that stage.
- Stage columns are colour-coded by type (blue = start, green = successful end, red = unsuccessful end, orange = hold).
Moving a Card Between Stages
- Click and hold a card.
- Drag it to the target stage column.
- Release. The card moves instantly and the stage change is recorded in the history.
Adding a New Card
- Click the **+** button in the header of any stage column.
- Fill in the card details (see [Working with Opportunity Cards](#working-with-opportunity-cards)).
- Click **Save**.
Working with Opportunity Cards
Click the **pencil (edit)** icon on any card to open the card editor. The editor has five tabs: **Details**, **Products**, **Notes**, **History**, and **Follow-ups**.
Details Tab
| Field | Description |
|---|---|
| Title | A short name for this opportunity |
| Stage | Which stage this card is in |
| Opportunity Source | Where this lead came from (from your lead sources list) |
| Opportunity Type | User (existing CRM user) or Lead (prospective contact) |
| Linked User / Lead | The person this opportunity is about |
| Due Date | When this opportunity should be resolved by |
| Sales Probability | A percentage slider indicating the likelihood of success |
| Color | A colour label to visually categorise the card |
| Tags | Custom tags for filtering and grouping |
| Responsible User | The team member responsible for this opportunity |
| Completion | In Progress / Completed Successfully / Completed Unsuccessfully |
| Description | Free-text notes about this opportunity |

Converting a Lead to a User
If the opportunity is linked to a Lead and the deal moves forward, you can convert that lead into a full CRM user directly from the card:
- Open the card editor.
- In the **Linked Lead** field, click the **Convert** button.
- Confirm the conversion.
- The lead becomes a CRM user and the card is updated automatically.
Completion Status
Set the completion status using the radio buttons in the **Assignment** section:
- **In Progress** — the deal is still active.
- **Completed Successfully** — the deal was won.
- **Completed Unsuccessfully** — the deal was lost.
Completed cards remain on the board for historical reference and are displayed with a distinct visual style.
Products Tab
You can add products or services to an opportunity to track the potential deal value.
Adding a Product Manually
- Open the card editor and click the **Products** tab.
- Click **Add Row**.
- Enter the product name, quantity, and unit price.
- The total is calculated automatically.
Adding from the WooCommerce Catalogue
If WooCommerce is installed and integrated:
- Type in the **Search Products** field.
- Select a product from the results.
- It is added to the list with the catalogue price pre-filled.
Creating a WooCommerce Order
Once products are added to a card, you can create a WooCommerce order directly:
- Click the **Create Order** button in the Products tab.
- Confirm the action.
- The order is created in WooCommerce. A link to the order appears at the top of the Products tab.
Column Totals
The **Total** row at the bottom of the product table shows the sum of all line items. This value also appears as a badge on the column header in the Kanban board.

Notes Tab
Use the Notes tab to record internal messages and communication history for an opportunity.
Adding a Note
- Open the card editor and click the **Notes** tab.
- Type your note in the text area.
- Choose **Public** (visible to all users with access) or **Private** (visible only to you).
- Click **Add Note**.
Notes appear in reverse chronological order. You can delete any note by clicking the **×** button next to it.

History Tab
The History tab automatically records every change made to a card: stage moves, field edits, user assignments, and more.
- Each entry shows **who** made the change, **when** it was made, and **what** changed (showing the old value and the new value).
- You cannot edit or delete history entries — they are an automatic audit trail.

Follow-ups Tab
The Follow-ups tab is available when the **Follow-ups module** is active. It lets you schedule and track all follow-up tasks linked to a specific opportunity.
Adding a Follow-up
- Open the card editor and click the **Follow-ups** tab.
- Fill in the follow-up form:
| Field | Description |
|---|---|
| Title | A short description of the follow-up task (required) |
| Start Date / Time | When the follow-up begins (required) |
| Due Date / Time | When it should be completed |
| Set Reminder | Toggle on to receive a reminder at a specific date and time |
| Assigned To | The team member responsible for this follow-up |
| Status | Open or Completed |
| Description | Additional notes |
- Click **Add Follow-up**.
Editing or Deleting a Follow-up
- Click the **pencil** icon on a follow-up to edit it.
- Click the **×** icon to delete it.
> Only follow-ups linked to this opportunity are shown in this tab. To see all follow-ups across the system, use the main Follow-ups module.

Filtering the Board
Use the filter panel to focus on specific cards.
Opening the Filters
Click the **Filters** button (slider icon) at the top-right of the Kanban board.
Available Filters
| Filter | Description |
|---|---|
| Search | Filter cards by title keyword |
| Opportunity Type | Show only User-linked or Lead-linked cards |
| Responsible User | Show only cards assigned to a specific team member |
| Tag | Show only cards with a specific tag |
| Min Amount / Max Amount | Filter by total deal value range |
| Status | Show active cards, completed cards, or all |
| Created Date Range | Filter by when the card was created |
Active filters appear as coloured chips at the top of the filter panel. Click the **×** on a chip to remove that filter. Click **Clear Filters** to reset everything at once.
Quick Tag Filter
Without opening the filter panel, you can click any tag chip displayed above the board to instantly filter by that tag.

Analytics Dashboard
The Analytics Dashboard gives you a visual overview of your pipeline performance.
Opening the Dashboard
- Click **Sales Opportunity** in the CRM navigation.
- Click **Dashboard**.
Selecting a Pipeline and Date Range
Use the controls at the top of the dashboard to choose which pipeline to analyse and to set a date range for the data.
KPI Summary Cards
Three summary numbers appear at the top:
- **Active Opportunities** — the total number of cards currently in progress.
- **Total Amount** — the sum of all product values across active cards.
- **Overall Conversion Rate** — the percentage of all entered opportunities that reached the successful end stage.
Conversion Funnel
The funnel chart visualises the flow of cards through your pipeline stages. Each stage bar shows:
- How wide the bar is relative to the number of cards that entered that stage.
- The **conversion rate** percentage badge.
- The count of **active** cards and **lost** cards at each stage.
This helps you identify exactly where customers are dropping out of your sales process.
Tag Analytics
Shows how cards are distributed across your custom tags. For each tag you can see:
- Total count of cards
- Total deal value
- Number of successful and unsuccessful completions
- Success rate percentage
Click a tag row to jump to the opportunity list filtered by that tag.
Lead Source Distribution
A donut chart showing what proportion of your opportunities came from each lead source. Click a segment to filter the list by that source.
Revenue by Lead Source
A horizontal bar chart ranking lead sources by total deal value. Use this to understand which acquisition channels generate the most revenue.

Dashboard Widgets
Two widgets are available to add to your CRM main dashboard so you can monitor sales performance without leaving the home screen.
Widget 700 — SO Funnel Chart
Displays a funnel chart for a selected pipeline, with date range controls. You can configure it to show data for all time, the last 30 days, the last 90 days, or a custom date range.
Widget 701 — SO User Comparison
Compares opportunity performance across multiple responsible users. The data is presented as a table where rows are pipeline stages and columns are the selected team members. You can see counts and deal values side by side, making it easy to compare how different salespeople are performing at each stage.
Adding Widgets to the Dashboard
- Open the **CRM Dashboard**.
- Click **Edit Dashboard**.
- Click **Add Widget**.
- Find **SO Funnel Chart** or **SO User Comparison** in the widget list.
- Click the widget to add it to the board.
- Drag the widget to your preferred position.
- Click the **settings** icon on the widget to configure it (select pipeline, date range, users).
- Click **Done** to save your layout.

Automation
The Sales Opportunity module integrates with the **Automation** system to trigger actions automatically when certain events occur.
Event: Profile Created
When a new profile (user or lead) is created in the CRM, an automation event can automatically place that profile into a sales stage.
This event is registered in `SalesOpportunityEvent.php` and is available as a trigger when building automation programs.
**Example:** When a new lead submits a contact form, the system automatically creates an opportunity card in the *Initial Contact* stage of your main pipeline.
Event: Stage Change
Every time a card moves from one stage to another, an automation trigger fires. You can use this to:
- Send an **SMS** to the customer
- Send an **email** notification
- Post an internal **notification** to the assigned user
- Trigger any other supported automation action
This event is registered in `AutomationProgramSOStageChange.php`.
#### Configuring a Stage Change Automation
- Go to **Settings → Automation**.
- Create a new automation program.
- Set the trigger type to **SO Stage Change**.
- Configure:
| Setting | Description |
|---|---|
| Execution Delay | How many minutes after the stage change the action should run (0 = immediately) |
| Sales Opportunity | Which pipeline this rule applies to |
| From Stage | The stage the card is moving away from (leave blank for any stage) |
| To Stage | The stage the card is moving into (leave blank for any stage) |
- Use the available shortcodes in your message templates to include dynamic information:
| Shortcode | Replaced with |
|---|---|
| `#so_name#` | The pipeline name |
| `#card_title#` | The opportunity card title |
| `#from_stage#` | The name of the previous stage |
| `#to_stage#` | The name of the new stage |
| `#assigned_user#` | The responsible user's name |
- Save the automation program.

Profile History
Each CRM profile — both **Users** and **Leads** — has a dedicated Sales Opportunity history section on their profile page.
This history shows every opportunity card that has ever been linked to that profile, including:
- The pipeline name
- The stage the card reached
- The outcome (in progress, successful, or unsuccessful)
- The dates and the responsible user
This gives you a complete picture of the customer's journey through your sales process over time.
