I have created around 30 emails, each one of them has one or two “Tips” on how to use my certain products. Now, I want to build a Campaign to send one of the 30 emails randomly to all contacts in a segment on every few days.
If you can develop a plugin then I think there might be a way. you can subscribe to campaign trigger event and change the email you wish to send.
If you want to send unique email every time then you’ll have to keep a count(may be store email ids in a custom field and match to ensure last sent mail wasn’t this), else if you want to choose randomly that would be fairly easy with event subscriber approach.
all emails should go eventually and later cycle should start again… “cycle” means not in the exact same sequence of emails sent in the first cycle but all 30 emails should go again in random order.
what I think should be a good idea is:
create a custom campaign action(https://developer.mautic.org/#extending-campaigns) let’s say “Send Random Email”.
Then set up a campaign with segment and this action.
finally your action should be to choose random email from your email list and send email(via this action). https://developer.mautic.org/#models(see this example for sending emails from code).