Generate an email after 5 days after a custom table insert

David Pearson asked on August 24, 2016 22:08

I am working with a custom table where a sample order is store, the data is saved into the table and a Custom Activity called "Custom Sample Order" is created in the EMS.

Attempting to understand the Marketing Automation here. I am setting up trigger for Custom activity. I was wondering if I can set the condition for the Activity Title equals "Custom Sample Order"?

My end goal is sent an email 5 days after a custom sample order is order to the customer.

Looking for some good info, maybe a step by step example how to set up email triggers to generate emails.

Thanks David Thanks David

Correct Answer

Richard Sustek answered on August 25, 2016 08:36

Hi David,

EDIT: I just noticed you are saving order in a custom table - may I ask why that is? There isn't any trigger for inserting new record into a custom table so you would have to "start" the marketing automation process manually (well, I mean manually in the API e.g. in the Global event handler for inserting new row into a custom table)

Kentico's marketing automation already contains Wait step so what you could do is to create an automation which gets triggered whenever an order is created and then has a:

  • Wait step for 5 days
  • Send e-mail step to send out your e-mail

Unless you need something really specific, you don't need to have anything custom for this purpose.

1 votesVote for this answer Unmark Correct answer

Recent Answers


David Pearson answered on September 1, 2016 16:58

HI Richard, The custom table is being use for saving product sample orders. I am not using the E-commerce module on the site. The sample order is process with a helper class that places the order to an outside system.

This helper class inserts the order in a custom table and can insert into the Forms table also if need be. I was also able to generate and save a custom activity in the EMS link to the current user and update the current user info in the contact management.

I am logging. Two questions.

1: Is there a API way (Maybe a method to the record id) to link the custom activity object to the custom form record or the form record (if this approach is easier)? Looking at how to link the form record in Activity detail to the form record via the API.

2: Under Marketing Automation I notice I can create a trigger for Activity Type: Custom Activity. Is there a Macro I can use in the Additional condition that will pull the Custom Activity name SampleOrder?

Thanks David

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.