Mautic Community Forums

Can't seem to trigger campaign actions

Hi,



First of all, thanks for a great application, great to have something that offers so much yet is accessible to anyone.



I seem to be having a problem triggering any campaign actions. The campaign is set up as follows:



Form created and displayed on Wordpress website via plugin

Upon completion of form we’re looking to:



Add lead to a list

Send a series of 4 emails

Add lead points when emails are opened

Remove from list if a link in the email sent is clicked



This image show how we’ve set it up.

https://www.dropbox.com/s/fndxt8p7hy3axaq/Mautic-1.png?dl=0



So, when the form is filled in and submitted, a lead is recorded, however it’s not added to the list or the first of the series of emails isn’t sent.



We have 4 cron jobs set up for, campaign update and trigger, email process and and leadlist update, these have been tested and seem to work when triggered via SSH.



Email config is all OK, we can send test emails without issue.



Any guidance as to what else we could try or where we’ve gone wrong would be appreciated.



Thanks in advance



KH








Hi,

First of all, thanks for a great application, great to have something that offers so much yet is accessible to anyone.

I seem to be having a problem triggering any campaign actions. The campaign is set up as follows:

Form created and displayed on Wordpress website via plugin
Upon completion of form we’re looking to:

Add lead to a list
Send a series of 4 emails
Add lead points when emails are opened
Remove from list if a link in the email sent is clicked

This image show how we’ve set it up.
https://www.dropbox.com/s/fndxt8p7hy3axaq/Mautic-1.png?dl=0

So, when the form is filled in and submitted, a lead is recorded, however it’s not added to the list or the first of the series of emails isn’t sent.

We have 4 cron jobs set up for, campaign update and trigger, email process and and leadlist update, these have been tested and seem to work when triggered via SSH.

Email config is all OK, we can send test emails without issue.

Any guidance as to what else we could try or where we’ve gone wrong would be appreciated.

Thanks in advance

KH

My first guess is there’s something up with the cron. If they work being tested via SSH is it possible the cron tab requires a different pathing configuration or something that is not correct?

You should be able to test the first chain of events by doing things:

  1. disable all your cron jobs (temporarily)
  2. start the flow by executing your first form - at this point nothing should happen
  3. use ssh and execute php app/console mautic:campaign:trigger
  4. at this point the lead should get added to the list and the first email should be triggered.

See if you get this far. If not then there might be something odd going on. If this works then we can continue down the line of testing:

  1. Open the email
  2. re-run the ssh command for the campaign trigger (which should add points)
  3. click through to the audit page
  4. re-run the ssh command for the campaign trigger - should remove the lead from the list
  5. not sure what request audit is (email?) but hopefully you get the idea on how to test this. Start one step at a time and work your way down the line. If everything fires in the list as needed

One thing I did notice is it doesn’t look like you’re using the “no” path of the emails at all - which I’m not sure if you want. But in my mind I’m thinking about how I would set up this campaign, and I’d only want to send the next set of emails if the first one wasn’t opened within a period of time.

For example:

  • execute form
  • send first email
    • did open?
      • “yes” open path, add lead points
          • continue down “yes” flow
      • “no” open path within 3 days
          • send 2nd email
            • did open?
                • yes flow
                • no flow
                    • wait 2 days (2 + 3=5) send email 3

Totally up to you, that’s just how I’d think about it. I think the way you currently have it means the lead will always get all 4 emails regardless of any action they take.

Thanks Chad,

Will get on to this shortly and try it out again.

KH

Thanks for the advice,

After much head scratching I discovered that I had 1 to many spaces in the cron notation for the campaign:trigger

I’ve also reworked the campaign structure a little based upon your suggestions. See attached

https://www.dropbox.com/s/e43dcr6wo9yy9gg/mautic-2.png?dl=0

I do however still seem to be having problems.

Once the first form is filled in the lead is captured ,as the cron job runs the new lead is added to the desired lead list and the first email is sent, all good so far. We now have a period of waiting, shortened to 1 hr for testing, after this period if another form hasn’t been filled in then we’re wanting to send a second email, whereas if the form has been filled in we’re removing the lead from 1 list and adding to another.
As I understand it the workflow in the image shows this. However the second email isn’t being triggered. Any suggestions as to where I could be going wrong?

Thanks in advance

Hmm. Just for testing, could you try replacing the send email action that’s not working with something else (eg: remove points or something like that).

I want to see if its a ‘send email’ issue or a ‘campaign action’ issue.