Mautic Community Forums

Unable to get the campaign rotation in EmailSubscriber

I would like to add some unique user tokens to an email, depending on which instance of the campaign is started. Much like a form submission campaign trigger, but without the form. I think the rotation field in the database is essential for this.

So in order to do that, I can link my specific data in a separate entity to the campaign, lead and rotation. Listen for the mautic.email_on_send event, and add the required tokens. But I can’t use the rotation in my subscriber, because the rotation is unknown at this point. I think it would make sense for the event’s source field to include the rotation, but I’m not sure if I can just add it to the array without interfering with Mautic core functionality.

If this is the way to go, I can create a PR with the necessary changes, if I’m completely wrong, please let me know :slight_smile: