feat(call-script): add the Call Script component (0.19.0)

A new Mautic component, listed under Components > Call Scripts (/s/call-scripts),
built like the other domains on AbstractStandardFormController/FormModel.

- CallScript (mt3s_call_scripts): name, description, category, owner, status,
the publish window shown as start/end date and time, the HTML script with
dynamic tokens kept as typed (html cleaning mask), the calling window
(weekdays, hours, sentinel in the contact's or a fixed timezone) and the retry
policy (max attempts, delay, backoff: none/linear/exponential)
- CallScriptOutcome (mt3s_call_script_outcomes, ON DELETE CASCADE): label,
data type (checkbox/radio/free text/dropdown), options JSON ({value,label})
and position; nested collections reuse the program-collection JS
- validators: ValidCallingWindow, ValidCallScriptOutcomeOptions, and an atPath
option on EndDateAfterStartDate so its violation lands on publishDown
- config: routes, the Components menu item (parent mautic.core.components),
call_script category type, model alias, call_scripts permissions, version 0.19.0
- migration Version_0_19_0 creates both tables and their FKs immediately
(users/categories SET NULL, outcomes CASCADE), idempotent
- translations en_US/fr_FR, unit tests, readme/AGENTS documentation
This commit is contained in:
alexandre_gain_mt3s committed 2026-11-21 20:58:25 +01:00
1 parent 88256ca345
commit 4fb36eebfc
33 files changed
+2537 -6

No files matched your search

+27 -2
View File
@@ -5,7 +5,7 @@ declare(strict_types=1);
return [
'name' => 'MT3S Marketing Program',
'description' => 'MT3S Marketing: programs, tasks, audiences, and smart links with their UTM taxonomies.',
'version' => '0.18.2',
'version' => '0.19.0',
'author' => 'Experiential',
'routes' => [
@@ -46,6 +46,16 @@ return [
'path' => '/marketing-program-audiences/{objectAction}/{objectId}',
'controller' => 'MauticPlugin\MT3SMarketingProgramBundle\Controller\AudienceController::executeAction',
],
// Call Scripts component (Components > Call Scripts): the list and its object actions.
'mt3s_call_script_index' => [
'path' => '/call-scripts/{page}',
'controller' => 'MauticPlugin\MT3SMarketingProgramBundle\Controller\CallScriptController::indexAction',
],
// objectAction: new, edit, delete, batchDelete.
'mt3s_call_script_action' => [
'path' => '/call-scripts/{objectAction}/{objectId}',
'controller' => 'MauticPlugin\MT3SMarketingProgramBundle\Controller\CallScriptController::executeAction',
],
// Smart Links domain: the list and its object actions.
'mt3s_smart_links_index' => [
'path' => '/smart-links/{page}',
@@ -139,6 +149,16 @@ return [
],
],
],
// The Call Script component: a flat item attached to core's Components menu. The
// "parent" key hands it to Mautic's orphan mechanism, which places it in that group;
// the key itself is the translation key of the label.
'mt3s.call_script.menu.index' => [
'route' => 'mt3s_call_script_index',
'access' => ['mt3smarketingprogram:call_scripts:viewown', 'mt3smarketingprogram:call_scripts:viewother'],
'parent' => 'mautic.core.components',
'priority' => 80,
],
],
],
@@ -173,12 +193,17 @@ return [
],
],
// Registers "program" as a category type (Settings > Categories), used by Program::$category.
// Registers "program" as a category type (Settings > Categories), used by Program::$category,
// and "call_script" for the Call Script component.
'categories' => [
'program' => [
'class' => MauticPlugin\MT3SMarketingProgramBundle\Entity\Program::class,
'label' => 'mt3s.marketing_program.category.type',
],
'call_script' => [
'class' => MauticPlugin\MT3SMarketingProgramBundle\Entity\CallScript::class,
'label' => 'mt3s.call_script.category.type',
],
],
'parameters' => [
+1
View File
@@ -29,6 +29,7 @@ return function (ContainerConfigurator $configurator): void {
// exactly one alias per model, under the bundle's canonical prefix.
$services->alias('mautic.mt3smarketingprogram.model.program', MauticPlugin\MT3SMarketingProgramBundle\Model\ProgramModel::class);
$services->alias('mautic.mt3smarketingprogram.model.task', MauticPlugin\MT3SMarketingProgramBundle\Model\TaskModel::class);
$services->alias('mautic.mt3smarketingprogram.model.call_script', MauticPlugin\MT3SMarketingProgramBundle\Model\CallScriptModel::class);
$services->alias('mautic.mt3smarketingprogram.model.stakeholder', MauticPlugin\MT3SMarketingProgramBundle\Model\StakeholderModel::class);
$services->alias('mautic.mt3smarketingprogram.model.audience', MauticPlugin\MT3SMarketingProgramBundle\Model\AudienceModel::class);
// Smart Links domain: getModel('mt3smarketingprogram.smart_link') / getModel('mt3smarketingprogram.utm_taxonomy').