# Point Triggers

**URL:** <https://forum.mautic.org/t/point-triggers/1540>\
**Category:** Product Support\
**Created:** [February 15, 2015, 12:34am UTC](https://forum.mautic.org/t/point-triggers/1540 "2015-02-15T00:34:02Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![abenavides](https://avatars.discourse-cdn.com/v4/letter/a/51bf81/32.png) [@abenavides](https://forum.mautic.org/u/abenavides)\
**Post date:** [February 15, 2015, 12:34am UTC](https://forum.mautic.org/t/point-triggers/1540/1 "2015-02-15T00:34:02Z")

</div>

Hi. Not sure if I’m doing something wrong here…  
  
  
  
In order to capture new leads I have a form in a squeeze page that sends them an email with a link to download an asset. When form is submitted it executes three actions: Creates the lead, Sends an email to the lead and add the lead to List A. This works fine, new lead is added to List A and has 0 points.  
  
  
  
I have two Point Actions. When the lead opens the email one point is added and when the asset is downloaded another point is added. This is also working correctly I can see how points are changed after each action. At this point lead has 2 points.  
  
  
  
When lead reaches 2 points there are two events configured in Point Triggers. Lead is changed from List A to List B and is added to Campaign A.  
  
  
  
The problem is that these events are not working. The only change that is made to the lead is that is removed from List A but it can’t be related to the trigger because this happens after opening the email. At this point lead only has 1 point and events are triggered with 2 points minimum.  
  
  
  
Not sure what’s wrong. Everything is ‘Published’, running latest from github, the only message during installation was a suggestion to use an APC.  
  
  
  
For what I’ve learned about marketing automation and Mautic I believe the logic described above is correct but please correct me if I’m wrong. If not, maybe you can tell me if I’m missing something or if there are Mautic logs that I can see.  
  
  
  
Thanks!

---

<div class="post-metadata">

**Author:** ![abenavides](https://avatars.discourse-cdn.com/v4/letter/a/51bf81/32.png) [@abenavides](https://forum.mautic.org/u/abenavides)\
**Post date:** [February 15, 2015, 12:34am UTC](https://forum.mautic.org/t/point-triggers/1540/2 "2015-02-15T00:34:02Z")

</div>

Hi. Not sure if I’m doing something wrong here…

In order to capture new leads I have a form in a squeeze page that sends them an email with a link to download an asset. When form is submitted it executes three actions: Creates the lead, Sends an email to the lead and add the lead to List A. This works fine, new lead is added to List A and has 0 points.

I have two Point Actions. When the lead opens the email one point is added and when the asset is downloaded another point is added. This is also working correctly I can see how points are changed after each action. At this point lead has 2 points.

When lead reaches 2 points there are two events configured in Point Triggers. Lead is changed from List A to List B and is added to Campaign A.

The problem is that these events are not working. The only change that is made to the lead is that is removed from List A but it can’t be related to the trigger because this happens after opening the email. At this point lead only has 1 point and events are triggered with 2 points minimum.

Not sure what’s wrong. Everything is ‘Published’, running latest from github, the only message during installation was a suggestion to use an APC.

For what I’ve learned about marketing automation and Mautic I believe the logic described above is correct but please correct me if I’m wrong. If not, maybe you can tell me if I’m missing something or if there are Mautic logs that I can see.

Thanks!

---

<div class="post-metadata">

**Author:** ![gmillard](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/gmillard/32/5_2.png) [@gmillard](https://forum.mautic.org/u/gmillard)\
**Post date:** [February 15, 2015, 5:11am UTC](https://forum.mautic.org/t/point-triggers/1540/3 "2015-02-15T05:11:48Z")

</div>

Hi,

Can you look in app/logs/mautic\_prod.php to see if there are any related errors?

It’s possible that [https://github.com/mautic/mautic/commit/74b388ca595b7059941e85158b6afa90aaa574e4](https://github.com/mautic/mautic/commit/74b388ca595b7059941e85158b6afa90aaa574e4) will fix it as I did find an error related to changing campaigns via a point trigger.

Thanks!  
Alan

---

<div class="post-metadata">

**Author:** ![abenavides](https://avatars.discourse-cdn.com/v4/letter/a/51bf81/32.png) [@abenavides](https://forum.mautic.org/u/abenavides)\
**Post date:** [February 15, 2015, 5:29pm UTC](https://forum.mautic.org/t/point-triggers/1540/4 "2015-02-15T17:29:49Z")

</div>

The update fixed the problem that didn’t make sense to me, the lead is no longer deleted from List A after opening the email.

However the events are still not triggered. This is repeated various times in mautic log

```auto
[2015-02-15 17:13:19] mautic.CRITICAL: Uncaught PHP Exception DoctrineORMQueryQueryException: "[Semantical Error] line 0, col 76 near 'a WHERE n.lead': Error: Class MauticLeadBundleEntityLeadNote has no association named createdBy" at /var/www/vhosts/httpdocs/info/vendor/doctrine/orm/lib/Doctrine/ORM/Query/QueryException.php line 63 {"exception":"[object] (Doctrine\ORM\Query\QueryException(code: 0): [Semantical Error] line 0, col 76 near 'a WHERE n.lead': Error: Class Mautic\LeadBundle\Entity\LeadNote has no association named createdBy at /var/www/vhosts/httpdocs/info/vendor/doctrine/orm/lib/Doctrine/ORM/Query/QueryException.php:63, Doctrine\ORM\Query\QueryException(code: 0): SELECT n, a FROM Mautic\LeadBundle\Entity\LeadNote n INNER JOIN n.createdBy a WHERE n.lead = :HfdOWUDg ORDER BY n.dateTime DESC at /var/www/vhosts/httpdocs/info/vendor/doctrine/orm/lib/Doctrine/ORM/Query/QueryException.php:41)"} []
```

There is also this error from web server saying that an object can not be used as array

```auto
[Sun Feb 15 12:06:17 2015] [warn] [client 190.141.89.31] mod_fcgid: stderr: PHP Fatal error: Cannot use object of type Mautic\PointBundle\Entity\TriggerEvent as array in /var/www/vhosts/httpdocs/info/app/bundles/LeadBundle/Helper/PointEventHelper.php on line 25, referer: https://bitechpanama.com:2096/cpsess4794489490/3rdparty/roundcube/?_task=mail&_action=show&_uid=1968&_mbox=INBOX&_safe=1&_caps=pdf%3D1%2Cflash%3D1
```

Thanks for your reply

---

<div class="post-metadata">

**Author:** ![gmillard](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/gmillard/32/5_2.png) [@gmillard](https://forum.mautic.org/u/gmillard)\
**Post date:** [February 16, 2015, 4:55am UTC](https://forum.mautic.org/t/point-triggers/1540/5 "2015-02-16T04:55:14Z")

</div>

Hi!

The first error has already been fixed by [https://github.com/mautic/mautic/commit/43969f9b9ba678798ccf67c6de4c985a3795a151](https://github.com/mautic/mautic/commit/43969f9b9ba678798ccf67c6de4c985a3795a151)

The second error should have been fixed by the commit I referenced in my earlier reply: [https://github.com/mautic/mautic/commit/74b388ca595b7059941e85158b6afa90aaa574e4](https://github.com/mautic/mautic/commit/74b388ca595b7059941e85158b6afa90aaa574e4)

Are you still getting the object to array error after apply that fix?

Could you get me some screenshots or a screencast of your trigger event configurations?

Also, are you testing against the same lead or different ones? If the same, check the point\_lead\_event\_log table (if you added a prefix during install, it’ll start with that of course) and see if the lead is listed in there. If so, delete the rows and try again, do the events execute?

Thanks!  
Alan

---

<div class="post-metadata">

**Author:** ![abenavides](https://avatars.discourse-cdn.com/v4/letter/a/51bf81/32.png) [@abenavides](https://forum.mautic.org/u/abenavides)\
**Post date:** [February 16, 2015, 2:29pm UTC](https://forum.mautic.org/t/point-triggers/1540/6 "2015-02-16T14:29:18Z")

</div>

Ok. Forget about last message, it seems that the person that “updated” the files missed something (that person being me…).

I updated files again and review each file to verify the changes. The last two errors are gone but still, events aren’t triggered.

This is what happens when I try to download the asset (the action that adds the second point to the lead and triggers the event)

I click the asset link one time and the browser opens a new window but nothing happens. I just see the url for the asset but nothing is downloaded. I have to go back to the email and click the link for a second time and this time the asset is downloaded.

There are no error logs in Mautic but this are from the web server registering the two times I clicked the asset link.

`[Mon Feb 16 09:07:36 2015] [warn] [client 201.227.86.226] mod_fcgid: stderr: PHP Fatal error: Call to a member function addLog() on a non-object in /var/www/vhosts/httpdocs/info/app/bundles/PointBundle/Model/TriggerModel.php on line 364, referer: https://us-mg6.mail.yahoo.com/neo/launch?.rand=5d8dnm2mipk6d
[Mon Feb 16 09:08:30 2015] [warn] [client 201.227.86.226] mod_fcgid: stderr: PHP Fatal error: Call to a member function addLog() on a non-object in /var/www/vhosts/httpdocs/info/app/bundles/PointBundle/Model/TriggerModel.php on line 364, referer: https://us-mg6.mail.yahoo.com/neo/launch?.rand=5d8dnm2mipk6d
`

Thanks again!

---

<div class="post-metadata">

**Author:** ![gmillard](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/gmillard/32/5_2.png) [@gmillard](https://forum.mautic.org/u/gmillard)\
**Post date:** [February 17, 2015, 12:38am UTC](https://forum.mautic.org/t/point-triggers/1540/7 "2015-02-17T00:38:56Z")

</div>

Hi!

Sorry, that error was caused by the other commit. Make this change and it will fix that:

[https://github.com/mautic/mautic/commit/5a01d3f1ce2406f575ad05062f9356145cde6ca0](https://github.com/mautic/mautic/commit/5a01d3f1ce2406f575ad05062f9356145cde6ca0)

---

<div class="post-metadata">

**Author:** ![abenavides](https://avatars.discourse-cdn.com/v4/letter/a/51bf81/32.png) [@abenavides](https://forum.mautic.org/u/abenavides)\
**Post date:** [February 17, 2015, 1:34am UTC](https://forum.mautic.org/t/point-triggers/1540/8 "2015-02-17T01:34:43Z")

</div>

Hi. Thanks for the update.

Just to review config, when the lead reaches 2 points minimum, the trigger is configured to change lead from List A to List B. Is also configured to add the lead to Campaign A.

This time the event was triggered but at the first point, not the second. When the lead reach 2 points it is kept on the campaign but removed from List B. At the end the lead is in Campaign A and no List.

I’m testing with different leads. This is how trigger is configured

![](http://cableadoi.com/mautic/1.gif)

![](http://cableadoi.com/mautic/2.gif)

![](http://cableadoi.com/mautic/3.gif)

![](http://cableadoi.com/mautic/4.gif)

Thanks again

---

<div class="post-metadata">

**Author:** ![gmillard](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/gmillard/32/5_2.png) [@gmillard](https://forum.mautic.org/u/gmillard)\
**Post date:** [February 17, 2015, 5:21am UTC](https://forum.mautic.org/t/point-triggers/1540/9 "2015-02-17T05:21:39Z")

</div>

Okay, so I set up a similar setup and did find several issues that I fixed with:

[https://github.com/mautic/mautic/commit/c8e883751b5893fbc9d1ca9dd5a2919548da6143](https://github.com/mautic/mautic/commit/c8e883751b5893fbc9d1ca9dd5a2919548da6143)  
[https://github.com/mautic/mautic/commit/730497828b837124297ec4cbd24c19e6285bfae8](https://github.com/mautic/mautic/commit/730497828b837124297ec4cbd24c19e6285bfae8)  
[https://github.com/mautic/mautic/commit/b18d961c1af71afb884b7abecd0db6377c77ed61](https://github.com/mautic/mautic/commit/b18d961c1af71afb884b7abecd0db6377c77ed61)

After that, my triggers fired and my leads moved lists and were added to the campaign.

Can you give those fixes a shot?

Thanks!  
Alan

---

<div class="post-metadata">

**Author:** ![abenavides](https://avatars.discourse-cdn.com/v4/letter/a/51bf81/32.png) [@abenavides](https://forum.mautic.org/u/abenavides)\
**Post date:** [February 17, 2015, 12:35pm UTC](https://forum.mautic.org/t/point-triggers/1540/10 "2015-02-17T12:35:50Z")

</div>

Hi.

After updating (…and verifying files) I made some tests but is was the same as last time. Events are triggered, but with 1 point, not 2. And after 2 points the lead is removed from all lists but remains in campaign.

…I can give you admin access if it helps, I’m on a test environment.

Thanks

---

<div class="post-metadata">

**Author:** ![gmillard](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/gmillard/32/5_2.png) [@gmillard](https://forum.mautic.org/u/gmillard)\
**Post date:** [February 18, 2015, 3:38pm UTC](https://forum.mautic.org/t/point-triggers/1540/11 "2015-02-18T15:38:58Z")

</div>

Hi,

Yes, can you email me alan.hartless@{this-site}.org, start a private conversation here, or join us on [Slack](https://www.mautic.org/get-involved/group-chats).

Thanks!  
Alan

---

<div class="post-metadata">

**Author:** ![silavapi](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/silavapi/32/7424_2.png) [@silavapi](https://forum.mautic.org/u/silavapi)\
**Post date:** [February 2, 2020, 11:00pm UTC](https://forum.mautic.org/t/point-triggers/1540/12 "2020-02-02T23:00:41Z")

</div>


