Creating a Campaign

Navigation

 

Operations → Marketing → Autoresponder

 

Introduction

This section introduces the core functionality of the Email Autoresponder in the order needed to create a campaign. The section should be followed in sequential order.

Pre-requisite: A mail server must be configured prior to creating a campaign.
Pre-requisite: Email Templates must exist prior to create campaign email steps. 


The Autoresponder Campaigns Home page contains Administration Links and a listing of all campaigns. Click the new button located in the black header. 



The Add/Edit Campaign page is unique to the UltraCart site. When viewing an empty page, it contains standard html input elements. However, after saving a campaign, it will also contain a step hierarchy allowing for step creation and management. The step hierarchy is a tree structure powered by Javascript allowing for drag-n-drop management. 

Suspend / Activate

 


First things first – check the Suspended check box. The moment you create your campaign, it will be activated during the very next scheduled process. Depending on load, a campaign will process every 30 minutes to an hour. To avoid painful happenings, suspend the campaign until you have everything ready. 

 

General Settings

Autoresponder Campaign General Settings 

Field

Description

Name

An internal reference to the campaign. The customer will never see this name. Choose anything to provide a handy reminder as to what this campaign does. 
Examples: Abandoned Cart Campaign 
Weekly Coupons 
Upsell Item XYZ

Public Name

The customer will see this name if he/she chooses to opt out of the campaign. Make this name something attractive to the customer. 
Bad Example: Ways to make moolah 
Good Examples: 
Weekly Special Deals 
Special Offers 
New Product Announcements

Public Description

The customer will also see this description on the opt out screen. Use this field to provide information that would make a customer not want to opt out! Good information to include in this field is the frequency of emails. If a customer is opting out after receiving two emails from you, they might defer opting out if they see the description contains "3-4 emails a month", etc.

Mail Server

Select a mail server to send emails. As mentioned above in the Mail Server section, you are advised to develop and test your campaign with a non-vital sender address to ensure you don't lose a critical mail address to a spam list if you accidentally do something offensive with your campaign during development.

Enrollment Triggers

The triggers are hooks to the shopping experiences that allow for automatic enrollment to a campaign based on an event. There are six triggers. 

  • Return Email – This trigger will enroll any cart (containing an email address) into the campaign. It will trigger based on the Global Settings in the Return Email configuration screen.
  • Abandon Cart – This trigger will enroll any abandoned cart (containing an email address) into the campaign. It will trigger based on the Abandon Interval settings. 
  • Purchased Product – This trigger will enroll any customer making a purchase into the campaign. Enrollment Items can filter this enrollment trigger. 
  • Auto Order Decline – This trigger will enroll any customer who has an auto order declined. 
  • Auto Order CC Expiration – This trigger will enroll any customer who has an auto order credit card expired. 
  • Auto Order Canceled – This trigger will enroll any customer who has an auto order canceled.

Enrollment Items

The enrollment items work in conjunction with the enrollment triggers. They are filters for the triggers. If you provide a list of items, then only events with those items will trigger an enrollment. 

For example, consider the result if you add an item id, such as 'SOMEPDF' to the enrollment items field and check the enrollment trigger 'Purchased Product'. With that configuration, onlypurchases of SOMEPDF items will result in enrollment. This is useful if you with to upsell certain items or provide item specific marketing material. 

  • Enrollment Items only affect triggers. Items are meaningless without triggers. 
  • Enrollment Items affect all triggers. There is no pairing certain items with certain triggers. If you need different items for your triggers, create separate campaigns. 
  • Zero Enrollment Items is the default. With this default, triggers will fire for all items. Remember that Enrollment Items act as filters. 
  • You probably would not want to add any enrollment items to Auto Order triggers. That would cause those triggers to selectively fire, which would be undesired.

Email Lists

Email Lists are managed in a different part of the site. Navigate to Main Menu ï‚® Marketing ï‚® Email Lists to manage lists. By associating an email list with a campaign, the site will, on a regular basis, scan the list and enroll any new emails. This is yet another powerful way to automatically enroll customers. 

Be warned! The process will add any emails not in the campaign. The following scenario will happen if caution is not exercised: 

  • An Email List is associated with a campaign 
  • During the next sync, customers from the list are added to the campaign 
  • You delete a customer belonging to the mail list 
  • During a subsequent sync, the process will see the customer as 'new' and re-add them to the campaign, enrolling them as active at step 1. 


    If Email Lists are used, a good practice is to never delete a customer from a campaign. If the customer should not progress in the campaign any further, use the Recipients screen to terminate the customer. 

    But wait! How will I use the bulk operations to restart my campaign customers? Won't that customer be selected as well? 

    No. The  button on the campaign list screen does not affect Terminated recipients. The only way to affect terminated customer is explicitly using the Recipients screen (see following image). 



