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
- '$ticket' (object) Ticket object
- '$customer' (object) Customer object
Usage
add_action('fluent_support/before_ticket_create', function ($ticket, $customer) {
// ...do something
}, 20, 2);
Reference
do_action('fluent_support/before_ticket_create', $ticketData, $customer)
This action is located in fluent-support/app/Http/Services/CustomerPortalService.php
,fluent-support/app/Http/Models/Ticket.php
,fluent-support/app/Services/Integrations/FluentForm/FeedIntegration
,fluent-support/app/Services/Integrations/FluentCrm/CreateTicketAction
,fluent-support-pro/app/Services/Integrations/FluentEmailPiping/ByMailHandler
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/Http/Services/CustomerPortalService.php
,fluent-support/app/Http/Models/Ticket.php
,fluent-support/app/Services/Integrations/FluentForm/FeedIntegration
,fluent-support/app/Services/Integrations/FluentCrm/CreateTicketAction
,fluent-support-pro/app/Services/Integrations/FluentEmailPiping/ByMailHandler
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_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
- '$ticket' (integer) Ticket data
- '$customer' (object) Customer data
- '$agent' (object) Agent data
Usage
add_action('fluent_support/agent_assigned_to_ticket', function ($ticket, $customer, $agent) {
// ...do something
}, 10, 3);
Reference
do_action('fluent_support/agent_assigned_to_ticket', $ticket->agent, $ticket, $assigner)
This action is located in fluent-support/app/Models/Ticket.php
,fluent-support/app/Services/Tickets/ResponseService.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/Models/ResponseService.php
,fluent-support/app/Services/Tickets/TicketService.php
fluent_support_ticket_reopen
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
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
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
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
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_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.
Reference
do_action('fluent_support/' . $conversationType . '_added_by_' . $person->person_type, $response, $ticket, $person)
This action is located in fluent-support/app/Models/Conversation.php
,fluent-support/app/Services/Tickets/ResponseService.php
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_delete_remote_attachment_third_party_in_use
Parameters
- '$attachment' (object) attachment data
- '$ticketID' (integer) Ticket ID
Usage
add_action('fluent_support/delete_remote_attachment_' . $attachment->driver, function ($attachment,$ticketID) {
// ...do something
}, 10, 2);
Note: $attachment->driver
the type of person, whether it be an agent, user, etc.
Reference
do_action('fluent_support/delete_remote_attachment_' . $attachment->driver, $attachment, $ticket->id)
This action is located in fluent-support/app/Hooks/CleanupHandler.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