SMS Campaign Filters
FluentCRM Pro IntermediateThese filter hooks let you customize SMS campaign behavior — providers, processing limits, scheduling, and message content. All SMS hooks require FluentCRM Pro.
Providers
Providers are registered, not filtered
There is no filter for the SMS provider list. Providers are driver classes registered on the fluent_crm/register_sms_providers action — the driver's own getSlug(), getLabel() and getFields() supply the slug, the dropdown label and the settings form fields. See that action for a full custom-driver example.
Campaign Data
fluent_crm/sms_campaign_data
Filter a single SMS campaign right before it is returned by the campaign-detail endpoint. Runs on read only — it does not affect what is stored or sent.
Parameters
$campaignSMSCampaign Model - also carries aserver_timeattribute set just before the filter runs
Usage:
add_filter('fluent_crm/sms_campaign_data', function($campaign) {
// Modify campaign data
return $campaign;
});Source: fluentcampaign-pro/app/Modules/SMS/Http/Controllers/SMSController.php
fluent_crm/parse_sms_smartcode
Filter SMS message content after the shared smartcode parser has run, but before the message is converted to plain text and sent. Use this to add custom smart code replacements for SMS messages.
Parameters
$contentString - the parsed SMS message text$subscriberSubscriber Model
Usage:
add_filter('fluent_crm/parse_sms_smartcode', function($content, $subscriber) {
// Replace custom smart codes in SMS
$content = str_replace('{{membership_level}}',
get_user_meta($subscriber->user_id, 'level', true),
$content
);
return $content;
}, 10, 2);Source: fluentcampaign-pro/app/Modules/SMS/SMSHelper.php
fluent_crm/parse_whatsapp_smartcode
The WhatsApp counterpart of fluent_crm/parse_sms_smartcode. Fires when WhatsApp message content is parsed for a contact.
Parameters
$contentString - the parsed WhatsApp message text$subscriberSubscriber Model
Usage:
add_filter('fluent_crm/parse_whatsapp_smartcode', function($content, $subscriber) {
return $content;
}, 10, 2);Source: fluentcampaign-pro/app/Modules/SMS/WhatsAppHelper.php
fluent_crm/sms_opt_in_confirmation_message
Filter the confirmation message sent back to a contact when they opt in to SMS by replying to a keyword (for example START).
Parameters
$messageContentString - the confirmation message$subscriberSubscriber Model$dataArray - the inbound webhook payload
Usage:
add_filter('fluent_crm/sms_opt_in_confirmation_message', function($messageContent, $subscriber, $data) {
return 'Welcome back, ' . $subscriber->first_name . '!';
}, 10, 3);Source: fluentcampaign-pro/app/Modules/SMS/SMSHelper.php
fluent_crm/sms_opt_out_confirmation_message
Filter the confirmation message sent back to a contact when they opt out of SMS by replying to a keyword (for example STOP).
Parameters
$messageContentString - the confirmation message$subscriberSubscriber Model$dataArray - the inbound webhook payload
Usage:
add_filter('fluent_crm/sms_opt_out_confirmation_message', function($messageContent, $subscriber, $data) {
return 'You are unsubscribed. Reply START to rejoin.';
}, 10, 3);Source: fluentcampaign-pro/app/Modules/SMS/SMSHelper.php
Processing Limits
fluent_crm/sms_campaign_action_limit
Filter the page size used when applying a bulk tag/list action to the recipients of an SMS campaign (SMSController::doTagActions()). It sets both the LIMIT and the offset stride for each processing_page pass.
Parameters
$limitINT - Default50
Usage:
add_filter('fluent_crm/sms_campaign_action_limit', function($limit) {
return 100;
});Source: fluentcampaign-pro/app/Modules/SMS/Http/Controllers/SMSController.php
fluent_crm/sms_process_subscribers_per_request
Filter how many subscribers are turned into queued SMS messages per batch-generation request.
Parameters
$limitINT - Default30. Values below1fall back to30.
Usage:
add_filter('fluent_crm/sms_process_subscribers_per_request', function($limit) {
return 50;
});Source: fluentcampaign-pro/app/Modules/SMS/SMSHandler.php
fluent_crm/sms_scheduler_chunk_size
Filter the SMS scheduling chunk size for batch processing.
Parameters
$chunkSizeINT - Default30$schedulerSMSScheduler- the scheduler instance (still in its constructor, so its properties are at their defaults)
WARNING
Values of 0 or less are ignored — the scheduler keeps its default of 30.
Usage:
add_filter('fluent_crm/sms_scheduler_chunk_size', function($chunkSize, $scheduler) {
return 50;
}, 10, 2);Source: fluentcampaign-pro/app/Modules/SMS/SMSScheduler.php
fluent_crm/sms_scheduler_max_processing_seconds
Filter the maximum time (in seconds) the SMS scheduler can run per execution.
Parameters
$maxSecondsINT - Default30$schedulerSMSScheduler- the scheduler instance (still in its constructor, so its properties are at their defaults)
WARNING
Values of 0 or less are ignored — the scheduler keeps its default of 30 seconds.
Usage:
add_filter('fluent_crm/sms_scheduler_max_processing_seconds', function($maxSeconds, $scheduler) {
return 60;
}, 10, 2);Source: fluentcampaign-pro/app/Modules/SMS/SMSScheduler.php
fluent_crm/disable_sms_processing
Return true to make the SMS scheduler treat the system as not ready, so no queued SMS messages are sent. Useful for maintenance windows. Messages stay queued and resume once the filter returns false again — nothing is dropped.
Parameters
$shouldDisableBoolean - Defaultfalse
Usage:
add_filter('fluent_crm/disable_sms_processing', function($shouldDisable) {
return true; // Pause all SMS sending
});Source: fluentcampaign-pro/app/Modules/SMS/SMSScheduler.php