Mautic is an open-source marketing automation platform. It enables you to segment your contacts based on business requirements, personalize your marketing strategy, and create personalized campaigns for better customer engagement.

RudderStack supports Mautic as a destination where you can seamlessly send your event data.

Getting started

Before configuring Mautic as a destination in RudderStack, verify if the source platform is supported by Mautic by referring to the table below:

Connection ModeWebMobileServer
Device mode---
Cloud modeSupportedSupportedSupported
To learn more about the difference between cloud mode and device mode in RudderStack, refer to the RudderStack Connection Modes guide.

Once you have confirmed that the source platform supports sending events to Mautic, follow these steps:

  1. From your RudderStack dashboard, add a source. Then, from the list of destinations, select Mautic.
  2. Assign a name to the destination and click Continue.

Connection settings

To successfully configure Mautic as a destination, you will need to configure the following settings:

Mautic connection settings
  • Username: Enter the username associated with your Mautic account.
  • Password: Enter the password for the above username.
  • Subdomain Name: Enter the subdomain associated with your Mautic instance. For example, if the root URL for your Mautic instance is customdomain.domain.com, then your subdomain name will be customdomain.
  • Mautic property name to used as lookup field: Enter a unique Mautic user property which RudderStack will use for contact lookup.
RudderStack will retrieve this property from the user traits in the event.

Identify

You can use the identify call to create or update a user in Mautic.

A sample identify call is shown below:

rudderanalytics.identify("1hKOmRA4GRlm", {
state: "Louisiana",
firstName: "Alex",
lastName: "Keener",
title: "Mr",
zipcode: "90009",
prospectOrCustomer: "Customer",
country: "USA",
website: "www.alex.com",
subscriptionStatus: "New",
phone: "12025550146",
});

Supported mappings

The following table lists the mappings between the optional RudderStack and Mautic properties:

RudderStack propertyMautic propertyData type
context.traits.email / traits.email / properties.email/context.externalId.idemailString
traits.title / context.traits.titletitleString
traits.firstName / traits.firstname / traits.first_name / context.traits.firstName / context.traits.firstname / context.traits.first_namefirstnameAny
traits.lastName / traits.lastname / traits.last_name / context.traits.lastName / context.traits.lastname / context.traits.last_namelastnameAny
originalTimestamp / timestamplast_activeTimestamp in ISO 8601 format
phonephone / mobileAny
traits.address.citycityString
traits.address.addressLine1/ context.traits.address.addressLine1address1String
traits.address.addressLine2/ context.traits.address.addressLine2address2String
traits.address/ context.traits.addressaddress1 + address2String
traits.company.employeeCountcompany_sizeInteger
traits.role / context.traits.roleroleString
traits.website / context.traits.website / properties.websitewebsiteString
context.ipIPString
context.timezonetimezoneString
traits.subscriptionStatus / context.traits.subscriptionStatussubscription_statusString
traits.prospectOrCustomer / context.traits.prospectOrCustomerprospect_or_customerString
traits.hasPurchased / context.traits.hasPurchasedhaspurchasedString
traits.state/ context.traits.statestateString
traits.zipcode / context.traits.zipcode / traits.zip / context.traits.zipzipcodeString
traits.country / context.traits.countrycountryString (Starting with a capital letter)

Getting contact details

The easiest way to retrieve contact details of an existing user in Mautic is by specifying the unique user trait in the Mautic property name to used as lookup field dashboard setting. RudderStack will look for this property in the event's traits or context.traits and use the value for contact lookup.

If the events do not contain the property specified in the above setting, then:

  • RudderStack uses the email property in the event.
  • If email is not present, RudderStack then creates a new contact in Mautic.

Optionally, you can also pass the contact ID in your event's externalId, as shown:

{
"context": {
"externalId": [{
"type": "mauticContactId",
"id": "1hKOmRA4GRlm"
}]
}
}
RudderStack checks if externalId.type is set to mauticContactId before using the id field for contact lookup.
The contact ID passed in your event's externalId takes precedence over the user property specified in the Mautic property name to used as lookup field dashboard setting.

Group

You can use the group call to link or delink a Mautic contact with a segment, campaign, or a company.

A sample group call is shown below:

rudderanalytics.group("group01", {
"name": "Alex Keener",
"type": "Segments",
"operation": "add"
});

RudderStack uses the type trait present in the group call to link or delink a Mautic user to a segment, campaign, or company. You can add or remove a user to a group using the operation trait. If this field is not explicitly set, RudderStack sets it to add by default.

The following table lists the supported group traits:

RudderStack propertyPresenceNotes
traits.typeRequiredYou can set it to Segments, Campaigns, or Companies.
traits.operationOptionalIf not set, RudderStack sets it to add by default.

Similar to the identify call above, RudderStack retrieves the contact ID from the group call in the following order of precedence:

  1. If externalId is present, RudderStack checks if the type is set to mauticContactId. If yes, it uses the id field for the contact lookup.
  2. If you have specified a unique user property in the Mautic property name to used as lookup field dashboard setting, RudderStack will look for this property in the event's traits or context.traits and use it for the contact lookup.
  3. If the events do not contain the property specified in the above setting, then:
    • RudderStack uses the email property in the event.
    • If email is not present, RudderStack then gives an error.

Supported mappings

The following table lists the mappings between the RudderStack and Mautic properties:

RudderStack propertyMautic propertyData typePresence
groupId/traits.groupIdSegmentId
message.context.externalId.idCONTACT_ID
RudderStack propertyMautic propertyData typePresence
groupId/traits.groupIdCampaignId
message.context.externalId.idCONTACT_ID
RudderStack propertyMautic propertyData typePresence
groupId/traits.groupIdcompany_id
message.context.externalId.idCONTACT_ID

Contact us

For more information on the topics covered on this page, email us or start a conversation in our Slack community.

On this page