Mautic Community Forums

Has the event ON_CAMPAIGN_TRIGGER_ACTION been deprecated along with CampaignExecutionEvent?

Hey guys,

I want to consume PendingEvent instead of CampaignExecutionEvent in a plugin which I’m developing now ( when triggering a campaign via the command mautic campaigns:trigger.

When I looked into PendingEvent I noticed it’s used with the event ON_CAMPAIGN_BATCH_ACTION and not the one traditionally used with CampaignExecutionEvent which isON_CAMPAIGN_TRIGGER_ACTION.

So if CampaignExecutionEvent has been deprecated, then what event should we use now to trigger PendingEvent ? is it ON_CAMPAIGN_BATCH_ACTION or can we still use ON_CAMPAIGN_TRIGGER_ACTION with PendingEvent ?

How come Mautic core plugins still work even though they still use CampaignExecutionEvent ? is it really deprecated ?!

Extra quick Question :blush: : According to the solution here., however PendingEvent does not have the same methods, “getLead” “setFailed” and “setResult” as CampaignExecutionEvent has, Do you have any suggestions how can I do it ?

I’m using Mautic 3.3.1

Thanks for any help.

So I can confirm that this event has been deprecated, mentioned in here Mautic\EmailBundle\EmailEvents

But still How come Mautic core plugins still work even though they still use CampaignExecutionEvent ? is it really deprecated ?!

Also, what Mautic console command is the responsible for triggering ON_CAMPAIGN_BATCH_ACTION ?

Best