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
Solved! Go to Solution.
Views
Replies
Total Likes
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:
Do not do this (I worked at a client that was sold this):
Thanks,
-Jon
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:
Do not do this (I worked at a client that was sold this):
Thanks,
-Jon
Thanks for the reply. You are correct to assume what I am trying to do here - attach invoices to order related emails.
Even if the requests are directed to the marketing instance, still I need to make a REST call to an API and save the file with which the API responds.
Can you help me understand how to implement this? Would it at all be possible to do something like this in a javascript code inside the email template itself?
Thanks,
Ishan
Views
Replies
Total Likes
Views
Replies
Total Likes
Views
Replies
Total Likes