Campaigns
1. What This Page Is For
The Campaigns page (/crm/campaigns) is used to create, configure, and manage group CRM follow-up campaigns. It allows team leaders and administrators to schedule campaign periods, set recovered amount and task count targets for staff and players, define rules to automatically pull matching players into follow-up pools, and connect Telegram notification bots. For the legacy Automation Settings menu (/crm/settings), the system automatically redirects here.
2. Before You Start
- Required Permissions:
- You must have the 'CRM campaigns' (
crm_rule) or 'CRM head' (crm_head) permission granted by an administrator to create, view, edit, and delete campaigns. - If you only have view permissions, you can browse the campaign table and view condition details, but you will not see the create or edit buttons.
- You must have the 'CRM campaigns' (
- Things to Prepare:
- Telegram Bot Token: If you want to enable Telegram alerts, prepare the bot token obtained from
@BotFather. - Telegram Room ID (Chat ID): The group or channel ID (for example,
-100123456789) so alerts reach the right chat room. - Determine your campaign start and end dates, as well as the player criteria you want to target.
- Telegram Bot Token: If you want to enable Telegram alerts, prepare the bot token obtained from
3. Screen Layout
When you open this page, you will see the following key areas:
- Header: Displays the page title CRM Campaign Management, subtitle description, and main action buttons: Telegram Integration and Create Campaign.
- Search & Filters: Located below the header, featuring the campaign search box, Search button, Advanced filter toggle, and active filter chips.
- Table Toolbar: Displays the total campaign count found and a Refresh button (circular arrow).
- Campaign Data Table: Lists all campaigns with their creation date, player conditions, duration, status badge, targets, and action buttons.
- Pagination Bar: Located at the bottom of the table to switch pages and select the number of rows per page (10, 20, 50, 100 rows).
4. Search and Filters
| Field / Filter | Type | How to Use | Result |
|---|---|---|---|
| Search campaign name... | Text input | Type a campaign name and click Search or press Enter | Filters the table to show matching campaigns |
| Advanced | Button | Click Advanced to expand or collapse additional filter fields | Opens the status filter panel |
| Status | Dropdown | Choose from: All Statuses, Active, Scheduled, Draft, Completed, or Cancelled | Filters campaigns by the selected status |
| Clear all | Button | Click Clear all or click the X on active filter chips | Resets the search term and status back to defaults |
| Refresh | Icon button | Click the circular arrow icon above the table | Instantly reloads the latest campaign data |
5. Data Table
All Columns in the Table
| Column | What You See | Meaning | Color Badges / Icons |
|---|---|---|---|
| Created At | Date, time, and creator name, e.g. Oct 21, 2026 14:30:00 by admin1 | When the campaign was created and by whom | Gray text with creator name |
| Campaign Name | Campaign title text, e.g. Winback Campaign 10.10 | The name of the campaign | Bold text |
| Condition | View Conditions button with eye icon | The qualification rules used to select players | Click to open detailed condition modal |
| Period | Start date – End date, e.g. Oct 1, 2026 - Oct 31, 2026 | The active date range of the campaign | Gray text |
| Status | Status badge | Current operational state of the campaign | 5 basic colors: Green (Active), Blue (Scheduled), Gray (Draft), Purple (Completed), Red (Cancelled) |
| Goals | Staff and player target figures, e.g. Staff: ฿500,000 (50 bills) / Player: ฿1,000 / ฿5,000 | Recovery and bill targets for staff versus deposit and turnover targets for players | Black/white text |
| Waiting (in task view) | Number of players, e.g. 150 players | Qualified players waiting to be assigned to staff | Orange badge |
| Assigned (in task view) | Number of players, e.g. 80 players | Players already assigned to staff members | Black/white text |
| Actions | Action buttons at the end of each row | Commands to manage that campaign | See action buttons table below |
Action Buttons in Each Row
| Button | Icon / Color | What Happens When Pressed | Conditions / Notes |
|---|---|---|---|
| Favorite star | Star icon / Yellow | Pins the campaign to the top of the table | Click again to unpin |
| View Assignments | Eye icon / Gray | Navigates to Task Assignments (/crm/tasks/[campaignId]) for this campaign | Available for all campaigns |
| Edit | Pencil icon / Blue | Opens the modal to modify campaign details, goals, and rules | Cannot be edited once status is Completed or Cancelled |
| Delete | Trash icon / Red | Opens the confirmation dialog to permanently delete the campaign | Only campaigns in 'Draft' or 'Cancelled' status can be deleted. Active or scheduled campaigns have this button disabled |
6. Step-by-Step Guide
1. Creating a New Campaign
- Go to Follow-up > Campaigns in the left sidebar menu.
- Click the Create Campaign button in the top-right corner.
- In the modal dialog that opens, fill in all 4 sections according to the table in Section 7:
- Section 1: Enter the campaign name, select start and end dates, set the initial status, and select assigned staff.
- Section 2: Enter the target recovered amount (Baht) and target recovered players count (cases/bills) for staff.
- Section 3: Enter the target deposit (Baht) and target turnover (Baht) for individual players.
- Section 4: Enable at least one player qualification rule (such as inactivity days or new lead registration).
- Review your inputs and click Save Campaign.
- A green success message will appear and the new campaign will display in the table.
2. Editing a Campaign
- Find the campaign you want to edit in the table.
- Click the pencil icon (Edit) in that campaign's row.
- Update the desired settings in the modal dialog.
- Click Save Campaign.
3. Deleting a Campaign
- If the campaign is currently active, click edit first to switch its status to Draft or Cancelled, then save.
- Click the trash icon (Delete) in that campaign's row.
- In the confirmation dialog, click the red Delete button.
- The campaign is permanently removed from the system.
4. Connecting a Telegram Bot for Alerts
- Click the Telegram Integration button in the top-right corner above the table.
- In the dialog, enter your Telegram bot token obtained from
@BotFather. - Click Save Token (or Replace Token if updating).
- When creating or editing a campaign, enter your Telegram chat group ID (e.g.
-100123456789) in the Telegram Room ID field and switch on Campaign notifications.
7. Edit or Add Form
The campaign configuration modal (CrmCampaignModal) is divided into 4 main sections:
Section 1: Basic Campaign Details
| Field | Required? | What to Enter | Example | Constraints |
|---|---|---|---|---|
| Campaign Name | Required | Name of the campaign | Winback Campaign 10.10 | Cannot be empty |
| Campaign Duration | Required | Start date and end date | 2026-10-01 to 2026-10-31 | End date must be after start date |
| Campaign Status | Optional | Initial operational state | Active | Options: Active, Scheduled, Draft, Completed, Cancelled (Default: Active) |
| Assigned Staff | Optional | Staff members assigned to handle this campaign | Select all or check specific staff | If left unselected, all team members can handle tasks |
| Telegram Room ID | Optional | Telegram chat group ID | -100123456789 | Must include minus sign for groups |
| Campaign notifications | Optional | Toggle switch | On (Green) | Requires bot token to be configured first |
| Auto-assign matching players | Optional | Toggle switch | On (Green) | Automatically distributes qualified players to staff |
| Welcome SLA (hours) | Optional | Required turnaround time in hours | 24 | Positive whole number |
Section 2: Staff Goals
| Field | Required? | What to Enter | Example | Constraints |
|---|---|---|---|---|
| Target Recovered Amount (฿) | Required | Target total deposit recovered by staff | 500000 | Number greater than 0 |
| Target Recovered Players Count | Required | Target number of players recovered | 50 | Positive whole number greater than 0 |
Section 3: Player Goals
| Field | Required? | What to Enter | Example | Constraints |
|---|---|---|---|---|
| Target Player Deposit (฿) | Required | Expected deposit amount per player | 1000 | Number greater than 0 |
| Target Player Turnover (฿) | Required | Expected turnover amount per player | 5000 | Number greater than 0 |
Section 4: Automatic Player Pool Rules (At least 1 required)
| Field / Rule | Required? | What to Enter | Example | Constraints |
|---|---|---|---|---|
| Disappearing Days (Inactivity) | Can enable | Turn on toggle and click + Add Range to define days without deposit | 14 - 30 days, > 60 days | End days must be greater than start days; ranges must not overlap |
| New Lead (No deposit yet) | Can enable | Turn on toggle and set duration in minutes or days | 30 minutes or 3 days | Minutes must be at least 5; days at least 1 |
| Has Deposit History | Can enable | Turn on toggle to target only players who deposited before | On | Cannot be enabled together with New Lead |
| Min Deposit Times | Can enable | Minimum prior deposit count required | 3 | Integer starting from 1 |
| VIP Min Deposit Amount (฿) | Can enable | Minimum accumulated deposit amount | 50000 | Number greater than 0 |
| VIP Min Deposit Bills | Can enable | Minimum accumulated deposit bills | 10 | Whole number greater than 0 |
| Selected Ranks | Can enable | Select member VIP tier ranks | VIP 1, VIP 2 | Must select at least 1 rank |
| Registration Affiliate Code | Can enable | Specific affiliate referral code | AFF888 | Cannot be empty if enabled |
| Promotions Received | Can enable | Minimum promotions received count | 1 | Whole number starting from 1 |
| Min Win Amount (฿) | Can enable | Minimum win amount during campaign | 10000 | Number 0 or greater |
| Min Loss Amount (฿) | Can enable | Minimum loss amount during campaign | 5000 | Number 0 or greater |
| Min Total Turnover (฿) | Can enable | Minimum total turnover during campaign | 20000 | Number 0 or greater |
| Consecutive Playing Days | Can enable | Min and max consecutive active days | 3 - 7 days | Min must be at least 1; max must be >= min |
8. Popups and Modals
1. Create / Edit Campaign Modal (CrmCampaignModal)
- Triggered by: Clicking Create Campaign in the header or the pencil icon (Edit) in the table.
- What is inside: 4 form sections as detailed in Section 7, plus Cancel and Save Campaign buttons.
- What to do: Fill in required fields, resolve any red error text, and click Save Campaign.
- Result: Saves the campaign, closes the modal, and refreshes the table.
2. Campaign Condition Details Modal (CrmConditionModal)
- Triggered by: Clicking View Conditions in the Condition column.
- What is inside: Summary of all active rules for that campaign, including inactivity ranges, new lead settings, deposit rules, staff/player targets, and Telegram rooms.
- What to do: Review the qualification rules and click Close.
- Result: Closes the modal without making changes.
3. Telegram Integration Dialog (CrmTelegramIntegrationDialog)
- Triggered by: Clicking Telegram Integration in the header.
- What is inside: Bot token status banner, token password input, Cancel, and Save Token (or Replace Token).
- What to do: Paste your bot token and click Save Token.
- Result: Saves the shared Telegram token for alerts.
4. Delete Confirmation Dialog (ConfirmModal)
- Triggered by: Clicking the trash icon (Delete) in a campaign row.
- What is inside: Warning prompt with the campaign name, Cancel, and red Delete button.
- What to do: Confirm the campaign name and click Delete.
- Result: The campaign is permanently deleted.
9. Statuses and Color Badges
| Status Badge | Badge Color | Meaning | Next Action |
|---|---|---|---|
Active (active) | Green | Campaign is running, matching players, and distributing tasks | Check tasks on the Task Assignments page |
Scheduled (scheduled) | Blue | Campaign is set to start on a future date | Wait for the start date; system activates automatically |
Draft (draft) | Gray | Saved draft in preparation; no live effect on players | Edit and change status to Active when ready |
Completed (completed) | Purple | Campaign duration has ended | Historical read-only view; no new tasks or edits permitted |
Cancelled (cancelled) | Red | Campaign has been stopped early | Can be deleted if no longer needed |
10. Frequently Asked Questions / Basic Troubleshooting
- If the delete button is disabled or grayed out:
- Active or scheduled campaigns cannot be deleted directly. Edit the campaign first, change its status to Draft or Cancelled, save, and then click delete.
- If zero players are pulled into the campaign:
- Check whether you have enabled mutually conflicting conditions. For example, enabling New Lead (no deposit yet) alongside Has Deposit History or VIP Conditions makes it impossible for any player to qualify for all rules simultaneously.
- If the Save Campaign button does not save:
- Verify that the campaign name is entered, the end date is strictly after the start date, target amounts are greater than 0, and at least one player condition is enabled.
- If entering
/crm/settingsredirects to another page:- This is expected system behavior. Automation settings and campaign rules have been consolidated directly into this Campaigns (
/crm/campaigns) page.
- This is expected system behavior. Automation settings and campaign rules have been consolidated directly into this Campaigns (