Below are the global hooks from the helper/global file you uploaded.
Email Message Hooks
nextcrm/message/to
nextcrm/message/from
nextcrm/message/subject
nextcrm/message/body
nextcrm_email_open_enable
nextcrm_email_open_url
nextcrm/default_email_tags
Contact Data Hooks
nextcrm/contact/types
nextcrm/contact/status
nextcrm/tags
nextcrm/lists
nextcrm/additional/meta_keys
nextcrm/contact/properties
nextcrm/contact/display/columns
Settings Hooks
nextcrm_admin_role
nextcrm/settings/tabs
nextcrm/settings/data
nextcrm/settings/contact/data
nextcrm/settings/campaign/data
nextcrm/settings/automation/data
nextcrm/settings/form_setting/data
nextcrm/settings/integration_settings/data
Builder / Field Hooks
nextcrm/fields/mapping
nextcrm/form/settings
nextcrm/operators
nextcrm/user/meta/properties
nextcrm_comment_types
Automation Global Hooks
nextcrm/automation/hook
nextcrm/automation/hook/action
nextcrm/automation/hook/action/wordpress
nextcrm/automation/hook/action/wordpress/actions
nextcrm/automation/hook/crm
nextcrm/automation/hook/crm/actions
nextcrm/automation/hook/condition
nextcrm/automation/hook/condition/wordpress
nextcrm/automation/hook/condition/wordpress/actions
nextcrm/automation/hook/condition/crm
nextcrm/automation/hook/condition/crm/actions
nextcrm/automation/hook/condition/form
nextcrm/automation/hook/condition/form/actions
nextcrm/automation/hook/goal
nextcrm/automation/hook/goal/crm
nextcrm/automation/hook/goal/crm/actions
nextcrm/automation/hook/goal/email
nextcrm/automation/hook/goal/email/actions
nextcrm/automation/hook/goal/sms
nextcrm/automation/hook/goal/sms/actions
nextcrm/automation/hook/goal/wordpress
nextcrm/automation/hook/goal/wordpress/actions
nextcrm/automation/check_property_value
nextcrm_automation_run_goal_action
Import / Export / Migration Hooks
nextcrm/import/contact/mapping
nextcrm/export/mapping
nextcrm/import/mapping
nextcrm/migration/mapping
AI / Integration / Webhook Hooks
nextcrm/settings/chatgpt/model
nextcrm/settings/gemini/model
nextcrm/settings/deepseek/model
nextcrm/settings/kimi/model
nextcrm/webhook/events
nextcrm/message/to
Allows developers to modify the recipient email before sending. This runs inside nextcrm_email_send() before validation and before wp_mail() is called.
Code Ref
$email = apply_filters( 'nextcrm/message/to', $email, $campaign_id, $contact_id );
Type
Filter
Parameters
| Parameter | Type | Description |
|---|---|---|
$email | string | Recipient email address. |
$campaign_id | int | Campaign, automation, or sequence ID depending on context. |
$contact_id | int | Contact ID. |
Return
string
Example Usage
add_filter('nextcrm/message/to', 'my_nextcrm_test_recipient', 10, 3);
function my_nextcrm_test_recipient($email, $campaign_id, $contact_id) {
if (defined('WP_DEBUG') && WP_DEBUG) {
return '[email protected]';
}
return $email;
}
nextcrm/message/from
Allows developers to modify the sender email before the email is sent.
Code Ref
$sender_email = apply_filters( 'nextcrm/message/from', $sender_email, $campaign_id, $contact_id );
Type
Filter
Parameters
| Parameter | Type | Description |
|---|---|---|
$sender_email | string | Sender email address. |
$campaign_id | int | Campaign ID. |
$contact_id | int | Contact ID. |
Return
string
Example Usage
add_filter('nextcrm/message/from', 'my_nextcrm_sender_email', 10, 3);
function my_nextcrm_sender_email($sender_email, $campaign_id, $contact_id) {
return '[email protected]';
}
nextcrm/message/subject
Allows developers to modify the final email subject after merge tags are replaced.
Code Ref
$subject = apply_filters( 'nextcrm/message/subject', $raw_subject, $campaign_id, $contact_id );
Type
Filter
Parameters
| Parameter | Type | Description |
|---|---|---|
$raw_subject | string | Email subject after tag replacement. |
$campaign_id | int | Campaign ID. |
$contact_id | int | Contact ID. |
Return
string
Example Usage
add_filter('nextcrm/message/subject', 'my_nextcrm_subject_prefix', 10, 3);
function my_nextcrm_subject_prefix($subject, $campaign_id, $contact_id) {
return '[ThemeDev] ' . $subject;
}
nextcrm/message/body
Allows developers to modify the final email body after merge tags are replaced.
Code Ref
$message = apply_filters( 'nextcrm/message/body', $raw_message, $campaign_id, $contact_id );
Type
Filter
Parameters
| Parameter | Type | Description |
|---|---|---|
$raw_message | string | Email HTML body after tag replacement. |
$campaign_id | int | Campaign ID. |
$contact_id | int | Contact ID. |
Return
string
Example Usage
add_filter('nextcrm/message/body', 'my_nextcrm_add_footer_note', 10, 3);
function my_nextcrm_add_footer_note($message, $campaign_id, $contact_id) {
$message .= '<p style="font-size:12px;color:#666;">Sent with NextCRM.</p>';
return $message;
}
nextcrm_email_open_enable
Controls whether NextCRM adds the open tracking pixel to emails.
Code Ref
if( apply_filters('nextcrm_email_open_enable', $enable_logs) == 'yes' && !empty($tracking_id)){
Type
Filter
Parameters
| Parameter | Type | Description |
|---|---|---|
$enable_logs | string | Tracking status. Usually yes or no. |
Return
string
Example Usage
add_filter('nextcrm_email_open_enable', 'my_disable_open_tracking');
function my_disable_open_tracking($enable_logs) {
return 'no';
}
nextcrm_email_open_url
Allows developers to customize the tracking pixel base URL.
Code Ref
$pixel_url = apply_filters('nextcrm_email_open_url', $tracking_server) . "?nextcrm_open=" . rawurlencode($tracking_id);
Type
Filter
Parameters
| Parameter | Type | Description |
|---|---|---|
$tracking_server | string | Base tracking URL. |
Return
string
Example Usage
add_filter('nextcrm_email_open_url', 'my_nextcrm_tracking_domain');
function my_nextcrm_tracking_domain($tracking_server) {
return 'https://track.example.com/';
}
nextcrm/default_email_tags
Allows developers to add or modify default email tags such as subscriber, unsubscribe, and confirmation links. The file creates default tags for {{subscriber_link}}, {{unsubscribe_link}}, and {{confirmation_link}}, then passes them through this filter.
Code Ref
return apply_filters('nextcrm/default_email_tags', $tags, $email, $tracki_id);
Type
Filter
Parameters
| Parameter | Type | Description |
|---|---|---|
$tags | array | Default email merge tags. |
$email | string | Subscriber email. |
$tracki_id | string | Tracking ID. |
Return
array
Example Usage
add_filter('nextcrm/default_email_tags', 'my_nextcrm_custom_email_tags', 10, 3);
function my_nextcrm_custom_email_tags($tags, $email, $tracking_id) {
$tags['{{support_link}}'] = home_url('/support/');
$tags['{{profile_email}}'] = $email;
return $tags;
}
nextcrm/contact/types
Allows developers to customize available contact types.
Code Ref
return apply_filters('nextcrm/contact/types', [
'contact' => esc_html__('Contact', 'nextcrm'),
'customer' => esc_html__('Customer', 'nextcrm'),
'lead' => esc_html__('Lead', 'nextcrm'),
'partner' => esc_html__('Partner', 'nextcrm'),
'client' => esc_html__('Client', 'nextcrm'),
'other' => esc_html__('Other', 'nextcrm')
]);
The same filter is also applied when contact types are loaded from saved options.
Type
Filter
Parameters
| Parameter | Type | Description |
|---|---|---|
$types | array | Contact type key/value list. |
Return
array
Example Usage
add_filter('nextcrm/contact/types', 'my_nextcrm_contact_types');
function my_nextcrm_contact_types($types) {
$types['agency_client'] = 'Agency Client';
$types['trial_user'] = 'Trial User';
return $types;
}
nextcrm/contact/status
Allows developers to customize available contact statuses.
Code Ref
return apply_filters('nextcrm/contact/status', [
'subscribed' => esc_html__('Subscribed', 'nextcrm'),
'bounced' => esc_html__('Bounced', 'nextcrm'),
'complained' => esc_html__('Complained', 'nextcrm'),
'pending' => esc_html__('Pending', 'nextcrm'),
'unsubscribed' => esc_html__('Unsubscribed', 'nextcrm'),
]);
Type
Filter
Parameters
| Parameter | Type | Description |
|---|---|---|
$statuses | array | Contact status key/value list. |
Return
array
Example Usage
add_filter('nextcrm/contact/status', 'my_nextcrm_contact_statuses');
function my_nextcrm_contact_statuses($statuses) {
$statuses['vip'] = 'VIP';
$statuses['cold'] = 'Cold Lead';
return $statuses;
}
nextcrm/tags
Allows developers to modify the global tags list returned by nextcrm_get_tags().
Code Ref
return apply_filters('nextcrm/tags', $options);
Type
Filter
Parameters
| Parameter | Type | Description |
|---|---|---|
$options | array | Tags list. |
Return
array
Example Usage
add_filter('nextcrm/tags', 'my_nextcrm_tags');
function my_nextcrm_tags($tags) {
$tags['high_value'] = 'High Value';
return $tags;
}
nextcrm/lists
Allows developers to modify the global lists returned by nextcrm_get_lists().
Code Ref
return apply_filters('nextcrm/lists', $options);
Type
Filter
Parameters
| Parameter | Type | Description |
|---|---|---|
$options | array | Lists array. |
Return
array
Example Usage
add_filter('nextcrm/lists', 'my_nextcrm_lists');
function my_nextcrm_lists($lists) {
$lists['partners'] = 'Partners';
return $lists;
}
nextcrm/additional/meta_keys
Controls which additional contact fields are saved as contact meta.
Code Ref
return apply_filters('nextcrm/additional/meta_keys', [
'mobile', 'suorce', 'date_of_birth', 'gender', 'address', 'city', 'state', 'zip', 'country'
]);
Type
Filter
Parameters
| Parameter | Type | Description |
|---|---|---|
$keys | array | Additional field keys. |
Return
array
Example Usage
add_filter('nextcrm/additional/meta_keys', 'my_nextcrm_additional_meta_keys');
function my_nextcrm_additional_meta_keys($keys) {
$keys[] = 'company';
$keys[] = 'job_title';
return $keys;
}
Code Note
There is a spelling issue in the default array:
'suorce'
Recommended correction:
'source'
nextcrm/contact/properties
Controls the contact properties available in automation conditions, import mapping, and field updates.
Code Ref
$properties = apply_filters('nextcrm/contact/properties', [
'contact_type' => esc_html__('Contact Type', 'nextcrm'),
'rating' => esc_html__('Rating', 'nextcrm'),
'status' => esc_html__('Status', 'nextcrm'),
'additional|address' => esc_html__('Address', 'nextcrm'),
'additional|city' => esc_html__('City', 'nextcrm'),
]);
The file includes many default properties such as address, city, region, country, company, website, mobile, timezone, date of birth, gender, source, and age.
Type
Filter
Parameters
| Parameter | Type | Description |
|---|---|---|
$properties | array | Contact property key/value list. |
Return
array
Example Usage
add_filter('nextcrm/contact/properties', 'my_nextcrm_contact_properties');
function my_nextcrm_contact_properties($properties) {
$properties['additional|industry'] = 'Industry';
$properties['meta|lifetime_value'] = 'Lifetime Value';
return $properties;
}
nextcrm/contact/display/columns
Controls which contact columns are available in Contact Settings.
Code Ref
'options' => apply_filters('nextcrm/contact/display/columns', [
[
'value' => 'first_name',
'label' => esc_html__('Name', 'nextcrm'),
],
[
'value' => 'email_address',
'label' => esc_html__('Email Address', 'nextcrm'),
],
])
This filter is inside the global settings data structure.
Type
Filter
Parameters
| Parameter | Type | Description |
|---|---|---|
$columns | array | Contact display column options. |
Return
array
Example Usage
add_filter('nextcrm/contact/display/columns', 'my_nextcrm_contact_columns');
function my_nextcrm_contact_columns($columns) {
$columns[] = [
'value' => 'additional|company',
'label' => 'Company',
];
return $columns;
}
nextcrm/settings/tabs
Allows developers to modify the NextCRM settings tab structure.
Code Ref
return apply_filters('nextcrm/settings/tabs', [
'general' => esc_html__( $option['general_label'] ?? 'General', 'nextcrm'),
'list' => esc_html__($option['list_label'] ?? 'Lists', 'nextcrm'),
'tags' => esc_html__($option['tags_label'] ?? 'Tags', 'nextcrm'),
]);
Type
Filter
Parameters
| Parameter | Type | Description |
|---|---|---|
$tabs | array | Settings tabs and sub-tabs. |
Return
array
Example Usage
add_filter('nextcrm/settings/tabs', 'my_nextcrm_settings_tabs');
function my_nextcrm_settings_tabs($tabs) {
$tabs['developer'] = 'Developer';
return $tabs;
}
nextcrm/settings/data
This is the main global settings filter. It wraps all settings groups.
Code Ref
return apply_filters('nextcrm/settings/data', [
'contact_settings' => apply_filters('nextcrm/settings/contact/data', [
// contact settings
]),
// campaign, automation, form, integration settings
]);
The global settings array also contains nested filters for contact, campaign, automation, form, and integration settings.
Type
Filter
Parameters
| Parameter | Type | Description |
|---|---|---|
$settings | array | Full NextCRM settings structure. |
Return
array
Example Usage
add_filter('nextcrm/settings/data', 'my_nextcrm_global_settings');
function my_nextcrm_global_settings($settings) {
$settings['developer_settings'] = [
[
'title' => 'Developer',
'id' => 'developer_basic',
'fields' => [
[
'name' => 'debug_mode',
'type' => 'switch',
'label' => 'Debug Mode',
'default' => 'no',
],
],
],
];
return $settings;
}
Settings Section Filters
These filters let developers extend only one settings area instead of the full settings array.
Hook List
nextcrm/settings/contact/data
nextcrm/settings/campaign/data
nextcrm/settings/automation/data
nextcrm/settings/form_setting/data
nextcrm/settings/integration_settings/data
Type
Filter
Parameters
| Parameter | Type | Description |
|---|---|---|
$section_settings | array | Settings fields for that section. |
Return
array
Example Usage
add_filter('nextcrm/settings/contact/data', 'my_nextcrm_contact_settings');
function my_nextcrm_contact_settings($settings) {
$settings[] = [
'title' => 'Custom Contact Settings',
'id' => 'custom_contact',
'fields' => [
[
'name' => 'enable_custom_score',
'type' => 'switch',
'label' => 'Enable Custom Score',
'default' => 'no',
],
],
];
return $settings;
}
nextcrm/fields/mapping
Controls the global field mapping used by the NextCRM form builder. The file defines general fields like email, input, radio, checkbox, dropdown, textarea, and content fields like heading, paragraph, image, button, link, and list, then passes the full structure through this filter.
Code Ref
return apply_filters('nextcrm/fields/mapping', [
'general' => [
'label' => esc_html__('General', 'nextcrm'),
'desc' => esc_html__('General fields.', 'nextcrm'),
'fields' => [
// fields
],
],
'content' => [
'label' => esc_html__('Contents', 'nextcrm'),
'fields' => [
// content fields
],
],
]);
Type
Filter
Parameters
| Parameter | Type | Description |
|---|---|---|
$mapping | array | Form builder field groups and controls. |
Return
array
Example Usage
add_filter('nextcrm/fields/mapping', 'my_nextcrm_custom_form_field');
function my_nextcrm_custom_form_field($mapping) {
$mapping['general']['fields']['company'] = [
'title' => 'Company',
'desc' => 'Company name field.',
'type' => 'input',
'icon' => nextcrm_core()->images . 'forms/input.svg',
'attributes' => [
'type' => 'text',
'name' => 'company',
'label' => 'Company',
'placeholder' => 'Enter company name',
],
];
return $mapping;
}
nextcrm/form/settings
Controls global form settings.
Code Ref
return apply_filters('nextcrm/form/settings', [
// form settings array
]);
Type
Filter
Parameters
| Parameter | Type | Description |
|---|---|---|
$settings | array | Form settings structure. |
Return
array
Example Usage
add_filter('nextcrm/form/settings', 'my_nextcrm_form_settings');
function my_nextcrm_form_settings($settings) {
$settings['custom'] = [
'enable_custom_validation' => 'yes',
];
return $settings;
}
nextcrm/operators
Controls the operators available for conditions.
Code Ref
return apply_filters('nextcrm/operators', [
'equals' => esc_html__('Equals', 'nextcrm'),
'not_equals' => esc_html__('Not Equals', 'nextcrm'),
'greater_than' => esc_html__('Greater Than', 'nextcrm'),
'less_than' => esc_html__('Less Than', 'nextcrm'),
'contains' => esc_html__('Contains', 'nextcrm'),
'not_contains' => esc_html__('Not Contains', 'nextcrm'),
]);
Type
Filter
Parameters
| Parameter | Type | Description |
|---|---|---|
$operators | array | Condition operators. |
Return
array
Example Usage
add_filter('nextcrm/operators', 'my_nextcrm_custom_operator');
function my_nextcrm_custom_operator($operators) {
$operators['regex_match'] = 'Regex Match';
return $operators;
}
nextcrm/user/meta/properties
Controls WordPress user meta properties available in automation conditions or actions.
Code Ref
return apply_filters('nextcrm/user/meta/properties', [
'nickname' => esc_html__('Name', 'nextcrm'),
'first_name' => esc_html__('First Name', 'nextcrm'),
'last_name' => esc_html__('Last Name', 'nextcrm'),
'email_address' => esc_html__('Email', 'nextcrm'),
'wp_capabilities'=> esc_html__('Capabilities', 'nextcrm'),
]);
Type
Filter
Parameters
| Parameter | Type | Description |
|---|---|---|
$properties | array | User meta/property options. |
Return
array
Example Usage
add_filter('nextcrm/user/meta/properties', 'my_nextcrm_user_properties');
function my_nextcrm_user_properties($properties) {
$properties['custom_membership_level'] = 'Membership Level';
return $properties;
}
nextcrm_comment_types
Allows developers to add custom comment types for automation triggers and conditions.
Code Ref
$comment_types = apply_filters( 'nextcrm_comment_types', $comment_types );
Type
Filter
Parameters
| Parameter | Type | Description |
|---|---|---|
$comment_types | array | Comment type options. |
Return
array
Example Usage
add_filter('nextcrm_comment_types', 'my_nextcrm_comment_types');
function my_nextcrm_comment_types($types) {
$types['product_question'] = 'Product Question';
return $types;
}
nextcrm/automation/check_property_value
Allows developers to return a custom property value when the automation condition checker does not match a built-in action type.
Code Ref
return apply_filters(
'nextcrm/automation/check_property_value',
'',
$contact_id,
$property,
$action_item,
$rule_value
);
Type
Filter
Parameters
| Parameter | Type | Description |
|---|---|---|
$value | mixed/string | Default value. Empty by default. |
$contact_id | int | Contact ID. |
$property | string | Property key being checked. |
$action_item | string | Condition/action type. |
$rule_value | mixed | Rule value from automation condition. |
Return
mixed
Example Usage
add_filter('nextcrm/automation/check_property_value', 'my_nextcrm_custom_condition_value', 10, 5);
function my_nextcrm_custom_condition_value($value, $contact_id, $property, $action_item, $rule_value) {
if ($action_item === 'check_membership_level') {
return nextcrm_get_contact_meta($contact_id, 'membership_level', '');
}
return $value;
}
nextcrm_automation_run_goal_action
Runs after NextCRM processes an automation goal action. This is a global action hook for listening to automation execution. The file fires this action after the internal switch statement handles goals such as add tag, remove tag, update field, send email, send SMS, create WP user, and more.
Code Ref
do_action( 'nextcrm_automation_run_goal_action', $contact_id, $item, $action );
Type
Action
Parameters
| Parameter | Type | Description |
|---|---|---|
$contact_id | int | Contact ID. |
$item | array | Automation map item/action data. |
$action | string | Goal action key. |
Example Usage
add_action('nextcrm_automation_run_goal_action', 'my_nextcrm_after_goal_action', 10, 3);
function my_nextcrm_after_goal_action($contact_id, $item, $action) {
error_log("Automation action {$action} executed for contact {$contact_id}");
}
Use Cases
// Log automation goal execution
// Push goal actions to webhook
// Debug automation action flow
// Track custom automation analytics
nextcrm/automation/hook
This is the main automation hook registry filter. It returns all automation trigger, condition, and goal groups. The file uses many nested filters so developers can modify the full automation system or only a specific group.
Code Ref
return apply_filters('nextcrm/automation/hook', [
'action' => apply_filters('nextcrm/automation/hook/action', []),
'condition' => apply_filters('nextcrm/automation/hook/condition', []),
'goal' => apply_filters('nextcrm/automation/hook/goal', []),
]);
Type
Filter
Parameters
| Parameter | Type | Description |
|---|---|---|
$hooks | array | Complete automation hook registry. |
Return
array
Example Usage
add_filter('nextcrm/automation/hook', 'my_nextcrm_automation_registry');
function my_nextcrm_automation_registry($hooks) {
// Modify full automation registry here
return $hooks;
}
Automation Action Group Filters
These filters customize automation trigger/action groups.
Hook List
nextcrm/automation/hook/action
nextcrm/automation/hook/action/wordpress
nextcrm/automation/hook/action/wordpress/actions
nextcrm/automation/hook/crm
nextcrm/automation/hook/crm/actions
The file defines WordPress automation actions such as user create/update/delete, post create/update/delete, post meta update, comment create/update/delete, and NextCRM actions such as new contact, update contact, delete contact, add/remove list, add/remove tag, and change status.
Example: Add Custom Automation Trigger
add_filter('nextcrm/automation/hook/action/wordpress/actions', 'my_nextcrm_custom_trigger');
function my_nextcrm_custom_trigger($actions) {
$actions['my_custom_event'] = [
'label' => 'My Custom Event',
'desc' => 'Runs when my custom event happens.',
'img' => nextcrm_core()->image . 'icon/wordpress/create-post.svg',
'type' => 'my_custom_event',
'hook' => 'my_custom_event_hook',
'hook_type' => 'action',
'hook_priority' => 10,
'hook_args' => 2,
'hook_callback' => '\MyPlugin\Automation::instance|handle_custom_event',
'fields' => [],
];
return $actions;
}
Automation Condition Group Filters
These filters customize automation conditions.
Hook List
nextcrm/automation/hook/condition
nextcrm/automation/hook/condition/wordpress
nextcrm/automation/hook/condition/wordpress/actions
nextcrm/automation/hook/condition/crm
nextcrm/automation/hook/condition/crm/actions
nextcrm/automation/hook/condition/form
nextcrm/automation/hook/condition/form/actions
The file includes WordPress conditions like post meta, post status, post type, user meta, CRM conditions like selected lists/tags and contact properties, and form conditions like submitted through selected forms.
Example: Add Custom CRM Condition
add_filter('nextcrm/automation/hook/condition/crm/actions', 'my_nextcrm_custom_condition');
function my_nextcrm_custom_condition($conditions) {
$conditions['check_membership_level'] = [
'label' => 'Check Membership Level',
'desc' => 'Check contact membership level.',
'img' => nextcrm_core()->image . 'icon/condition/crm/check-contacts-properties.svg',
'type' => 'check_membership_level',
'fields' => [
'dataset' => [
[
'membership_level' => [
'label' => 'Membership Level',
'type' => 'text',
],
],
],
],
];
return $conditions;
}
Automation Goal Group Filters
These filters customize automation goal/action steps.
Hook List
nextcrm/automation/hook/goal
nextcrm/automation/hook/goal/crm
nextcrm/automation/hook/goal/crm/actions
nextcrm/automation/hook/goal/email
nextcrm/automation/hook/goal/email/actions
nextcrm/automation/hook/goal/sms
nextcrm/automation/hook/goal/sms/actions
nextcrm/automation/hook/goal/wordpress
nextcrm/automation/hook/goal/wordpress/actions
The file defines CRM goals such as delay, add/remove tag, add/remove list, update field, update status, send email, send campaign email, set/cancel sequence, cancel automation, delete contact, create/update WordPress user, send SMS, and end funnel.
Example: Add Custom Goal Action
add_filter('nextcrm/automation/hook/goal/crm/actions', 'my_nextcrm_custom_goal');
function my_nextcrm_custom_goal($goals) {
$goals['send_internal_alert'] = [
'label' => 'Send Internal Alert',
'desc' => 'Send an internal alert to the team.',
'img' => nextcrm_core()->image . 'icon/action/crm/add-notes.svg',
'type' => 'send_internal_alert',
'fields' => [
'message' => [
'label' => 'Message',
'type' => 'textarea',
],
],
];
return $goals;
}
nextcrm/automation/hook/goal/crm/delay/wait_custom_field
Controls which custom fields are available for the automation delay “Wait by Custom Field” option.
Code Ref
'options' => apply_filters('nextcrm/automation/hook/goal/crm/delay/wait_custom_field', [
'additional|date_of_birth' => esc_html__('Date of Birth', 'nextcrm'),
]),
Type
Filter
Parameters
| Parameter | Type | Description |
|---|---|---|
$fields | array | Custom fields available for delay timing. |
Return
array
Example Usage
add_filter('nextcrm/automation/hook/goal/crm/delay/wait_custom_field', 'my_nextcrm_delay_fields');
function my_nextcrm_delay_fields($fields) {
$fields['additional|renewal_date'] = 'Renewal Date';
$fields['additional|appointment_date'] = 'Appointment Date';
return $fields;
}
nextcrm/import/contact/mapping
Controls CSV import contact field mapping.
Code Ref
$properties = apply_filters('nextcrm/import/contact/mapping', [
'email_address' => esc_html__('Email', 'nextcrm'),
'first_name' => esc_html__('First Name', 'nextcrm'),
'last_name' => esc_html__('Last Name', 'nextcrm'),
]);
The file includes email, first name, last name, contact type, status, mobile, address, city, state, zip, region, country, company, website, timezone, date of birth, gender, source, and age.
Type
Filter
Parameters
| Parameter | Type | Description |
|---|---|---|
$mapping | array | Import field mapping. |
Return
array
Example Usage
add_filter('nextcrm/import/contact/mapping', 'my_nextcrm_import_mapping');
function my_nextcrm_import_mapping($mapping) {
$mapping['additional|industry'] = 'Industry';
$mapping['additional|lead_source'] = 'Lead Source';
return $mapping;
}
nextcrm/export/mapping
Controls available export groups.
Code Ref
return apply_filters('nextcrm/export/mapping', [
'list' => [
'title' => esc_html__('Lists', 'nextcrm'),
],
'tags' => [
'title' => esc_html__('Tags', 'nextcrm'),
],
'contacts' => [
'title' => esc_html__('Contacts', 'nextcrm'),
],
'automations' => [
'title' => esc_html__('Automations', 'nextcrm'),
],
]);
Type
Filter
Parameters
| Parameter | Type | Description |
|---|---|---|
$mapping | array | Export module mapping. |
Return
array
Example Usage
add_filter('nextcrm/export/mapping', 'my_nextcrm_export_mapping');
function my_nextcrm_export_mapping($mapping) {
$mapping['custom_logs'] = [
'count' => 0,
'title' => 'Custom Logs',
'desc' => 'Export custom logs.',
'options' => [],
];
return $mapping;
}
nextcrm/import/mapping
Controls available import groups.
Code Ref
return apply_filters('nextcrm/import/mapping', [
'list' => [
'title' => esc_html__('Lists', 'nextcrm'),
],
'tags' => [
'title' => esc_html__('Tags', 'nextcrm'),
],
'automations' => [
'title' => esc_html__('Automations', 'nextcrm'),
],
]);
Type
Filter
Parameters
| Parameter | Type | Description |
|---|---|---|
$mapping | array | Import module mapping. |
Return
array
Example Usage
add_filter('nextcrm/import/mapping', 'my_nextcrm_import_groups');
function my_nextcrm_import_groups($mapping) {
$mapping['custom_data'] = [
'title' => 'Custom Data',
'desc' => 'Import custom data from CSV.',
'options' => [],
];
return $mapping;
}
nextcrm/migration/mapping
Controls available migration sources. The file defines a migration source for previous NextCRM data and passes it through this filter.
Code Ref
return apply_filters('nextcrm/migration/mapping', [
'old_nextcrm' => [
'title' => esc_html__('Previous NextCRM', 'nextcrm'),
'logo' => esc_url(nextcrm_core()->image . 'nextcrm.png'),
],
]);
Type
Filter
Parameters
| Parameter | Type | Description |
|---|---|---|
$mapping | array | Migration source mapping. |
Return
array
Example Usage
add_filter('nextcrm/migration/mapping', 'my_nextcrm_migration_source');
function my_nextcrm_migration_source($mapping) {
$mapping['my_old_crm'] = [
'title' => 'My Old CRM',
'logo' => plugin_dir_url(__FILE__) . 'assets/my-crm.png',
'desc' => 'Import data from My Old CRM.',
'migration_data' => [],
'total_data' => [],
];
return $mapping;
}
AI Model Filters
These filters control available AI model options in settings.
Hook List
nextcrm/settings/chatgpt/model
nextcrm/settings/gemini/model
nextcrm/settings/deepseek/model
nextcrm/settings/kimi/model
Type
Filter
Parameters
| Parameter | Type | Description |
|---|---|---|
$models | array | Available model list. |
Return
array
Example Usage
add_filter('nextcrm/settings/chatgpt/model', 'my_nextcrm_chatgpt_models');
function my_nextcrm_chatgpt_models($models) {
$models['gpt-custom'] = 'GPT Custom';
return $models;
}
nextcrm/webhook/events
Controls available webhook trigger events. The file includes events for new contact, update contact, delete contact, add/remove tag, add/remove list, and update contact status.
Code Ref
return apply_filters('nextcrm/webhook/events', [
'new_contact' => esc_html__('New Contact', 'nextcrm'),
'update_contact' => esc_html__('Update Contact', 'nextcrm'),
'delete_contact' => esc_html__('Delete Contact', 'nextcrm'),
'add_tag' => esc_html__('Add Tag', 'nextcrm'),
'remove_tag' => esc_html__('Remove Tag', 'nextcrm'),
'add_list' => esc_html__('Add List', 'nextcrm'),
'remove_list' => esc_html__('Remove List', 'nextcrm'),
'update_contact_status' => esc_html__('Update Contact Status', 'nextcrm'),
]);
Type
Filter
Parameters
| Parameter | Type | Description |
|---|---|---|
$events | array | Webhook event key/value list. |
Return
array
Example Usage
add_filter('nextcrm/webhook/events', 'my_nextcrm_webhook_events');
function my_nextcrm_webhook_events($events) {
$events['campaign_completed'] = 'Campaign Completed';
$events['form_submitted'] = 'Form Submitted';
return $events;
}
Full Global Hook List
// Permission
nextcrm_admin_role
// Email message
nextcrm/message/to
nextcrm/message/from
nextcrm/message/subject
nextcrm/message/body
nextcrm_email_open_enable
nextcrm_email_open_url
nextcrm/default_email_tags
// Contact/global data
nextcrm/contact/types
nextcrm/contact/status
nextcrm/tags
nextcrm/lists
nextcrm/additional/meta_keys
nextcrm/contact/properties
nextcrm/contact/display/columns
// Settings
nextcrm/settings/tabs
nextcrm/settings/data
nextcrm/settings/contact/data
nextcrm/settings/campaign/data
nextcrm/settings/automation/data
nextcrm/settings/form_setting/data
nextcrm/settings/integration_settings/data
// Builder/settings
nextcrm/fields/mapping
nextcrm/form/settings
nextcrm/operators
nextcrm/user/meta/properties
nextcrm_comment_types
// Automation
nextcrm/automation/hook
nextcrm/automation/hook/action
nextcrm/automation/hook/action/wordpress
nextcrm/automation/hook/action/wordpress/actions
nextcrm/automation/hook/crm
nextcrm/automation/hook/crm/actions
nextcrm/automation/hook/condition
nextcrm/automation/hook/condition/wordpress
nextcrm/automation/hook/condition/wordpress/actions
nextcrm/automation/hook/condition/crm
nextcrm/automation/hook/condition/crm/actions
nextcrm/automation/hook/condition/form
nextcrm/automation/hook/condition/form/actions
nextcrm/automation/hook/goal
nextcrm/automation/hook/goal/crm
nextcrm/automation/hook/goal/crm/actions
nextcrm/automation/hook/goal/email
nextcrm/automation/hook/goal/email/actions
nextcrm/automation/hook/goal/sms
nextcrm/automation/hook/goal/sms/actions
nextcrm/automation/hook/goal/wordpress
nextcrm/automation/hook/goal/wordpress/actions
nextcrm/automation/hook/goal/crm/delay/wait_custom_field
nextcrm/automation/check_property_value
nextcrm_automation_run_goal_action
// Import/export/migration
nextcrm/import/contact/mapping
nextcrm/export/mapping
nextcrm/import/mapping
nextcrm/migration/mapping
// AI/integration
nextcrm/settings/chatgpt/model
nextcrm/settings/gemini/model
nextcrm/settings/deepseek/model
nextcrm/settings/kimi/model
nextcrm/webhook/events
Best Example for Global Hook Docs
/**
* Modify every NextCRM email before sending.
*/
add_filter('nextcrm/message/body', 'my_nextcrm_global_email_footer', 10, 3);
function my_nextcrm_global_email_footer($message, $campaign_id, $contact_id) {
$message .= '<hr>';
$message .= '<p style="font-size:12px;color:#777;">You are receiving this email from our WordPress site.</p>';
return $message;
}
Best Example for Extending Automation
/**
* Add a custom automation goal to NextCRM.
*/
add_filter('nextcrm/automation/hook/goal/crm/actions', 'my_nextcrm_add_custom_goal');
function my_nextcrm_add_custom_goal($goals) {
$goals['add_custom_score'] = [
'label' => 'Add Custom Score',
'desc' => 'Add a custom score to the contact.',
'img' => nextcrm_core()->image . 'icon/action/crm/update-fields.svg',
'type' => 'add_custom_score',
'fields' => [
'score' => [
'label' => 'Score',
'type' => 'number',
'default' => 10,
],
],
];
return $goals;
}
Small Code Improvement Suggestions
Some hook names use mixed formats:
nextcrm_email_open_enable
nextcrm_email_open_url
nextcrm_comment_types
nextcrm_automation_run_goal_action
Most of your newer hooks use slash format:
nextcrm/message/body
nextcrm/settings/data
nextcrm/automation/hook
For future consistency, you can add aliases while keeping old hooks:
$enable_open = apply_filters('nextcrm_email_open_enable', $enable_logs);
$enable_open = apply_filters('nextcrm/email/open/enable', $enable_open);
$pixel_base = apply_filters('nextcrm_email_open_url', $tracking_server);
$pixel_base = apply_filters('nextcrm/email/open/url', $pixel_base);