Attaching a dynamic attachment (from a DMS) to a message center email | Community
Skip to main content
isahore
Community Advisor
Community Advisor
October 28, 2020
Solved

Attaching a dynamic attachment (from a DMS) to a message center email

  • October 28, 2020
  • 1 reply
  • 2049 views

Hi experts,

 

I am trying to put my head around a requirement where we need to fetch and attach a file (.pdf) to an email delivery from the message center.

The file itself resides inside a DMS (document management system), and is not available publicly (cannot be accessed simply by a URL).

The only way the DMS provides access to a file is via a REST call, where the document ID is passed in the request parameter. The response from the DMS is not a URL, but the whole PDF file itself.

Now, I am struggling to make this work because I am not sure how and where to write some script (if possible at all) that retrieves the PDF via that REST call, saves it somewhere on the message center instance, and then attaches it to the email.

 

Any pointers/examples are highly appreciated.

 

Thanks,

Ishan

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Jonathon_wodnicki

Hi,

 

As with all things Message Center, the solution lies in the question 'is a 30 second delay acceptable'?

If what you're doing here is attaching receipts to order confirmations, probably fine to wait 30 seconds.

 

In which, do this:

  1. Spool requests to marketing instance instead of to Message Center
  2. Create a campaign that polls request table for unresolved requests every 30 seconds
  3. Depending on volume, send one at a time per recipient (easiest) or batch them
  4. Mark requests as resolved in table

 

Do not do this (I worked at a client that was sold this):

  1. Install AEM forms
  2. Install AEM
  3. Install Message Center
  4. Wait until project is cancelled

 

Thanks,

-Jon

1 reply

Jonathon_wodnicki
Community Advisor
Jonathon_wodnickiCommunity AdvisorAccepted solution
Community Advisor
November 2, 2020

Hi,

 

As with all things Message Center, the solution lies in the question 'is a 30 second delay acceptable'?

If what you're doing here is attaching receipts to order confirmations, probably fine to wait 30 seconds.

 

In which, do this:

  1. Spool requests to marketing instance instead of to Message Center
  2. Create a campaign that polls request table for unresolved requests every 30 seconds
  3. Depending on volume, send one at a time per recipient (easiest) or batch them
  4. Mark requests as resolved in table

 

Do not do this (I worked at a client that was sold this):

  1. Install AEM forms
  2. Install AEM
  3. Install Message Center
  4. Wait until project is cancelled

 

Thanks,

-Jon

Adobe Employee
November 18, 2020
Using the marketing instance as a middleware will not scale as for large transactional messages volume. Technically it will work but depending how the marketing instance is getting the request, it will not scale Use a serverless function instead such as Adobe I/O Runtime to make the in-between logic.