Table of Contents

Email Campaigns

Campaign Types

The typical process of creating business relationships is: Lead > Opportunity > Account

Create Target Lists and Targets

Process

The campaign process includes defining targets and target lists to direct the campaign to. Once you have determined your campaign criteria and who you want to target, then you will be ready to create a target list and then assign the targets to it. Usually, you create or import a target list first and then relate it to a campaign. However, you can also create a campaign first and then associate it with a target list.

Definitions

While targets are stand-alone records that are not attached to contacts or leads, you can include contact, lead, target, and user records in a target list, as well as a combination of these types. Example: You may choose to target existing leads that need to be ‘nurtured’; run a report with lead criteria and import the report as a target list.

Note: Users can not ‘opt-out’, so they will not see the appropriate opt-out links in the email.

Target List Types

When you create a target list, you can specify one of the following types:

Notes:

Creating a Target List

  1. From the Shortcuts section on the Campaigns Home page, click Create Target List.
  2. On the Target Lists page, enter the target list information. See below.
    • Name: Enter a name for the target list.
    • Type: From the drop-down list, select the target list type. See Target List Types section above for details.
    • Assigned to: Enter the name of the user assigned to this list; click Select to select from the User list. By default, it is assigned to you.
    • Team: Enter the name of the team assigned to this list; click Select to select from the Team list. By default, it is assigned to you. Note: Teams are available in Sugar Professional and Sugar Enterprise.
    • Description: Enter a brief description of the target list.
  3. Click Save to save the target list; click Cancel to exit the page without creating the list.

Creating a Target

This step is not necessary if you have already selected all of the targets you needed when you created the target list.

While you will generally purchase target lists and/or select targets from within Sugar, you can also manually create new target records. Targets are stand-alone records that are not attached to contacts or leads. If you plan to send email campaigns to existing contacts or leads, you will add them to your target lists.

  1. On the Campaign Home page, in the Shortcuts section, click Create Target.
  2. On the Targets page, enter information for the fields as needed. The majority of the fields are self explanatory. For information on some of the fields, see the fields below.
    • Email Opt Out: When you select this box, if the target clicks the “Unsubscribe” URL to opt-out of receiving your campaign emails, the system will display email address in the Opted Out sub-panel of the campaign’s Status page.
    • Invalid Email: When you select this box, if the email bounces back because the address was incorrect, the system will display it in the Bounced Messages, Invalid Email sub-panel of the campaign’s Status page.
    • Do Not Call: Select this box to add the target’s name to the Do Not Call list.
    • Team: Select the team that is allowed to view the account related to the target. Note: Teams are available in Sugar Professional and Sugar Enterprise.
  3. Click Save to save the target list; click Cancel to exit the page without creating the list.

Adding Targets to a Target List

Once the target list record is created, you can add target, contact, lead, and user records to the target list.

From the appropriate sub-panel, click Select or Select from Reports to add the target records, which will appear in the sub-panel.

Note: Select from Reports is available in Sugar Professional and Sugar Enterprise.

Creating an Email Template

  1. On the Campaign Home page, in the Shortcuts section, click Create Email Template.
  2. Give the template a name, and fill in the other fields as needed.
  3. To insert variables, select the value the variable should contain using the drop-down menus next to “Insert Varaibles,” name the variable, and slick Insert. This will automatically insert the variable into the email body. You can also copy and paste the variable name into the subject field.
  4. To add HTML to the page, click the HTML button in the top left of the “Body” editing window. A pop-up will open and allow you to add HTML code. Click Update in the pop-up window when finished with the HTML.
  5. To insert an opt-out/unsubscribe link in HTML, add a paste the tracker URL from the Unsubscribe tracker (created in another stage). It should look something like: <a href=“http://customer.consortiumservicesllc.com/ReverseProxy/SugarCRM_Consortium/index.php?entryPoint=removeme%26identifier={optout}”>Unsubscribe</a>. For plain text emails, simply paste the full URL into the text. It is important that the name inside the {} matches the name of the tracker!
  6. When finished, click Save at the top of the page.

Creating an Email Marketing Campaign

Creating an email marketing campaign through the wizard walks you through the steps for creating a campaign, adding budget, creating and linking tracker URLs and target lists, as well as defining the email to send out and executing the campaign.

Note: If you step outside the wizard prior to saving, you will lose your campaign data.

  1. On the Campaign module, Actions section, select Create Campaign (Wizard).
  2. Select Email from the Campaign Type screen, then click Start to launch the wizard.
  3. On the Campaign Header screen complete the fields described below to identify the campaign then click Next. Note: The Start Date, End Date, and Status values are for your records only. These values do not impact the execution of an email marketing campaign.
    • Name: Enter the campaign name.
    • Status: From the drop-down list, select the current status of the campaign. The status must be changed manually as the campaign progresses. Select from the following:
      • Planning: The campaign is in development and is not ready to execute.
      • Active: The campaign components are lined up and the campaign is ready to be executed.
      • Inactive: You do not want to execute the campaign at this time.
      • Complete: Once the results have been received, change the campaign status to complete.
      • In Queue: The campaign is waiting to be executed.
      • Sending: The campaign emails are in the process of being sent out when sending the emails out in several batches.
    • Start Date: Click the Calendar icon and select the date on which the campaign begins.
    • End Date: Click the Calendar icon and select the date on which the campaign ends.
    • Assigned to: Enter the name of the user assigned to the campaign; to choose a user from the Users list, click Select, and click the user name.
    • Team: Enter the name of the team that is allowed to view the campaign information; to choose a team from the Teams list, click Select, and click the team name. Note: Teams are available in Sugar Professional and Sugar Enterprise.
    • Type: The type selected in Step 2 above will appear, for email campaigns, email will appear.
    • Description: Enter a brief description of the campaign.
  4. On the Campaign Budget screen enter budget and revenue details in order to track the campaign return on investment (ROI) as described below, then click Next.
    • Budget: Enter the budget for the campaign.
    • Expected Revenue: Enter the estimated revenue from the campaign.
    • Currency: Select the currency type for the campaign.
    • Actual Cost: Enter the actual cost incurred to conduct the campaign.
    • Expected Cost: Enter the estimated cost of the campaign.
    • Impressions: The number of people who opened the email.
    • Objective: Explain the goal of the campaign.
  5. On the Campaign Tracker URLs screen, enter the tracker URL details in order to track the number of click-thrus for your campaign as described in the Campaign Tracker URLs Field/Description list below, then click Next.
    • Tracker Name: Enter a tracker name for your reference; use alpha-numeric characters. Example: Register Now!
    • Tracker URL: Enter the tracker URL and click Create Tracker. To create additional tracker URLs, click Create Tracker again. Example: http://www.sugarcrm.com.
    • Opt-out Link: Select this box to identify the tracker URL as an opt-out link and embed your “Unsubscribe” instructions in a tracker URL. By default, the system uses the removeme.php file which contains these instructions, and displays this file name in the Tracker URL field. Note: If you do not select the Opt-out link option, then the system inserts the default opt-out link. So, if you do not want to include an Opt-out link in your campaign message, select the Opt-out option but do not insert the link in the campaign message. Click the Create Tracker button for each tracker that you create, and click Next when finished.
  6. On the Target Lists screen select or create target list(s) for use with your campaign. The target list(s) appears under the Target List Name below. Click either Save and Continue to move to the Marketing Email screen, or click Finish to view a summary of the campaign and enter the marketing email information at a later time.
    • To use an existing target list: click Select.
    • To create a new target list enter the name and type of target list and then click Create.
  7. On the Marketing Email screen select or create the email template you will use to send to your target list(s) and complete the fields as described below. You can edit a previously created template to embed tracker URLs. Click Next to send the email.
    • Name: Enter a name for the marketing email.
    • Use Mailbox: From the drop-down list, select a mailbox that is set up for BounceHandling. The mail box name appears in the From Name field by default and can be changed. Note: This mailbox needs to be already set up by the Sugar Administrator.
    • Status: From the drop-down list, select Active if the record is in use; select Inactive if the record is not in use. Only active records will be queued for campaign launch. Important: Always set the status to Inactive while in development and testing. The status must be set to Active for the campaign to be executed.
    • From Name: Enter the name of the organization or person that is sending out the email.
    • Start Date & Time: Click the calendar icon and select a date to send out the email. Enter the time in the adjoining field. Note: To queue the email for campaign launch, select a date and time that has already passed; only after you ensure that the test email was successful.
    • Email Template: From the drop-down list, select an existing email template; to create a new template or edit an existing one, click the adjoining Create or Edit link respectively. Note: You will need to edit the template to add the Tracker URLs described in How Do I … Create Email Templates.
    • Send This Message to: Select one or more target lists from the box below; to send it to all the target lists in the box, select the All Target Lists in the Campaign box.
  8. On the Send Email screen choose Finish, Send Marketing Email As Test, or Schedule Email, depending on whether you wish to send out a test, schedule your email to be sent, or simply to save your work and go to the summary. Click Finish. The campaign summary appears.
  9. On the campaign summary screen you can edit the campaign, view the status and view the campaign return on investment.
  10. In the Marketing Email section of the summary page you can send tests and schedule the email, as well as create a new marketing email to add to the campaign. Note: Prior to sending the email, run the campaign diagnostics.

