Adding attachments to an email dynamically in KnowledgeSync

The KnowledgeSync send email feature is typically used to deliver a static email composed of an email body with KnowledgeSync alert data merged into it and perhaps a report output or static file added as attachments.  There is another less known capability in KnowledgeSync that allows you to attach files dynamically.

This is a great feature if you want to be able to programmatically send out an email with an attachment that varies based on some conditions.  To do this all you need to do is the following:

 

In the query definition used by the KnowledgeSync email event, add a column called “attachment_files”.  The column name must match this exactly and is case sensitive.  When the email server processes an email event using a query that contains this special query column it will attempt to attach whatever file is specified in this “attachment_files” column.

This means the attachment_files column should contain a UNC path to a file.  You can even have it attach multiple files by using a comma delimited list of UNC file paths in this column.  For instance “\serverfoldermyfile.doc, \anotherserverfolderaPicture.jpg”.

 

If the path contains an invalid file path the email server will skip attaching the file and send out the email without the attachment(s).  It is important to also note that the KnowledgeSync service user account needs access to the UNC paths so that it can access the files specified.

ABOUT THE AUTHOR

Kris Halsrud

Kris Halsrud is a Senior Analyst / Developer for Customer FX Corporation.

Submit a Comment

Your email address will not be published. Required fields are marked *

Subscribe To Our Newsletter

Join our mailing list to receive the latest Infor CRM (Saleslogix) and Creatio (bpm'online) news and product updates!

You have Successfully Subscribed!