Fluent Support Actions Hooks
Hooks are a way of interacting/modifying specific, pre-defined code.
Action hooks provide a way for running a function at a specific point in the execution of WordPress. Callback functions for an Action do not return anything back to the calling Action hook. Fluent Support has a lot of action hooks. You can use these hooks to customize the plugin. You can also use these hooks to extend the plugin’s functionality.
Available Action Hooks
There are a lot of action hooks in Fluent Support core and Fluent Support Pro. Here You can find the proper guidelines, handy code snippets, full code examples and code reference of using all action hooks.
Fluent Support Core Actions
Ticket Actions
fluent_support_before_ticket_create
Parameters
- '$ticketData' (array) Ticket data about to be saved
- '$customer' (object) Customer object
Usage
add_action('fluent_support/before_ticket_create', function ($ticketData, $customer) {
// ...do something
}, 20, 2);Reference
do_action('fluent_support/before_ticket_create', $ticketData, $customer)
This action is located in fluent-support/app/Services/CustomerPortalService.php,fluent-support/app/Services/Tickets/TicketService.php,fluent-support/app/Services/Integrations/FluentForm/FeedIntegration.php,fluent-support/app/Services/Integrations/FluentCrm/CreateTicketAction.php,fluent-support-pro/app/Services/Integrations/FluentEmailPiping/ByMailHandler.php
fluent_support_after_ticket_create
Parameters
- '$ticket' (object) Ticket object
- '$customer' (object) Customer object
Usage
add_action('fluent_support/ticket_created', function ($ticket, $customer) {
// ...do something
}, 20, 2);Reference
do_action('fluent_support/ticket_created', $ticket, $customer)
This action is located in fluent-support/app/Services/CustomerPortalService.php,fluent-support/app/Services/Tickets/TicketService.php,fluent-support/app/Services/Integrations/FluentForm/FeedIntegration.php,fluent-support/app/Services/Integrations/FluentCrm/CreateTicketAction.php,fluent-support-pro/app/Services/Integrations/FluentEmailPiping/ByMailHandler.php
fluent_support_ticket_created_behalf_of_customer
Parameters
- '$createdTicket' (object) Ticket object
- '$customer' (object) Customer object
- '$agent' (object) Agent object who created the ticket
Usage
add_action('fluent_support/ticket_created_behalf_of_customer', function ($createdTicket, $customer, $agent) {
// ...do something
}, 10, 3);Reference
do_action('fluent_support/ticket_created_behalf_of_customer', $createdTicket, $customer, $agent)
This action is located in fluent-support/app/Services/Tickets/TicketService.php
fluent_support_agent_initiated_ticket_response
Parameters
- '$agentResponse' (object) Created response object
- '$createdTicket' (object) Ticket object
- '$agent' (object) Agent object
Usage
add_action('fluent_support/agent_initiated_ticket_response', function ($agentResponse, $createdTicket, $agent) {
// ...do something
}, 10, 3);Reference
do_action('fluent_support/agent_initiated_ticket_response', $agentResponse, $createdTicket, $agent)
This action is located in fluent-support/app/Services/Tickets/TicketService.php
fluent_support_when_ticket_is_being_deleted
Parameters
- '$ticket' (object) Ticket data
Usage
add_action('fluent_support/deleting_ticket', function ($ticket) {
// ...do something
}, 10, 1);Reference
do_action('fluent_support/deleting_ticket', $this)
This action is located in fluent-support/app/Models/Ticket.php,fluent-support/app/Services/Tickets/TicketService.php
fluent_support_after_ticket_tag_added
Parameters
- '$tagId' (integer) Tag ID
- '$ticket' (object) Ticket data
Usage
add_action('fluent_support/ticket_tag_added', function ($tagId, $ticket) {
// ...do something
}, 10, 2);Reference
do_action('fluent_support/ticket_tag_added', $tagId, $this)
This action is located in fluent-support/app/Models/Ticket.php
fluent_support_after_ticket_tag_removed
Parameters
- '$tagId' (integer) Tag ID
- '$ticket' (object) Ticket data
Usage
add_action('fluent_support/ticket_tag_removed', function ($tagId, $ticket) {
// ...do something
}, 10, 2);Reference
do_action('fluent_support/ticket_tag_removed', $tagId, $this)
This action is located in fluent-support/app/Models/Ticket.php
fluent_support_before_ticket_create_from_email
Parameters
- '$responseOrTicketData' (array) It is either ticket data or response data
- '$customer' (object) Customer data
Usage
add_action('fluent_support/before_ticket_create_from_email', function ($responseOrTicketData, $customer) {
// ...do something
}, 10, 2);Reference
do_action('fluent_support/before_ticket_create_from_email', $responseOrTicketData, $customer)
This action is located in fluent-support-pro/app/Services/Integrations/FluentEmailPiping/ByMailHandler.php
fluent_support_after_ticket_create_from_email
Parameters
- '$createdTicket' (object) Ticket data
- '$customer' (object) Customer data
Usage
add_action('fluent_support/after_ticket_create_from_email', function ($createdTicket, $customer) {
// ...do something
}, 10, 2);Reference
do_action('fluent_support/after_ticket_create_from_email', $createdTicket, $customer)
This action is located in fluent-support-pro/app/Services/Integrations/FluentEmailPiping/ByMailHandler.php
fluent_support_response_added_by_customer
Parameters
- '$createdResponse' (object) Created response object
- '$ticket' (object) Ticket object
- '$customer' (object) Customer object
Usage
add_action('fluent_support/response_added_by_customer', function ($createdResponse, $ticket, $customer) {
// ...do something
}, 10, 3);Reference
do_action('fluent_support/response_added_by_customer', $createdResponse, $ticket, $customer)
This action is located in fluent-support/app/Services/Tickets/ResponseService.php (as 'fluent_support/response_added_by_' . $sender->person_type),fluent-support-pro/app/Services/Integrations/FluentEmailPiping/ByMailHandler.php
fluent_support_ticket_merge
Parameters
- '$ticket' (object) Ticket data
- '$mergedTicket' (object) Ticket data that will be merged
Usage
add_action('fluent_support/ticket_merge', function ($ticket, $mergedTicket) {
// ...do something
}, 10, 2);Reference
do_action('fluent_support/ticket_merge', $ticket, $mergedTicket)
This action is located in fluent-support-pro/app/Services/ProTicketService.php
fluent_support_before_ticket_split
Parameters
- '$actualTicketId' (string) Ticket ID
- '$conversationId' (integer) Conversation ID
- 'data' (array) New ticket data
Usage
add_action('fluent_support/before_ticket_split', function ($actualTicketId, $conversationId, $data) {
// ...do something
}, 10, 3);Reference
do_action('fluent_support/before_ticket_split', $actualTicketId, $conversationId, $data)
This action is located in fluent-support-pro/app/Services/ProTicketService.php
fluent_support_after_ticket_split
Parameters
- '$actualTicketId' (string) Ticket ID
- '$newTicket' (object) Ticket data
Usage
add_action('fluent_support/after_ticket_split', function ($actualTicketId, $newTicket) {
// ...do something
}, 10, 2);Reference
do_action('fluent_support/after_ticket_split', $actualTicketId, $newTicket)
This action is located in fluent-support-pro/app/Services/ProTicketService.php
fluent_support_before_move_tickets
Parameters
- '$data' (array) Mailbox ID
- '$oldBox' (object) Current mailbox data
- '$newBox' (object) Data for the new mailbox where selected tickets will be moved
Usage
add_action('fluent_support/before_move_tickets', function ($data, $oldBox, $newBox) {
// ...do something
}, 10, 3);Reference
do_action('fluent_support/before_move_tickets', $data, $oldBox, $newBox)
This action is located in fluent-support/app/Services/MailerInbox/MailBoxService.php
fluent_support_tickets_moved
Parameters
- '$data' (array) Details about mailbox data
- '$oldBox' (object) Current mailbox data
- '$newBox' (object) Data for the new mailbox where selected tickets will be moved
Usage
add_action('fluent_support/tickets_moved', function ($data, $oldBox, $newBox) {
// ...do something
}, 10, 3);Reference
do_action('fluent_support/tickets_moved', $data, $oldBox, $newBox)
This action is located in fluent-support/app/Services/MailerInbox/MailBoxService.php
fluent_support_ticket_agent_change
Parameters
- '$ticket' (object) Ticket data
- '$person' (object) Person data
Usage
add_action('fluent_support/ticket_agent_change', function ($ticket, $person) {
// ...do something
}, 10, 2);Reference
do_action('fluent_support/ticket_agent_change', $ticket, $person)
This action is located in fluent-support/app/Services/Tickets/TicketService.php
fluent_support_ticket_deleted
Parameters
- '$agent' (object) Agent data
- '$ticketData' (array) Ticket data
Usage
add_action('fluent_support/ticket_deleted', function ($agent, $ticketData) {
// ...do something
}, 10, 2);Reference
do_action('fluent_support/ticket_deleted', $agent, $ticketData)
This action is located in fluent-support/app/Services/Tickets/TicketService.php
fluent_support_agent_assigned_to_ticket
Parameters
- '$agent' (object) The agent the ticket is now assigned to
- '$ticket' (object) Ticket object
- '$assigner' (object) The agent (or person) who made the assignment
- '$previousAgentId' (integer|null) ID of the agent the ticket was assigned to before. Not passed when a Pro workflow assigns the ticket, so give it a default.
Usage
add_action('fluent_support/agent_assigned_to_ticket', function ($agent, $ticket, $assigner, $previousAgentId = null) {
// ...do something
}, 10, 4);Reference
do_action('fluent_support/agent_assigned_to_ticket', $ticket->agent, $ticket, $assigner, $previousAgentId)
This action is located in fluent-support/app/Http/Controllers/TicketController.php,fluent-support/app/Services/Tickets/ResponseService.php,fluent-support/app/Hooks/Handlers/AsyncActionHandler.php,fluent-support/app/Modules/MCP/Helpers/MCPHelper.php,fluent-support-pro/app/Services/Workflow/ActionRunner.php
fluent_support_ticket_closed
Parameters
- '$ticket' (object) Ticket data
- '$person' (object) Person data
Usage
add_action('fluent_support/ticket_closed', function ($ticket, $person) {
// ...do something
}, 10, 2);Reference
do_action('fluent_support/ticket_closed', $ticket, $person)
This action is located in fluent-support/app/Services/Tickets/ResponseService.php,fluent-support/app/Services/Tickets/TicketService.php
fluent_support_after_ticket_closed_by_any_person
Parameters
- '$ticket' (object) Ticket data
- '$person' (object) Person data
Usage
add_action('fluent_support/ticket_closed_by_' . $person->person_type, function($ticket, $person) {
// Do your stuff here
}, 20, 2);Note: $person->person_type denotes the type of person, whether it be an agent, user, etc.
Reference
do_action('fluent_support/ticket_closed_by_' . $person->person_type, $ticket, $person)
This action is located in fluent-support/app/Services/Tickets/ResponseService.php,fluent-support/app/Services/Tickets/TicketService.php
fluent_support_ticket_reopen
Both reopen actions are fired by TicketService::fireReopenHooks(). TicketService::reopen() calls it right after the ticket is saved as active. When an MCP reply reopens a ticket, the reopen, reply and any assignment run in one database transaction, and the reopen actions fire only after that transaction commits, before the assignment and reply actions.
Parameters
- '$ticket' (object) Ticket data
- '$person' (object) Person data
Usage
add_action('fluent_support/ticket_reopen', function ($ticket, $person) {
// ...do something
}, 10, 2);Reference
do_action('fluent_support/ticket_reopen', $ticket, $person)
This action is located in fluent-support/app/Services/Tickets/TicketService.php (fireReopenHooks()), called from TicketService::reopen() and, after commit, fromfluent-support/app/Modules/MCP/Tools/ResponseTools.php
fluent_support_after_ticket_reopen_by_any_person
Parameters
- '$ticket' (object) Ticket data
- '$person' (object) Person data
Usage
add_action('fluent_support/ticket_reopen_by_' . $person->person_type, function($ticket, $person) {
// Do your stuff here
}, 20, 2);Note: $person->person_type denotes the type of person, whether it be an agent, user, etc.
Reference
do_action('fluent_support/ticket_reopen_by_' . $person->person_type, $ticket, $person)
This action is located in fluent-support/app/Services/Tickets/TicketService.php (fireReopenHooks()), called from TicketService::reopen() and, after commit, fromfluent-support/app/Modules/MCP/Tools/ResponseTools.php
fluent_support_response_added_by_agent
Parameters
- '$response' (object) The created response object
- '$ticket' (object) Ticket object
- '$person' (object) Person object who added the response
Usage
add_action('fluent_support/response_added_by_agent', function ($response, $ticket, $person) {
// ...do something
}, 10, 3);Reference
do_action('fluent_support/response_added_by_agent', $response, $ticket, $person)
It also fires when a draft reply is published (admin Approve or the MCP publish-draft-reply tool). Then $person is the draft's author, not the approver.
This action is located in fluent-support/app/Services/Tickets/ResponseService.php
fluent_support_agent_feedback_received
It fires when a reply gets a new rating, or when the customer switches the rating from like to dislike (or back). Clicking the same rating again removes it and fires nothing. Each rating value fires at most once per reply, so a reply can trigger this action at most twice (once for like, once for dislike). Clicking back and forth, or removing and re-adding a rating, does not fire it again. Only agent replies (response conversations written by an agent) can be rated.
Fluent Support Pro uses this action as the "On Customer Feedback" workflow trigger.
Parameters
- '$rating' (string)
likeordislike - '$conversation' (object) The rated reply (Conversation model)
- '$ticket' (object) Ticket data
- '$customer' (object) The customer who left the rating
Usage
add_action('fluent_support/agent_feedback_received', function ($rating, $conversation, $ticket, $customer) {
if ($rating === 'dislike') {
// ...flag the reply for review
}
}, 10, 4);Reference
do_action('fluent_support/agent_feedback_received', $rating, $conversation, $ticket, $ticket->customer)
This action is located in fluent-support/app/Services/CustomerPortalService.php
Admin Dashboard Actions
fluent_support_after_admin_app_loaded
Parameters
- '$app' (object) App Instance
Usage
add_action('fluent_support/admin_app_loaded', function ($app) {
// ...do something
}, 10, 1);Reference
do_action('fluent_support/admin_app_loaded', $app)
This action is located in fluent-support/app/Hooks/Handlers/Menu.php
fluent_support_when_admin_app_is_loading
Parameters
- '$app' (object) App Instance
Usage
add_action('fluent_support_loading_app', function ($app) {
// ...do something
}, 10, 1);Reference
do_action('fluent_support_loading_app', $app
This action is located in fluent-support/app/Hooks/Handlers/Menu.php
fluent_support_pro_loaded
Parameters
- '$app' (object) Application data
Usage
add_action('fluent_support_pro_loaded', function ($app) {
// ...do something
}, 10, 1);Reference
do_action('fluent_support_pro_loaded', $app)
This action is located in fluent-support-pro/fluent-support-pro.php
fluent_support_loaded
Parameters
- '$application' (object) Application data
Usage
add_action('fluent_support_loaded', function ($application) {
// ...do something
}, 10, 1);Reference
do_action('fluent_support_loaded', $application)
This action is located in fluent-support/boot/app.php
fluent_support_addons_loaded
Parameters
- '$application' (object) Application data
Usage
add_action('fluent_support_addons_loaded', function ($application) {
// ...do something
}, 10, 1);Reference
do_action('fluent_support_addons_loaded', $application)
This action is located in fluent-support/boot/app.php
Frontend Actions
fluent_support_before_signup_validation
Parameters
- '$formData' (array) User form data
Usage
add_action('fluent_support/before_signup_validation', function ($formData) {
// ...do something
}, 10, 1);Reference
do_action('fluent_support/before_signup_validation', $formData)
This action is located in fluent-support/app/Http/Controllers/AuthController.php
fluent_support_after_signup_validation
Parameters
- '$formData' (array) User form data
Usage
add_action('fluent_support/after_signup_validation', function ($formData) {
// ...do something
}, 10, 1);Reference
do_action('fluent_support/after_signup_validation', $formData)
This action is located in fluent-support/app/Http/Controllers/AuthController.php
fluent_support_after_creating_user
Usage
add_action('fluent_support/after_creating_user', function () {
// ...do something
});Reference
do_action('fluent_support/after_creating_user')
This action is located in fluent-support/app/Http/Controllers/AuthController.php
fluent_support_before_creating_user
Parameters
- '$userName' (string) Username of the user
- '$password' (string) Password for the user account
- '$email' (string) Email address associated with the user account
Usage
add_action('fluent_support/before_creating_user', function ($userName, $password, $email) {
// ...do something
}, 10, 3);Reference
do_action('fluent_support/before_creating_user', $userName, $password, $email)
This action is located in fluent-support/app/Http/Controllers/AuthController.php
fluent_support_before_updating_user
Parameters
- '$data' (array) User data
Usage
add_action('fluent_support/before_updating_user', function ($data) {
// ...do something
}, 10, 1);Reference
do_action('fluent_support/before_updating_user', $data)
This action is located in fluent-support/app/Http/Controllers/AuthController.php
fluent_support_after_updating_user
Parameters
- '$data' (array) User data
Usage
add_action('fluent_support/after_updating_user', function ($data) {
// ...do something
}, 10, 1);Reference
do_action('fluent_support/after_updating_user', $data)
This action is located in fluent-support/app/Http/Controllers/AuthController.php
fluent_support_before_logging_in_user
Parameters
- '$userId' (integer) User ID
Usage
add_action('fluent_support/before_logging_in_user', function ($userId) {
// ...do something
}, 10, 1);Reference
do_action('fluent_support/before_logging_in_user', $userId)
This action is located in fluent-support/app/Http/Controllers/AuthController.php
fluent_support_after_logging_in_user
Parameters
- '$userId' (integer) User ID
Usage
add_action('fluent_support/after_logging_in_user', function ($userId) {
// ...do something
}, 10, 1);Reference
do_action('fluent_support/after_logging_in_user', $userId)
This action is located in fluent-support/app/Http/Controllers/AuthController.php
fluent_support_after_customer_created
It fires from three places:
Customer::maybeCreateCustomer(), used by the customer portal, email piping, importers and the Fluent Forms and FluentCRM integrations whenever a ticket comes from an unknown emailTicketController::createTicket(), when an agent creates a ticket in the admin for a new customer- the MCP
create-tickettool (TicketTools::createTicket()), when an AI agent opens a ticket for an email that has no customer yet
Parameters
- '$customer' (object) Customer data
Usage
add_action('fluent_support/customer_created', function ($customer) {
// ...do something
}, 10, 1);Reference
do_action('fluent_support/customer_created', $customer)
This action is located in fluent-support/app/Models/Customer.php,fluent-support/app/Http/Controllers/TicketController.php,fluent-support/app/Modules/MCP/Tools/TicketTools.php
Other Useful Actions
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/Http/Controllers/AuthController.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/Http/Controllers/AuthController.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/Hooks/Handlers/WorkflowHandler.php,fluent-support-pro/app/Http/Controllers/WorkflowsController.php
fluent_support_customer_created
Parameters
- '$customer' (object) Customer object
Usage
add_action('fluent_support/customer_created', function ($customer) {
// ...do something
}, 10, 1);Reference
do_action('fluent_support/customer_created', $customer)
This action is located in fluent-support/app/Models/Customer.php,fluent-support/app/Http/Controllers/TicketController.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/Services/MailerInbox/MailBoxService.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/Services/MailerInbox/MailBoxService.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/app/Services/ThirdParty/HandleTelegramEvent.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/Services/Integrations/WebhookSignatureVerifier.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/Http/Controllers/TicketController.php,fluent-support/app/Hooks/Handlers/PermissionFilterManager.php,fluent-support/app/Services/Notifications/NotificationQueryService.php,fluent-support/app/Modules/MCP/Tools/ManagementTools.php, CustomerTools.php, TicketTools.php,fluent-support-pro/app/Http/Controllers/WorkflowsController.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/Http/Controllers/CustomerPortalController.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/TicketQueryService.php,fluent-support/app/Services/Notifications/NotificationQueryService.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 Pro Actions
Email Piping Actions
fluent_support_pro_email_bounced
Parameters
- '$ticket' (object) The ticket whose email bounced
- '$bounce' (array) Bounce details:
recipient,action,status,diagnostic,reporting_mta,original_*(any may be missing)
Usage
add_action('fluent_support_pro/email_bounced', function ($ticket, $bounce) {
// ...do something
}, 10, 2);Reference
do_action('fluent_support_pro/email_bounced', $ticket, $bounce)
This action is located in fluent-support-pro/app/Services/Integrations/FluentEmailPiping/AutoMailHandler.php
fluent_support_pro_email_auto_reply_received
Parameters
- '$ticket' (object) The ticket the auto-reply threads to
- '$senderEmail' (string) Sender email address
Usage
add_action('fluent_support_pro/email_auto_reply_received', function ($ticket, $senderEmail) {
// ...do something
}, 10, 2);Reference
do_action('fluent_support_pro/email_auto_reply_received', $ticket, $senderEmail)
This action is located in fluent-support-pro/app/Services/Integrations/FluentEmailPiping/AutoMailHandler.php
fluent_support_pro_email_piping_dropped
Parameters
- '$kind' (string)
auto_replyorbounce - '$data' (array) Raw pipe payload
- '$senderEmail' (string) Sender email address
- '$box' (object) The
MailBoxthe email arrived at
Usage
add_action('fluent_support_pro/email_piping_dropped', function ($kind, $data, $senderEmail, $box) {
// ...do something
}, 10, 4);Reference
do_action('fluent_support_pro/email_piping_dropped', $kind, $data, $senderEmail, $box)
This action is located in fluent-support-pro/app/Services/Integrations/FluentEmailPiping/AutoMailHandler.php
fluent_support_pro_auto_reply_suppressed
Parameters
- '$customerId' (integer) Customer ID
- '$subject' (string) Ticket subject
Usage
add_action('fluent_support_pro/auto_reply_suppressed', function ($customerId, $subject) {
// ...do something
}, 10, 2);Reference
do_action('fluent_support_pro/auto_reply_suppressed', $customerId, $subject)
This action is located in fluent-support-pro/app/Services/Integrations/FluentEmailPiping/AutoReplyGuard.php
