Extending FluentCRM
FluentCRM Core IntermediateFluentCRM provides a modular architecture that lets third-party plugins add custom automation components, merge tags, profile sections, and more. This section covers all the extension points available to developers.
Automation Components
FluentCRM automations (called "Funnels") are built from three types of components:
| Component | Base Class | Description |
|---|---|---|
| Trigger | BaseTrigger | An event that starts an automation (e.g., user registers, form submitted) |
| Action | BaseAction | A task executed during the automation (e.g., apply tag, send email) |
| Benchmark | BaseBenchMark | A goal/checkpoint that contacts must reach to proceed (e.g., link clicked, tag applied) |
All base classes live in the FluentCrm\App\Services\Funnel namespace.
Each component is a PHP class that extends the corresponding base class and implements a set of abstract methods. The base class handles registration automatically — you just define the component's metadata, UI fields, and processing logic.
Registration
Register your components on the fluent_crm/after_init hook:
add_action('fluent_crm/after_init', function () {
new YourPlugin\Automation\CourseEnrolledTrigger();
new YourPlugin\Automation\AddToGroupAction();
new YourPlugin\Automation\TagAppliedBenchmark();
});Form Fields
Automation components use a declarative field system to render their settings UI. See the Form Field Types reference for all 26 available field types (input-text, select, radio, yes_no_check, html_editor, etc.).
Other Extension Points
| Extension | API | Description |
|---|---|---|
| Smart Codes | FluentCrmApi('extender')->addSmartCode() | Custom merge tags for emails and templates |
| Event Tracking | FluentCrmApi('event_tracker')->track() | Track custom contact activities and behaviors |
| Contact Profile Section | FluentCrmApi('extender')->addProfileSection() | Custom tabs on the contact profile page |
| Company Profile Section | FluentCrmApi('extender')->addCompanyProfileSection() | Custom tabs on the company profile page |