abdulhaq / CustomActionsMauticCampaigns

Mautic plugin to add custom action on Campagin builder.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add Custom Actions to Mautic Campaign Builder

Recently while working for a client I developed a Mautic plugin to add custom action on Campagin builder.

Your actions will show up in campagin bulder. You can also create new conditions or decisions which gives you complete control over your customer's journy.

Code explained

How to add custom action to campaign

public function onCampaignBuild(CampaignBuilderEvent $event)
    {
        $event->addAction(
            'sos.campaign.mark_success',
            [
                'label'           => 'Mark as Success',
                'eventName'       => CampaignStatsEvents::ON_CAMPAIGN_MARK_SUCCESS, 
                'description'     => 'Mark campaign as success for this contact',

            ]
        );
    }

Add buttons to drop down menu

$buttons = [
            [
                'label'        => 'View Stats',
                'icon'         => 'fa fa-line-chart',
                'context'      => 'campaign',
            ],
        ];

foreach ($buttons as $button) {
    $this->addButtonGenerator(
        $button['objectAction'], 
        $button['label'], 
        $button['icon'], 
        $button['context']
    );
}

Screenshots

Your actions will show up in campagin bulder. You can also create new conditions or decisions which gives you complete control over your customer's journy.

App Screenshot

How the campagin tree may look like:

App Screenshot

And when the action is triggered, it will show in your customer's profile activity.

App Screenshot

Tech Stack

Server: PHP Symphony

πŸš€ About Me

I'm a full stack developer with experties in Mautic, Laravel, WordPress, AWS, React

πŸ”— Links

portfolio

linkedin

twitter

About

Mautic plugin to add custom action on Campagin builder.


Languages

Language:PHP 100.0%