fluent_support_before_assigning_role
Parameters
- '$user' (array) User data
Usage
add_action('fluent_support/before_assigning_role', function ($user) {
// ...do something
}, 10, 1);Reference
do_action('fluent_support/before_assigning_role', $user)
This action is located in fluent-support/app/Modules/Auth/AuthService.php
fluent_support_after_assigning_role
Parameters
- '$user' (array) User data
Usage
add_action('fluent_support/after_assigning_role', function ($user) {
// ...do something
}, 10, 1);Reference
do_action('fluent_support/after_assigning_role', $user)
This action is located in fluent-support/app/Modules/Auth/AuthService.php
fluent_support_attachment_uploaded_as_temp
Parameters
- '$attachment' (object) Attachment data
- 'ticketId' (integer) Ticket ID
Usage
add_action('fluent_support/attachment_uploaded_as_temp', function ($attachment, $ticketId) {
// ...do something
}, 10, 2);Reference
do_action('fluent_support/attachment_uploaded_as_temp', $attachment, $ticketId)
This action is located in fluent-support/app/Http/Controllers/UploaderController.php,fluent-support/app/Modules/MCP/Support/AttachmentStager.php (attachments staged by MCP tools)
fluent_support_workflow_triggered
Parameters
- '$workflow' (object) Workflow object
- '$ticket' (object) Ticket object
- '$actor' (object) Customer or agent who triggered the workflow
- '$context' (array) Additional workflow context data
Usage
add_action('fluent_support/workflow_triggered', function ($workflow, $ticket, $actor, $context) {
// ...do something
}, 10, 4);Reference
do_action('fluent_support/workflow_triggered', $workflow, $ticket, $actor, $context)
This action is located in fluent-support-pro/app/Modules/Workflows/Runner.php,fluent-support-pro/app/Modules/Workflows/WorkflowController.php
fluent_support_after_creating_any_response
Parameters
- '$createdResponse' (object) Response data
- '$ticket' (object) Ticket data
- '$person' (object) Person data
Usage
add_action('fluent_support/' . $conversationType . '_added_by_' . $person->person_type,
function($createdResponse, $ticket, $person) {
// Do your stuff here
}, 20, 3);Note: $conversationType is a dynamically assigned conversation type (some hooks use it as $convoType). Here, $person->person_type contain the type of person, whether it be an agent, user, etc.
Published drafts: fluent_support/response_added_by_agent also fires when a draft reply is published, either from the admin "Approve" action or the MCP publish-draft-reply tool. In that case $person is the agent who wrote the draft, not the agent who approved it (it falls back to the approver only when the draft has no author). The draft is already saved as a response when the action fires.
Reference
do_action('fluent_support/' . $convoType . '_added_by_' . $person->person_type, $createdResponse, $ticket, $person)
do_action('fluent_support/response_added_by_' . $sender->person_type, $response, $ticket, $sender) (draft publish)
This action is located in fluent-support/app/Services/Tickets/ResponseService.php (fireResponseHooks() and publishDraft())
fluent_support_before_delete_email_box
Parameters
- '$box' (object) Mailbox data
- '$fallbackBox' (object) Fallback mailbox data
Usage
add_action('fluent_support/before_delete_email_box', function ($box, $fallbackBox) {
// ...do something
}, 10, 2);Reference
do_action('fluent_support/before_delete_email_box', $box, $fallbackBox)
This action is located in fluent-support/app/Http/Controllers/MailBoxController.php
fluent_support_mailbox_deleted
Parameters
- '$mailBoxId' (integer) Mailbox ID
- '$fallbackBox' (object) Fallback mailbox data
Usage
add_action('fluent_support/mailbox_deleted', function ($mailBoxId, $fallbackBox) {
// ...do something
}, 10, 2);Reference
do_action('fluent_support/mailbox_deleted', $mailBoxId, $fallbackBox)
This action is located in fluent-support/app/Http/Controllers/MailBoxController.php
fluent_support_telegram_payload_error
Parameters
- '$responseData' (array) Telegram response data
- '$payload' (array) Telegram payload data
Usage
add_action('fluent_support/telegram_payload_error', function ($responseData, $payload) {
// ...do something
}, 10, 2);Reference
do_action('fluent_support/telegram_payload_error', $responseData, $payload)
This action is located in fluent-support-pro/app/Modules/Chat/ChatController.php
fluent_support_slack_signature_verification_failed
Parameters
- '$reason' (string) Verification failure reason
Usage
add_action('fluent_support/slack_signature_verification_failed', function ($reason) {
// ...do something
}, 10, 1);Reference
do_action('fluent_support/slack_signature_verification_failed', $reason)
This action is located in fluent-support-pro/app/Modules/Chat/Slack.php
fluent_support_delete_remote_attachment_by_driver
Parameters
- '$attachment' (object) attachment data
- '$ticketID' (integer|null) Ticket ID the attachment belonged to, or
nullwhen it was not on a ticket
Usage
add_action('fluent_support/delete_remote_attachment_' . $attachment->driver, function ($attachment,$ticketID) {
// ...do something
}, 10, 2);Note: $attachment->driver is the storage driver slug stored on the attachment, such as amazon_s3 or dropbox.
Since 2.4.7: this hook fires only for a storage driver that is not registered through the fluent_support/storage_drivers filter. Fluent Support Pro 2.4.7 registers its drivers, so they no longer go through this hook. New drivers should implement StorageDriverInterface instead.
Reference
do_action('fluent_support/delete_remote_attachment_' . $attachment->driver, $attachment, $attachment->ticket_id)
This action is located in fluent-support/app/Services/Storage/StorageManager.php
fluent_support_verify_dropbox_code
Parameters
- '$code' (string) Dropbox verification code
Usage
add_action('fluent_support_pro/verify_dropbox_code', function ($code) {
// ...do something
}, 10, 1);Reference
do_action('fluent_support_pro/verify_dropbox_code', $code)
This action is located in fluent-support-pro/app/Http/Controllers/AuthorizeController.php
fluent_support_run_action_from_any_saved_action
Parameters
- '$action' (string) Action name
- '$workflow' (object) Workflow data
- '$ticket' (object) Ticket data
Usage
add_action('fluent_support/run_action_' . $action->action_name, function ($action, $workflow, $ticket) {
// ...do something
}, 10, 3);Note: $action->action_name represents the type of action.
Reference
do_action('fluent_support/run_action_' . $action->action_name, $action, $this->workflow, $this->ticket)
This action is located in fluent-support-pro/app/Services/Workflow/ActionRunner.php
fluent_support_ai_response_success
Parameters
- '$ticketId' (integer) ID of the ticket for which the response was generated
- '$prompt' (string) The prompt sent to the AI provider
- '$tokens' (integer) Number of tokens consumed by the request
- '$providerName' (string) The active provider name, e.g.
'openai','gemini','anthropic','FluentBot'
Usage
add_action('fluent_support/ai_response_success', function ($ticketId, $prompt, $tokens, $providerName) {
// log token usage per provider
}, 10, 4);Reference
do_action('fluent_support/ai_response_success', $ticketId, $prompt, $tokens, $providerName)
This action is located in fluent-support/app/Services/Integrations/AI/BaseAIProvider.php,fluent-support/app/Services/Integrations/FluentBot/FluentBotAPI.php
fluent_support_mcp_loaded
Parameters
None.
Usage
add_action('fluent_support/mcp_loaded', function () {
// MCP is ready — register extra tools or modify state
}, 10, 0);Reference
do_action('fluent_support/mcp_loaded')
This action is located in fluent-support/app/Modules/MCP/MCPInit.php
fluent_support_mcp_tool_exception
Parameters
- '$context' (array) Exception context —
['exception' => Throwable, 'tool' => string, 'params' => array]
Usage
add_action('fluent_support/mcp_tool_exception', function ($context) {
// log $context['exception'], $context['tool'], $context['params']
}, 10, 1);Reference
do_action('fluent_support/mcp_tool_exception', ['exception' => $e, 'tool' => $toolName, 'params' => $params])
This action is located in fluent-support/app/Modules/MCP/AbilitiesRegistrar.php,fluent-support-pro/app/Modules/MCP/AbilitiesRegistrar.php
fluent_support_tickets_query_by_permission_ref
Parameters
- '$ticketsQuery' (object) Ticket query builder, passed by reference
- '$userId' (integer|boolean) User ID to scope by, or
falseto use the current user
Usage
add_action('fluent_support/tickets_query_by_permission_ref', function (&$ticketsQuery, $userId) {
// mutate $ticketsQuery directly
}, 10, 2);Note: Registered internally by PermissionFilterManager::filterAgentTickets() to scope the query to tickets the current agent can access. It's fired from ticket listing, notification queries, and several MCP tool query paths.
Reference
do_action_ref_array('fluent_support/tickets_query_by_permission_ref', [&$ticketsQuery, $userId])
This action is located in fluent-support/app/Modules/MCP/Tools/CustomerTools.php,fluent-support/app/Modules/MCP/Tools/ManagementTools.php,fluent-support/app/Services/Tickets/AgentTicketAccess.php,fluent-support-pro/app/Modules/Workflows/WorkflowController.php
fluent_support_customer_portal_tickets_query
Parameters
- '$ticketsQuery' (object) Ticket query builder, passed by reference
- '$customer' (object) The customer viewing their ticket list
- '$request' (object) The current request
Usage
add_action('fluent_support/customer_portal/tickets_query', function (&$ticketsQuery, $customer, $request) {
// mutate $ticketsQuery directly
}, 10, 3);Reference
do_action_ref_array('fluent_support/customer_portal/tickets_query', [&$ticketsQuery, $customer, $request])
This action is located in fluent-support/app/Modules/CustomerPortal/PortalController.php
fluent_support_finalize_file_upload_by_driver
Parameters
- '$attachment' (object) Attachment record, passed by reference
- '$ticketId' (integer) Ticket ID the attachment belongs to
Usage
add_action('fluent_support/finalize_file_upload_amazon_s3', function (&$attachment, $ticketId) {
// upload to S3 and update $attachment with the remote path/url
}, 10, 2);Note: {driver} is the active storage driver slug.
Since 2.4.7: this hook fires only for a storage driver that is not registered through the fluent_support/storage_drivers filter. Fluent Support Pro 2.4.7 registers its drivers, so they no longer go through this hook. New drivers should implement StorageDriverInterface instead.
Reference
do_action_ref_array('fluent_support/finalize_file_upload_' . $key, [&$attachment, $ticketId])
This action is located in fluent-support/app/Services/Storage/StorageManager.php (finalize()),fluent-support-pro/app/Services/Integrations/FluentEmailPiping/ByMailHandler.php (only with Fluent Support older than 2.4.7)
fluent_support_attachment_uploaded_as_temp_by_driver
Parameters
- '$attachment' (object) Attachment record, passed by reference
- '$ticketId' (integer) Ticket ID
Usage
add_action('fluent_support/attachment_uploaded_as_temp_dropbox', function (&$attachment, $ticketId) {
// ...do something
}, 10, 2);Note: {driver} is the active storage driver slug.
Since 2.4.7: this hook fires only for a storage driver that is not registered through the fluent_support/storage_drivers filter. Fluent Support Pro 2.4.7 registers its drivers, so they no longer go through this hook. New drivers should implement StorageDriverInterface instead.
Reference
do_action_ref_array('fluent_support/attachment_uploaded_as_temp_' . $key, [&$attachment, $ticketId])
This action is located in fluent-support/app/Services/Storage/StorageManager.php (afterTempUpload())
fluent_support_update_verification_failed
Parameters
- '$slug' (string) The plugin slug being updated
- '$code' (string) Machine-readable rejection code
- '$message' (string) Human-readable rejection message shown to the user
Usage
add_action('fluent_support/update_verification_failed', function ($slug, $code, $message) {
// log or alert on a blocked update
}, 10, 3);Reference
do_action('fluent_support/update_verification_failed', $this->slug, $code, $message)
This action is located in fluent-support-pro/app/Services/PluginManager/UpdateVerifier.php
fluent_support_verify_google_code
Parameters
- '$code' (string) Google OAuth verification code
Usage
add_action('fluent_support_pro/verify_google_code', function ($code) {
// ...do something
}, 10, 1);Reference
do_action('fluent_support_pro/verify_google_code', $code)
This action is located in fluent-support-pro/app/Http/Controllers/AuthorizeController.php
fluent_support_main_tickets_query
It also fires inside the internal notifications query, where it scopes the ticket relation of each notification. In that call $args is an empty array.
Check the name for your version. Fluent Support 2.4.5 and earlier fire this only with a backslash: fluent_support\main_tickets_query. Later versions fire the backslash name and then the slash name. Use the backslash name to support every version, and listen on only one of the two, or your callback runs twice.
Core uses the backslash name internally (PermissionFilterManager::filterAgentTicketsByMailboxes()) to apply agent mailbox restrictions.
Parameters
- '$ticketsQuery' (object) Ticket query builder, passed by reference
- '$args' (array) The query arguments:
with,filter_type(simpleoradvanced),filters_groups,filters_groups_raw,sort_by,sort_type,limit,offset,simple_filters,customer_id,search. Empty array when fired from the notifications query
Usage
add_action('fluent_support/main_tickets_query', function ($ticketsQuery, $args) {
// Hide tickets from one product in the agent ticket list
$ticketsQuery->where('product_id', '!=', 12);
}, 10, 2);Reference
do_action_ref_array('fluent_support/main_tickets_query', [&$ticketsQuery, $this->args])
This action is located in fluent-support/app/Services/Tickets/TicketQuery.php
fluent_support_tickets_filter_by_provider
Fluent Support Pro registers the tickets, customer and agent providers (on the backslash names). Register your own provider name to support a custom filter source.
Check the name for your version. Fluent Support 2.4.5 and earlier fire this only with a backslash: fluent_support\tickets_filter_{provider}. Later versions fire the backslash name and then the slash name. Use the backslash name to support every version, and listen on only one of the two, or your callback runs twice.
Parameters
- '$query' (object) Query builder for the current filter group, passed by reference
- '$items' (array) The filter items for this provider in this group. Each item has
property(second element ofsource),operatorandvalue
Usage
add_action('fluent_support/tickets_filter_my_source', function ($query, $items) {
foreach ($items as $item) {
if ($item['property'] === 'priority' && $item['operator'] === '=') {
$query->where('client_priority', sanitize_text_field($item['value']));
}
}
}, 10, 2);Reference
do_action_ref_array('fluent_support/tickets_filter_' . $providerName, [&$q, $items])
This action is located in fluent-support/app/Services/TicketQueryService.php
fluent_support_customer_email_verified_change
It fires when the linked WordPress account's email change was confirmed by WordPress (verified) or made by someone else who can edit that account (administrator), when the customer confirms a support address claim from the portal (claimed), and when an agent changes the customer's email from the admin (agent).
Parameters
- '$customer' (object) The customer model, already saved with the new email
- '$previousEmail' (string) The email the customer had before the change
- '$reason' (string) How the change was proven:
verified,administrator,claimedoragent
Usage
add_action('fluent_support/customer_email_verified_change', function ($customer, $previousEmail, $reason) {
// Keep an external CRM in sync
my_crm_update_email($previousEmail, $customer->email);
}, 10, 3);Reference
do_action('fluent_support/customer_email_verified_change', $customer, $previousEmail, $reason)
This action is located in fluent-support/app/Services/ProfileInfoService.php
fluent_support_merging_customer_records
It fires after core has moved the source record's tickets, conversations, attachments, activities, notifications and person meta, and before the source record is deleted. The source is deleted only if nothing still points at it, so move any rows you keep keyed by the customer's person ID here. Fluent Support Pro uses this hook to move time tracking entries.
Parameters
- '$source' (object) The customer record being absorbed (removed afterwards)
- '$target' (object) The customer record it is merged into
Usage
add_action('fluent_support/merging_customer_records', function ($source, $target) {
global $wpdb;
$wpdb->update(
$wpdb->prefix . 'my_customer_notes',
['customer_id' => $target->id],
['customer_id' => $source->id]
);
}, 10, 2);Reference
do_action('fluent_support/merging_customer_records', $source, $target)
This action is located in fluent-support/app/Services/EmailClaimService.php,fluent-support-pro/app/Hooks/actions.php (listener)
fluent_support_system_tools_database_repair
Parameters
- None
Usage
add_action('fluent_support/system_tools_database_repair', function () {
// ...create your add-on tables
}, 10, 0);Reference
do_action('fluent_support/system_tools_database_repair')
This action is located in fluent-support/app/Modules/SystemTools/DatabaseHealth.php
