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!

In fact, validation can’t be turned off?

Hello community,
It’s a bit complicated to explain and please bear with me because I’m quite a newbie :wink:
I have installed the referrals plugin from Simcen and trying to build a referral form.

We have two different sets of customers (customers A and B) and would like people who fill in the form to create either customer A or B referrals. These referrals (potential customers) would then get a specific email (A or B email)

At the moment we have 2 referral fields with each a number of email inputs that each tag the referral to A or B.

Ideally we would like to have a checkbox or radio in the form, so that once someone for example checks customer A, they are shown the “customer A” referral field.
Another option would be to make the two different referral fields collapsible.

Only bit I have found is this:
How would I go about that? I’m fiddling with html fields, and trying to make the field ‘conditional’ or collapsible, but can’t get it to work.

In the end I just want the referrals to be put either in ‘Box A’ or ‘Box B’
Could anyone point me in the right direction?

Kind regards,


Hi @floeby

If I am understanding correct you would have 1 form:
Customer Type: (Customer A/ CustomerB)

If this is the case you could use a campaign that would be initiated when this form is submitted and then you could have a condition based on the value submitted in Customer Type. According to the value, you could then take them down separate paths with separate emails.

Does this make sense ?



It would be a solution, but that would mean that the person fillling in the form would only be able to refer one kind of customer.
Ideally the person filling in the form would be able to choose the customer type for each referral (a kind of conditional field).
Another option would be to have 2 seperate referral fields (one for A and one for B) with each some email inputs. But as I mentioned before I’d like to make them collapsible (looks a bit neater).

I do not know if this is even possible.
Thank you for your help!