Contacts get added, visible in campaign, but no actions are triggered or pending

Your software
My Mautic version is: v4.4.9
My PHP version is: 8.0.30
My Database type and version is: 10.6.12-MariaDB

Your problem
My problem is:

Campaign doesn’t trigger “send email” or any actions per see.
Contacts are getting added into campaign though.

My head is spinning a little bit.
I see that contacts are getting added into the campaign, which is great.
However, until I explicitly add “Submits Form” decision in campaign, no actions are triggered.

Wouldn’t the campaign trigger the workflow when a contact is added via a campaign form. In this case send the email which is the second node.
Please check the image below and let me know what’s going on.

More information:

What’s happening is that the left one sends email when cron job runs (which is scheduled every 15mins).

But the right image, the email is sent instantaneously and doesn’t depend on cron job. (I even removed the cron job to test it out).
So, question is, how come the right image sends the email instantly without any cron job, while the left needs a cron job?

Are your cron jobs set up correctly?

Hey Robm,

Thanks for the reply.

Yes, I forgot to add that the jobs are setup correctly.

What’s happening is that the left one sends email when cron job runs (which is scheduled every 15mins).

But the right image, the email is sent instantaneously and doesn’t depend on cron job. (I even removed the cron job to test it out).
So, question is, how come the right image sends the email instantly without any cron job, while the left needs a cron job?

Again, Thanks for the reply.
I would like to send the opt-in email instantly, so I’m using the right image since it’s doing the job, but I don’t know that if it’s an expected behaviour! Or the cron is the right way to do. In that case, reduce the cron job interval to 1 minute.

An insight on this would be really helpful.

I’m loving the software and plan to donate to it :slight_smile:

Hey @rajeshjsl3

When you use the action to send an email you can set the when that email should be sent. By default it will send an email instantly when the contact hits that node, but that will happen every 15mins when the cron will process that campaign. There is a really good discussion thread on email send rates in the forums, search for “email send rates”. this might shed some light on what your best approach could be.

Now you can bypass using campaign tiggers and have a standalone form which will allow you to use the action that will send an email to the contact as soon as they complete the form if that is what you want to achieve. You will then need to imbed your form on a landing page in order to achieve this.

any other questions just ask :smiley:

Daniel

Thanks for the response.

Yes, I get that.

But, I don’t get why the second image works? What magic is that?

The campaign works on cron only right, so even if there is a “submit form” node as a decision, it shouldn’t trigger instantly. (but only when the cron runs)

I deleted all the cron jobs to test.

I found that the second image works instantly regardless!! (and I don’t have form actions enabled since it’s supposed to be a campaign form).

So, I don’t know why the second image is working even if when there are no cron jobs in crontab. lol. (and works instantly, is it a bug that is acting as a feature? :slight_smile: )

Hi,
Well, I think there is no way that a campaign action is working without cronjobs.

Well, before you come to that conclusion, I can create a video and prove it to you. (or even share an environment) - you can even try that yourself, just do the right side image and see the magic. v4.4.9.

I too was surprised how would that work, but looking at the contact trace mautic creates, I can see it may actually be possible.

Of course I don’t know the code, but I can look into the code to understand it as well, but I assume people working on the open source project would already be somewhat aware of the internals, hence posted here.

– Coming from a Software Engineer with 15 years of experience in the industry.

All I can add is that when one configures action in standalone forms, those actions are triggered immediately and don’t requite a cron to run.

I seldom use campaign forms but perhaps the instant email sending is somehow linked to form actions?

Yes, I know this and the form doesn’t have actions enabled.

The campaing node “FORM SUBMITTED” is somehow triggering this, where I have selected the same form. (But the form individually doesn’t have any actions).
image

I think it’ll take you a minute to just re-create the right side image and check.

But I can provide a video overview as well/more screenshots.

Thanks

The purpose of this thread is to analyze whether this “is this working” , is the correct approach or we are supposed to use “form actions” or “cron jobs” for campaigns.

Because based on these inputs it seems like this is not how it’s supposed to work, but it’s still working.

Thanks.