Suspended

This check box will suspend or activate a campaign. A suspended campaign will not sync Email Lists or run through the hourly processing.

Save Changes

Click to save your changes.


After saving changes, the page will reload with an additional item on the page – a start step. This is the initial step upon which all other steps in the campaign will originate from.

 


Warning: The Campaign page makes heavy use of Javascript and Ajax. The page communicates with the server frequently. If you see the message box below appear on the screen, wait. Seriously, just wait. The page doesn't lock the controls or treat you like a child – you could go click happy while the message box is up. But that would be bad - bad like "I hear something in the basement. I don't have a flashlight, but I think I'll go check it out any way." bad. 

 

Start Step

The start step is automatically created when the campaign is first created. It is displayed at the bottom of the screen (scroll down to see it). It does no action. It serves as an anchor. The start step can contain only one child step and cannot be deleted. 


The Start Step anchors all other steps 

The start step contains hyperlinks common to all steps. While the start step cannot be deleted, all other steps also contain a [Delete] link. The Delete action is discussed separately later in the chapter because it is complex. 

Hyperlink

Action

[View History]

This link will open a report page showing every customer that has ever passed through the step. The Step & Recipient History section discusses the history report in detail.

In Queue

This link will display all active recipients whose 'Next Step' is the Start step. These are customers who are newly enrolled.

Total Executions

This link will display all recipients – active or otherwise – who have ever passes through this step.

Successful

This link displays a history of all customers who have successfully completed this step. The start step does nothing, so all recipients will succeed this step.

Failed

This link displays a history of all customers who failed at this step. The start step cannot fail. Other steps may fail for numerous reasons. 

Logic steps may fail for invalid velocity code or an invalid $result velocity variable. 

Email steps may fail for a myriad of reasons such as connectivity issues, template errors or velocity code errors. 

Pause steps never fail.

[Add Step]

The Add Step link displays the Add Step form.



Adding a Step

 

Tip: A brief word about step names. The name can be anything you wish within the max character limit. However, the names are used as the output from logic steps to determine which step executes next. For that reason, keep your names simple. Do not add leading or trailing spaces, as that's sure to cause trouble down the road. Underscores instead of spaces may also prevent typing errors when matching logic outputs to child steps. The velocity error checker does not validate your $result values to child step names. It is your responsibility to get it correct.

 



Click the [Add Step] link at the bottom right of any step to add a step. The link will not be available for any step restricted to one child and already having a child. The Edit/Add Step form displays all properties available for all steps. Once a type is selected, non-applicable properties are grayed out. 

Edit/Add Campaign Step Form 



Add/Edit Step Form showing the different types of Steps 

 

Logic Step

The Logic Step allows for branching. Why branch? Branching is desired any time a different email should be sent based upon the customer. Possible reasons for branching:

  • Has the customer ordered before?
  • Has the customer ordered a specific item before?
  • Has the customer ordered with the last XX days?
  • How many items has the customer ordered?
  • Has the customer spent more than XX dollars?
  • Is today a particular month/week/day?
  • Is the customer in a particular state or region where one offer may be preferred?



 

Warning: The Logic step is a two-part step. The step is created and saved first, and then the logic is added. This allows for extra error checking of the velocity code. Do not forget to add code to your logic step. 
Forgetting to add code to your logic step will cause the step to fail, halting all recipients at that step. That would be bad – bad like digging up an alien gate, activating it, and then going through it with only light weapons and a single nuke. - Stargate

 



To create a logic step, select Logic as the type, provide a name for the step, and click Ok. No other settings are needed. Once created, the logic step will appear below its parent, and the overall tree structure will re-position accordingly. A small warning icon will appear in the bottom left of the step. This is an alert for empty logic. Any step with empty logic will fail, so the alert is your cue to add logic. 

Warning! A newly created logic step needs code! 

Click the [Edit Logic] link to add velocity code. A form will display providing a text area for velocity code. The Velocity Code section that follows provides detail on creating complex code. 

At a bare minimum, the logic step code must set the value of $result to the name of a child step. 

Campaign Logic Step - Logic Editor 

The editor will validate the code when the Ok button is clicked. Any errors will display the output from the velocity compiler. Admittedly, the error messages can be vague. However, the most important feedback is the line number. Use the line number to troubleshoot the problem. Google, the UltraCart forums, and the Apache Velocity mailing lists will help solve the problem. 


Campaign Logic Step - Velocity Syntax Error Message 

A logic step may have as many children as desired. Click the [Add Step] link and add steps as needed. The screen will re-position the steps as each are added.



