Mautic Community Forums

Referral Plugin

They there,

I’m happy to share our brand-new Referral plugin. This plugin enables to create referral campaigns, so that contacts can invite new contacts.

How it works
The plugin adds a new form field type ‘Referrals’. This field has a configuration to specify how many text inputs are shown in the form and what tags should be set on referred contacts.
Once the form is submitted and the email addresses are valid, a new contact is created for each specified email address, or updated if one already exists with the same email address.

The plugins keeps then a reference which contact invited the new contact (Referral). Additionally, you can use {referrerfield=...} tokens in emails to access contact fields of the referring contact. That enables you to build a campaign based on a segment that includes referred contacts (by filtering with the specified tag) and send a welcome email to those new contacts including for example the first name of the referring contact or a personal message.

Where to get it
The plugin is open source and available on GitHub:

Let me know what you think or if you have any questions.



Altough forum members seem not to comment, but we all appreciate it so I want to say thank you for this effort and making it public.


Thank you for the initiative and putting this together @simcen

@simcen , my friend it’s people like you that make the world go round and I just want to take a moment to appreciate that! and thank you from the bottom of my heart dude this is an amazing plugin simple but powerful, I can’t wait to see what it grows into.

Thanks a lot! Love that you started to create this plugin.

UPDATE: Errors were “trial and error” problems … as I missunderstood the concept.

@simcen - the reference between “referrer” and “referred contact” currently is only shown:

  • in the form and
  • in the history

of the “referred contact”? No custom fields?

Hey @simcen

Finally I was able to get some time to start playing with your plugin - it is GREAT - THANKS!!!

I have a question:
I would like to award points to people that refer others to the system and then somehow to award them more points if that person hits a specific page - is this at all possible ?

Thank you!
This plugin saved my ant job!
A suggestion?
Throw it on wordpress and set fire to the Facebook playground!

Thanks a lot a great job, I love this plugin.

Hey @mikew
This sounds like a great idea. I don’t think this is possible at the moment, was thinking about a campaign but I believe there are conditions missing.
I’ll add this to my notes, do add point triggers for referrals.


Hey @simcen

So we went ahead and hacked things a bit and made a full referral program based on your plugin. Basically what I did was create an external database, two new tables, Referral Codes and Discount Codes.
Setup a campaign and ran some Webhooks to trigger some scripts I wrote in order to populate the database order referrals by referrer codes and then summed up referral codes to get points by referrer. Pass all this back to Mautic and we were good to go.

Used webhookd to catch Webhooks and trigger scripts on mautic server.



Hi, I’m a new Mautic user and already a convert…I’m still at a beginner’s level and had (probably a stupid) question. Thank you @simcen for the great referral plugin …exactly what I need (at least I think so).

Here’s my question:
In my campaign builder I want to send a specific email to the user who refers some contacts. But how do I send another specific email to the referred (new) contacts in the in this campaign builder (there’s no send email action to referred or something)?
If you could send me on the right path that would be great!!

Kind regards!!!

I have not played with the plugin yet, but it seems to allow for the ability to create a new segment with the referred contacts. Use that segment to start another campaign where you can send an email to those new contacts.

Thanks…your suggestion worked!


I understand how the plugin works and how to organize campaigns to send the message to the referrals, based on tags, points, etc. via a secondary campaign, etc.

Does the plugin validate for emails (only) in the form?

Congratulations again.

Thanks for this plugin, appreciated!