Call Your E-mail Metadata Capture SmartObject Right From Your Outgoing Message

I have a client who wants to track all outgoing messaging from all of their K2 applications to assist in troubleshooting if someone says they didn’t receive a notification.

Normally, no big deal; create a database table or two, a database view and an insert and a list proc, turn those procs into methods in a SmO and call it from a SmartObject event after each of the email events in the workflow. Good to go, right?

But all outgoing messaging includes escalation e-mails… trickier, but I’ve got a slick little trick up my sleeve.

How to track message metadata from an escalation email? Why, call your SmartObject method from the message body, of course!

The image is of the message body panel of the K2 blackpearl E-mail Event wizard. The message body shows the SmartObject call below the message body text.
Call your message metadata capture SmartObject right from your outgoing message

In a typical workflow scenario, you might add an E-mail Event to an activity when an action is completed. So recording that message for tracking later is as easy as copying the addressees, subject line, and so forth into a subsequent SmartObject call. But escalations work differently — if you choose to use an email escalation, you’re presented the familiar E-mail Event wizard, but there’s no way to add an event to follow it.

BUT embedding a SmartObject method call inside of the message body in the wizard will achieve the same result for you without the need for a subsequent event.

K2 will execute the SmartObject method when the email event fires in the workflow. As long as no value is returned to the body of the message, nobody will be the wiser — and that metadata you want to track will be safe and secure inside your database before the actual message takes flight!

Call Your E-mail Metadata Capture SmartObject Right From Your Outgoing Message

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s