0

Is there a way to send out an automated email notification (to a pre-defined email address) every time a new subscriber enters a Data Extension in SFMC?

Thanks

  • How are you loading subscribers into the DE ? – Maneesh Jan 12 '18 at 3:18
  • Web Collect form. Every time a form on the website is submitted, a DE in SFMC gets populated with the submitted data. – MarnieK Jan 12 '18 at 3:36
  • 1
    You could have a automation run a query to check for this and include a validation step. Did you want to be notified on a per entry basis or would a summary of all entries in the last hour (if any are added) be sufficient? – Luke Harrison Jan 12 '18 at 5:45
  • Per entry basis would be ideal otherwise hourly summary would do. Does the automation need to have further actions (eg. send email) by design or can it stop at the validation step? – MarnieK Jan 14 '18 at 21:54
2

Approach 1: Use AMPscripting to calculate new records

Step 1: Create a simple email that will have following ampscripting (my example uses new records today but you can tweak this to new records in the past hour).

%%[
VAR @currentSystemTime, @Today
SET @currentSystemTime = NOW()
SET @Today= FormatDate(SystemDateToLocalDate(@currentSystemTime), "YYYY-MM-DD")
]%%
%%[
var @rows, @row, @rowCount, @numRowsToReturn, @i
set @rows = LookupRows("TestDE","SubmissionDate",@Today)
set @rowCount = rowcount(@rows)
if @rowCount > 0 then
for @i = 1 to @rowCount do
var @EmailAddress
set @row = row(@rows,@i) /*get row based on loop counter */
set @EmailAddress = field(@row,"EmailAddress")
]%%

Step 2: Set up an automation that runs on your cadence, with the email in Step 1.

Pros: Not too many steps Cons: An email will be send based on the cadence you chose, even if 0 records were added.

Approach 2: Use SQL to calculate new records

Step 1: Create a field named Entry_Dt (data type: date; nullable field; set default value to current date). Whenever a record is inserted into the DE, the current date will be added to the record.

Step 2: Build a new DE that will capture results of SQL that will run in Step 3.

Step 3: Build a SQL query that returns all records that were inserted into the DE in the past hour (or your preferred cadence), based on the Entry_Dt field in Step 1.

Step 4: Create a list of email addresses who should receive this new records emails by building a list under Subscribers > My Subscribers > My Lists.

Step 5: Build a simple email that captures the results from the DE that you created in Step 2.

Step 6: Build an automation that runs the SQL, add a validation rule that check how many new records exist. If > 0, then Send email, else end automation.

Pros: Only sends an email when new records are added. Cons: More steps involved

Hope this helps!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.