Forcing email activities to be sent right away during testing

To avoid waiting for the scheduled email send time to arrive in an authoring or staging environment, you can run SQL statements to set the send time to the current time. The SQL statements temporarily override the Time to start delivery field value that is set in the Administration Console for the email account.

Before you begin

Ensure that the steps to prepare the email activity for testing in Management Center and store preview are complete. For details, see Testing an email activity.

Procedure

  1. Log on to the WebSphere Commerce server that you are using to test the email activity.
  2. To force a specific email activity to be sent right away, run the following SQL statements:
    1. UPDATE DMACTIVITY SET STARTDATE = current_timestamp WHERE NAME = 'name_of_email_activity'.

      Replace name_of_email_activity with the name of the activity that you are testing.

    2. DELETE FROM DMACTATTR WHERE DMACTIVITY_ID = 0 OR DMACTIVITY_ID = (SELECT DMACTIVITY_ID FROM DMACTIVITY WHERE NAME = 'name_of_email_activity');
  3. Using the Administration Console, either run the SendMarketingTriggers job manually, or wait for the next time the job runs according to its scheduled interval setting. The SendMarketingTriggers job schedules the sending of email activities. By default, this job runs every 30 minutes.

    After the SendMarketingTriggers job runs, the test email activity should arrive in the inbox of the email account belonging to the test customer.

  4. After the initial test, if you want to force the email activity to be sent again:
    1. Obtain the ID of the email activity by running this SQL statement:
      SELECT DMACTIVITY_ID FROM DMACTIVITY WHERE name = 'name_of_email_activity'
      
    2. Run the following SQL statement:
      DELETE FROM EMLPROMO WHERE NAME LIKE 'DialogMarketing-ID_of_email_activity-%'
      When you form this SQL statement, replace ID_of_email_activity with the DMACTIVITY_ID value that you obtained in step 4.a. Here is an example:
       DELETE FROM EMLPROMO WHERE NAME LIKE 'DialogMarketing-123456-%'
    3. To resend the email activity, repeat steps 2 and 3.