mautic: campaign stuck

i've got a rather complicated use case for mautic

we have multiple contacts per company on our system and we do not want for more than one user of the company to receive an email.

so we tried using the core mautic funcionality to accomplish this, but could not find a way to do it, so we played with the "conditions" on the campaign manager.

we created a condition to further continue with the campaign if the contact owner (owner_id in the leads table) is certain user.

so we created a dummy user (lets call it "Continue Campaign") and created an external script that runs every morning to update the owner_id to the contact the we contacted the earlist.

this works to some extent, but, we noticed that campaigns would get stuck.

after some digging, i found out that when the campaign reached the condition, if the owner id was NOT "Continue Campaign" the campaign would die and get stock, and would add a record to the table "campaing_lead_event_log" where the field "non_action_path_taken" would be 1.

this would stop the campaign.

so our "solution" is every morning prior to starting our campaign we'll delete all the rows that have "non_action_path_taken" = 1.

 

delete
from
campaign_lead_event_log
where
non_action_path_taken = 1;

 

its not elegant, but works.

Leave a Reply

Your email address will not be published. Required fields are marked *