How to create a campaign - mage-mzax/emarketing GitHub Wiki

How to create a campaign

Getting started

Creating a campaign is quite easy. Go to your "Manage Campaign" (Promotions / eMarketing Campaigns) page in your Magento Admin Panel. On the top right you find a button that reads “New Campaign” — go ahead and click it.

Magento eMarketing new campaign screen

Now you have the option from creating a new campaign from scratch or use a so called "campaign preset" that has most settings for common campaigns already defined. So for instance you can click on "Birthday Email", "Abandon Shopping Cart", "Welcome Email",... etc and it will have all the filters and campaign settings for you defined and you can tweak them as you wish to fit your needs.

Now lets go ahead and create a new campaign from scratch so you can get a good understanding how it works.

Creating a new email marketing campaign

The first thing you have to define is the medium that you want to use to send out your new campaign. Most common medium is an Email, other options could be a text message (SMS), WhatsApp Message, real physical letters or whatever, you name it. The current version (v0.2.7) only has Email as medium available. I hope to be able to change that soon. Remember, once the medium is selected you can not change it any more.

So lets choose "Email" as medium and give your campaign a name, e.g. "My First Text Campaign”, then click continue.

Campaign settings

Recipient Provider

For the next step you have to define the campaign recipients. Now this is important to understand, you have to tell your campaign where to look for recipients. At the moment you have three options available:

  • Magento Customers - If you want to send a campaign to your customers based on your customers attributes or behaviour, then this is what you want to choose. Common examples are "Welcome Email", "Happy Birthday Email", "Long time no buy" or some one-off newsletter to a certain segment of customers. It will basically use your customer table.
  • Magento Orders - Sometimes you want to send an email to your customers that have just placed an orders — or even guest checkout orders that don’t have any customer defined. For instance — order follow up, give us a review, up sale - bought X but not Y. Basically, when you want to send out an email to your customers only once, no matter how often they buy then you would use “Magento Customer” as email provider, if however you want to send out an email to when ever a customer buys something, you would go for the “Magento Order” option.
  • Magento Shopping Carts - The best example would be your Abandon Shopping Cart email. You can send out an email to any active cart that has at least one item in it.

Once a recipient provider is set and the first email has been send out, you can not alter it any more, also altering may change your filters, but more on that later. We will go through the filters in a bit which will allow you to create the actual segments and fine tune who should receive your campaign, but first lets look at the settings on this page:

Sender Store

This setting obviously is only relevant for multi-store Magento set ups. Pick the store that you want to use as sender. You can still send out to recipients from other stores - this setting simply defines the sender that is being used.

Check Frequency

How often do you want the campaign to check for new recipients. Some filters are quite quick and easy to run and are done in less then a second, others however can be quite complex and may take 5 seconds or more to run, but many times you don’t need to check for new recipients every 10 minutes for all campaigns and once or twice a day is perfectly enough. So for instance, birthday emails, you only need to be checked those once a day, while abandon cart emails should be checked every hour or even all the time. So choose the frequency that you thinks make most sense. You can always change it.

Minimum Resend Interval

As complicated as it sounds it only lets you define how often a campaign can get sound out to the same recipient (Customer/Order/Cart,…). For many campaigns this should probably by “Only send once”, but there are cases like the Birthday campaign for example that should get send out every year. Maybe you have a campaign to give offers to your customers based on their latest viewed products or wishing list, but don’t want to annoy them all the time, so set it to “Two months”, then at least two month has to pass before the recipient can retrieve the email again, if of cause the customer matches your filters.

Those were the basic settings that you should understand, again campaign presets will make it easier and you can also great them yourself and share them with others.

Your email content

Click on "Content"-tab on your left. Here is where you can edit the campaign content. If you have chosen “Email” as medium then you should have access to the email editor. In order to get the email editor started, you need to select a template. The extension comes with a default template, let’s go and choose that, select “One Column Template”. Feel free to click the little “full screen" button, that makes it a lot easier to edit the campaign. I will leave the editor to you, have a play around.

Campaign Email Editor

Bellow the editor you have the options to send out the email only to certain times. Now be careful though, this will not make sense for all campaigns, for instance if you have a Abandon Shopping Cart campaign then you want to get the messages out as soon as possible, the birthday emails on the other hand can get send out every day at noon or something. If it’s a campaign that has only a few emails to send out, then it can be done within an hour. Some campaigns may generated more emails a day and then selecting only one hour might not be enough to get them all out— so thing about choosing a range e.g. 10am-16pm.

Once you are done, make sure you set an email subject and then click “Save And Continue Edit” on the top right.

Filters

Once saved the first time, there are a few more settings available. You can find a detailed description here. Right now I want you to go to the "Filter / Segmentation" tab so we can fine tune your campaign a bit more.

Campaign filter and segmentation

Every recipient provider can provide some default filters, for instance the “Newsletter subscription status”. You are free to remove or change them. If you are familiar with the Magento promotions then you will probably recognise this layout. It basically works the same way. The green plus lets you add new filters, and the bold underlined text are fields that you can edit. Click on the "plus (+)", it will list all filters that work with your current recipient provider. Some filter will give you a set of new sub filters - so for example choose "Customer viewed product...ago". You then have a new "plus (+)" that lets you choose filters for matching only certain products. The filters will look up any of your custom attributes that you have created for your products and customers.

Go ahead and play around with the filters - see what filters are available there are quite a few already and I am trying to get new ones in. So if you have an idea for a filter, let me know!

Now once you have defined your filters, you want to make sure they work, click the "Test Filter" button at the right, a new window will pop up. Depending on the complexity of your filter it may take a few seconds to run through the data. You now can see which filter return any results and which filters do not. You may find that each filter returns a result, but all filters together will not return any. That means that there are no results that match all filters combined. Click on the “X Customers found” link and you will see a small data grid containing all recipients (objects) that match your filter. Usually one column also describes the value that you filter on.

Test filters

Sometimes your filters don’t match because they are based on the current time, e.g. Birthday or Bought X days ago. -- in that case you can emulate the current time to be any date range. So for example if you send out a birthday email, but there is no customer who’s birthday is today, then emulate the time to be the last month for instance and it will show you the results as if the whole last month is today.

If you are not happy with your filters, just alter them and click "Test Filter" again and it will update the results, but remember to click "Save And Continue" once you are done.

Test with real recipients

Find recipients

After you have saved your filters, go to the "Recipient"-tab to find all the recipients that match your current filters, and again, click emulate time to increase the current time spectrum. The "action"-dropdown will let you preview your email for that recipient or send it to any email address for testing. By the way, the preview window will refresh automatically if you click Quick Save at the email editor -- great for designing your emails.

Once you are done with your emails click "Start" to run your campaign.

Further reading: