0

How we can send an transaction email when record added in DE, we can send email via journey builder but I want to send on quick basis like record inserted and email send.

  1. We are adding record in DE from import.
  2. We can do this via API but when record inserted in DE how we will call that API on immediate basis?
4
  • 1
    There is no feature in marketing cloud that sends an email when you add to a DE – EazyE Mar 11 '20 at 12:14
  • Does this need to be immediate? If so, why? Why would the email be time sensitive on a manual process such as import from desktop that would warrant a situation like this? If they want real time action, then you need to utilize the tools that exist to handle this. Otherwise a 1 hr. scheduled automation to send/entry event to JB should be sufficient. – Gortonington Mar 11 '20 at 13:56
  • My actual requirement something like, we will get the Lead from third party so when this record is inserted into DE we want to send transaction Email. – Ravikant Kedia Mar 12 '20 at 6:22
  • Doesn't seem like a real-time transmission then and should be suitable for a journey with a data extension entry source and a recurring schedule (as mentioned in the first paragraph of my answer). Also check out the following documentation: Schedule a Data Extension Entry Source – Markus Slabina Mar 12 '20 at 7:52
3

There is no automatic way to listen to imports/updates to a Data Extension. If you import a CSV a file drop automation could be suitable, otherwise you will need to trigger the API using a program/code. However, check if a realtime trigger is really necessary for your use case or a data extension entry source with a recurring schedule is also sufficient.

API Options

If the API approach is feasible for you, as you mentioned in 2) in your question, you could either:

  • Configure your data extension as a triggered send data extension and use the API to trigger the message (and write to the DE in the background)
    • Either create your triggered send definition in Email Studio and trigger it
    • Or use the (newer) Transactional Messaging API, which requires configuration using the API rather than email studio
  • Use a Journey with an API entry event with your data extension in the background

In both approaches you need to trigger a different endpoint and not the one for adding a row to a data extension, but in the background data will indeed be added to a data extension. If that is sufficient for your use case, that will be the solution.

Edit (due to additional information from the comments): You will have to do some programming work to create a script/program that goes through your data (e.g. using your CSV as input) and triggers the Journey Builder or Transactional Messaging API for every line/record. However, as already said this is a custom solution, that requires coding effort. This can be achieved using the programming language of your choice as long as it is capable of interaction with REST APIs.

File Upload Option

If your import to the DE can happen via a CSV on the enhanced FTP you could also create a triggered automation with an import and a send email (or journey trigger) activity.

So your automation would look like this:

  1. Starting Source: File Drop
  2. Optional: If the file is encrypted: File Transfer Activity
  3. Import Activity (writes the data of the CSV to the data extensions)
  4. Send Email Activity

Further resources:

API Options

Upload / Automation Option

3
  • How I can run API if I will add record from my desktop as a CSV file? I am not using any FTP server. – Ravikant Kedia Mar 11 '20 at 13:18
  • You didn't mention this fact in your question, but rather statet that "We can do this via API". However if you upload a CSV from your Desktop, then The solution using the triggered Automation would be a good fit. Instead of uploading the file to DE import, you upload it to the FTP using an FTP client and the Automation automatically handles the import to the DE and sending the email. – Markus Slabina Mar 11 '20 at 13:20
  • If enhanced FTP isn't feasible for you, unfortunately you will have to do some programming work to create a script/program that goes through your data (e.g. using your CSV as input) and triggering the Journey Builder or Transactional Messaging API for every line. However, as already said this is a custom solution. There is no automatic way to listen to Imports to a DE if they are done manually and not using file drop automations. – Markus Slabina Mar 11 '20 at 13:30

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.