Company Hooks
FluentCRM Core IntermediateThese action hooks fire during company lifecycle events — creation, updates, deletion, status/type/category changes, and notes management.
Company CRUD
fluent_crm/company_created
This action fires when a new company is created.
Parameters
$companyCompany Model$dataArray - creation data
Usage:
add_action('fluent_crm/company_created', function($company, $data) {
// A new company was created
}, 10, 2);Source: app/Api/Classes/Companies.php
fluent_crm/company_updated
This action fires when a company is updated.
Parameters
$companyCompany Model$dataArray - update data
Usage:
add_action('fluent_crm/company_updated', function($company, $data) {
// Company was updated
}, 10, 2);Source: app/Api/Classes/Companies.php
fluent_crm/before_company_delete
This action fires before a company is deleted. Use it to clean up related data.
Parameters
$companyCompany Model
Usage:
add_action('fluent_crm/before_company_delete', function($company) {
// Clean up related data before company is deleted
});Source: app/Http/Controllers/CompanyController.php
fluent_crm/company_deleted
This action fires after a company has been deleted.
Parameters
$companyIdINT - deleted company ID
Usage:
add_action('fluent_crm/company_deleted', function($companyId) {
// Company was deleted
});Source: app/Http/Controllers/CompanyController.php
Status, Type & Category Changes
fluent_crm/company_status_to_{$status}
This dynamic action fires when a company's status is changed.
Parameters
$companyCompany Model$oldStatusstring - previous status
Usage:
add_action('fluent_crm/company_status_to_active', function($company, $oldStatus) {
// Company status changed to active
}, 10, 2);Source: app/Http/Controllers/CompanyController.php
fluent_crm/company_type_to_{$type}
This dynamic action fires when a company's type is changed.
Parameters
$companyCompany Model$oldTypestring - previous type
Usage:
add_action('fluent_crm/company_type_to_customer', function($company, $oldType) {
// Company type changed to customer
}, 10, 2);Source: app/Http/Controllers/CompanyController.php
fluent_crm/company_category_to_{$category}
This dynamic action fires when a company's industry/category is changed.
Parameters
$companyCompany Model$oldCategorystring - previous category
Usage:
add_action('fluent_crm/company_category_to_technology', function($company, $oldCategory) {
// Company category changed to technology
}, 10, 2);Source: app/Http/Controllers/CompanyController.php
Company Notes
fluent_crm/company_note_added
This action fires when a note is added to a company.
Parameters
$noteSubscriberNote Model$companyCompany Model$noteDataArray - note data
Usage:
add_action('fluent_crm/company_note_added', function($note, $company, $noteData) {
// A note was added to the company
}, 10, 3);Source: app/Http/Controllers/CompanyController.php
fluent_crm/company_note_updated
This action fires when a company note is updated.
Parameters
$noteCompanyNote Model$companyCompany Model$noteDataArray - updated note data
Usage:
add_action('fluent_crm/company_note_updated', function($note, $company, $noteData) {
// A company note was updated
}, 10, 3);Source: app/Http/Controllers/CompanyController.php
fluent_crm/company_note_deleted
This action fires when a company note is deleted.
Parameters
$noteIdINT - Note ID$companyCompany Model
Usage:
add_action('fluent_crm/company_note_deleted', function($noteId, $company) {
// A company note was deleted
}, 10, 2);Source: app/Http/Controllers/CompanyController.php