Ending a campaign: If you wish to end a campaign at a logic step, simply set the $result variable equal to _ENDCAMPAIGN_
Example, which proceeds to step NextStepName unless the customer has ordered in the last 14 days. If they have, their campaign is over.

 

1
2
3
4
#set($result = 'NextStepName')
#if($customer.hasPurchasedInLastDays(14))
   #set($result = '_ENDCAMPAIGN_')
#end

 

 

Looping: If you wish to loop a campaign, then set a logic step $result variable equal to _GOTO:StepName_
The Sunday Night Coupons tutorial makes heavy use of _GOTO_ directives.

 

Email Step

Because email steps use templates, creating an email step is relatively simple. The major decisions are template selection and parameter overrides. Create an email step by clicking the [Add Step]. Supply a name and select a template. Click the Ok button to create the step. 


Email Step Creation Example 

The Email Step (shown below) has some links on it the other steps do not.

Autoresponder Campaign Email Step 

Email Step Links

Hyperlink

Action

Template

Click the template name to visit the template. From there, you may change the email content or parameters.

[View Performance]

This link will open a performance report showing email specific results for the step including bounces, opens, link clicking, and purchasing as a result of a campaign.

Opt Out

The Opt Out statistic displays the count of recipients who opted out during this step. Click the link to see a detailed list of every recipient who opted out of the campaign at this step.

Sales Response

This link displays the total sales attributed to this email. Click the link to see a list of all recipients who placed orders for this campaign. Please see the section near the end of the chapter titled "Attributing Sales to a Campaign" for important details about Sales Response.

Suspend

Click to suspend the step. A suspended step is skipped over, and the next step executes. This is a way to ice a step and still allow the campaign to continue.

[Parameters]

Click to edit email parameters. See the following discussion on editing parameters.



Editing Parameters

Email Templates containing parameters may have step specific values. To edit parameters, click the [Parameters] link on the Email step. You'll notice that the pointer doesn't change to a hand icon. This is a result of the drag-n-drop ability of steps (discussed later). 

Email Step's Parameters link 

When clicked, a form appears displaying the email template parameters and the defaults. Override any defaults by filling in the input field to the right of the default value. Leave the field blank to use the default. 


 

Pause Step

The Pause step does what it's named. It pauses. Pauses are useful to allow a customer to react to an email, or to simply avoid sending customers too many emails. 
To create a Pause step, click the [Add Step] link of any step and set the type to Pause in the Add/Edit Step form. The only other requirement for a Pause step is the duration. The Pause Duration is stored in hours, but the entry field allows shorthand for days and weeks as well. If no unit is provided, the number is assumed to be hours. The Pause Duration only accepts whole numbers. If fractional days are needed, enter hours (example: 3.5d = 84h). 


Adding a Pause Step 

Here are some shorthand examples: 



Rearranging Steps

Campaign steps may be rearranged by dragging and dropping a step onto another. When a step is dragged and dropped, all of its children come with it. The target step will highlight in yellow when another step is dragged onto it. Be patient with moving steps. Do not make another move while the Wait message is displaying. 

Dragging steps onto a step with no children is a straightforward appending to the target step. The dragged step becomes a child of the target step.

 Rules for Rearranging

  1. If a target already has children, the result depends on the target type.
    1. If steps are dropped onto a logic step, they become children of the logic step. Since a logic step can have numerous children, the dropped step becomes a sibling to any other children the logic step already has.
    2. If steps are dropped onto any other step that already has children, then the dropped step (and its children) is injected between the target and the target's children.



Action: Drag Step B onto Step D
Result: Step B and C inject between
Step D (target) and its children (Step E) 

    1. If the step being dragged (moved) has more than one branch, the target's original children are appended to the first branch. For the example below, Step B is dragged onto Step D. Step E is appended to the first branch. If this is not desired, simple move Step E to its new parent.



Action: Drag Step B onto Step D
Result: Step B, C and F inject between Step D (target)
and its children (Step E). Step E is appended to Step C. 



Deleting Steps

Deleting a step raises two issues.

  1. What do I do with the children of the step (subsequent steps in the chain)?

Choices:

  • Delete the children as well
  • Shift the children up, filling the hole caused by deleting the step.

 

  1. What do I do with recipients who are currently scheduled for the deleted step?

Choices:

  • Move them to another step of your choice.

These options are presented when the [Delete] link is clicked for a step. 

Please note: if you delete a Logic step containing more than one branch, the branches cannot be shifted up because they would collide. If you wish to keep the branches, move them to different steps before deleting the Logic, and then move them back in the desired order. 

Warning Message when deleting a Logic Step with multiple children