Send Test Email

To send the test emails, click the Send Test button above the detail view. Important: You MUST have a test target list for the test emails to be sent out.

Execute the Campaign

If you have multiple targets with the same email address, Sugar will send the campaign email to only one target, chosen at random. The other email addresses, considered duplicates, are suppressed.

To execute the campaign:

Duplicate Records

There is no need to worry about duplicate records. While executing the email campaign, Sugar will automatically detect duplicate emails in the target list and will only send the email to one of them. The selection process is random.

Manually Send All Emails in The Queue

If you have emails in the queue, but you want them sent immediately, you can:

  1. Log in as Administrator and click the Admin link in the top right corner of the page.
  2. Scroll down to the “Email” section and click Email Queue.
  3. You will see a table of currently queued emails. Click the Send Queued Campaign Emails button at the bottom of the table. This process can take a while.
  4. If the emails do not, you may need to: select all emails you wish to send using the check boxes, click on Actions at the top of the table, click Mass Update, then at the bottom of the table change “In Process” from ”-none-” to “No”, and click Update.

Create and Embed Tracker URLs

IMPORTANT: The Tracker Name used in all email templates is “optout”. Use this name!

  1. From the Campaign module, select the desired campaign.
  2. On the Campaign detail page, scroll down to the Tracker URLs sub-panel, and click Create.
  3. On the Campaign Trackers page, enter information for the fields as described in the Field/Description table below.
    • Tracker Name: Enter a tracker name for your reference; use alpha-numeric characters. This name is very important! This name is used when entering the tracker URL into an email template! The end of the URL will look like “identifier={optout}”.
    • Tracker URL: Enter the tracker URL and click Create Tracker. To create additional tracker URLs, click Create Tracker again. Example: http://www.sugarcrm.com.
    • Opt-out Link: Select this box to identify the tracker URL as an opt-out link and embed your “Unsubscribe” instructions in a tracker URL. By default, the system uses the removeme.php file which contains these instructions, and displays this file name in the Tracker URL field. Note: If you do not select the Opt-out link option, then the system inserts the default opt-out link. So, if you do not want to include an Opt-out link in your campaign message, select the Opt-out option but do not insert the link in the campaign message.
  4. Copy the full tracker URL to you clipboard so that it cam be pasted into your email template. The URL will usually start with http://127.0.0.1:80. This doesn't need to be changed, but it should be changed to the proper domain name when pasted into the email template.
  5. To create the campaign tracker, click Save; click Cancel to exit the page without saving your changes. You can now insert this tracker URL into an email template of your choice.

See Creating Tracker Redirect Links above.

Managing the Scheduler

The Normal Way

  1. Log in as Administrator and click on the Admin link at the top right of the page.
  2. Scroll down to the “System” section and click Scheduler.
  3. Click on Run Nightly Mass Email Campaigns.
  4. Click Edit.
  5. Change settings according to your needs.
  6. Use standard crontab notation for basic setup, or click the Show Basic Options link next to “Interval” to get a more user-friendly option selection.
  7. Click Save when finished.
  8. SugarCRM does not actually create a cron job, it must be created on the server manually. Log onto the CRM server as root and edit /etc/crontab. Add an entry identical to the cron settings in the Scheduler Settings page in Sugar. Enter:
    0 * * * * www-data php5 /var/www/sugarcrm/cron.php

    assuming that: you want it to run every hour on the hour, every day of the week, as the user www-data, using the php5 interpreter, and the cron script is located in /var/www/sugarcrm/. These are a lot of assumptions; adjust them as needed.

  9. SugarCRM is finicky when it comes to the Scheduler. The settings in the Scheduler Settings page must match the crontab entry. Sometimes emails simply don't get sent, and it takes a log time to troubleshoot schedule problems. There is a better way.

The Better Way

  1. Download the script send_from_email_queue.py from the SVN server at http://10.253.1.48/svn/SUGARCRM_AutoFormFill/
  2. Place the script somewhere on the SugarCRM server. I placed it in the root of the CRM directory.
  3. Put an entry in /etc/crontab similar to:
    0 * * * * root python /path/to/send_from_email_queue.py

    This is useful because it forces Sugar to send a batch of emails and ignores Sugar's schedule. More notes are located inside the script.

  4. The size of the email batch is configured in Sugar under Admin > Campaign Email Settings.