I got this idea on how to monitor if a lead replied to an email:
We use Mailgun to send emails out, and also have MX records for Mailgun to read incoming emails for a certain subdomain
Every email Mautic sends out gets sent over Mailgun using that subdomain - e.g., if I want to send as denis.pavliha@domain.si I send as denis.pavliha@sub.domain.si instead, and the lead will then reply to denis.pavliha@sub.domain.si
When Mailgun receives a reply to denis.pavliha@sub.domain.si, I set up a route that filters messages that are sent to @sub.domain.si and forwards them to denis.pavliha@domain.si and at the same time, I trigger a webhook using Mailgun where all the email data (to, from, body, subject,ā¦) are included.
I capture this Mailgunās webhook using a custom-developed API that reads the From: field (so that I know which Mautic lead/contact I need to bind it to), and finally use this same API to inject a custom event into Mautic (to this lead).
What do you guys think? Does it make sense?
Whereas this last part of inserting data as custom event bound to a certain lead still bothers meā¦ I donāt want to use forms and instead want to generate an event that can be shown under contacts (the same way a ācontact identifiedā or āpage visitedā is shown). I have looked at many SQL tables (I have a self-hosted instance, of course) but still havenāt found a way to manage this task. Otherwise, the above described points 1 to 3 (and first part of 4) work as expected.
I am really looking forward towards any feedback, either way.
I got this idea on how to monitor if a lead replied to an email:
We use Mailgun to send emails out, and also have MX records for Mailgun to read incoming emails for a certain subdomain
Every email Mautic sends out gets sent over Mailgun using that subdomain - e.g., if I want to send as denis.pavliha@domain.si I send as denis.pavliha@sub.domain.si instead, and the lead will then reply to denis.pavliha@sub.domain.si
When Mailgun receives a reply to denis.pavliha@sub.domain.si, I set up a route that filters messages that are sent to @sub.domain.si and forwards them to denis.pavliha@domain.si and at the same time, I trigger a webhook using Mailgun where all the email data (to, from, body, subject,ā¦) are included.
I capture this Mailgunās webhook using a custom-developed API that reads the From: field (so that I know which Mautic lead/contact I need to bind it to), and finally use this same API to inject a custom event into Mautic (to this lead).
What do you guys think? Does it make sense?
Whereas this last part of inserting data as custom event bound to a certain lead still bothers meā¦ I donāt want to use forms and instead want to generate an event that can be shown under contacts (the same way a ācontact identifiedā or āpage visitedā is shown). I have looked at many SQL tables (I have a self-hosted instance, of course) but still havenāt found a way to manage this task. Otherwise, the above described points 1 to 3 (and first part of 4) work as expected.
I am really looking forward towards any feedback, either way.
Hi Denis, this sure is ingenious - but isnt there any internal controller function that could be invoked to register these stats? I guess youāve been looking for something similar - have you found something yet?
I 'd love to see someone in the community to share what they think as well.
[quote=26613:@denispavliha]The drawback is that itās a workaround (not a proper solution) and canāt be used for decisions in campaigns.
To use it as a decision point, my code should be changed that instead of writing into DB, it should call Mauticās REST API and add the lead (identified by the email) to a campaign where you can continue with activities (it is doable for sure).[/quote]
So I would suggest to re-code that API which writes directly to DB, and instead call the Mautic REST APIās endpoint that best suits the case (e.g. add to segment, or.modify stage, or add to campaign, ā¦).