Referencing data from the last history element of a specific type on a timeline

If you are using the 'wait for next' history wait widget or if you are trying to reference a history item that triggered an 'add to list' workflow staring step, you may be interested in pulling the data from that transaction. This is possible using a set of special dynamic fields. The format of the dynamic field is

For incoming history items (i.e. a prospect does something):

%CONTACT.LAST_INCOMING_HISTORY(<history type>).<parameter>%

For outgoing history items (i.e. a marketing email was sent):

%CONTACT.LAST_OUTGOING_HISTORY(<history type>).<parameter>%


In the above example, the only history dynamic fields directly available in the email are those associated with the list that triggered the campaign. If you are confident that the contact was added to the list as a direct result of the contact filling out a form, you can leverage the 'last history item' format of the dynamic field to access the elements of the form.

For example:



How do I determine the <history type> and the <parameter>?

The history type is going to be as it appears for example in the Contact Activity Timeline. For example, if I want to specify an link click from an email, I would use EmailLinkClick as the history type:




To specify the parameter, you can refer to the query builder to see how these should be constructed. Using the EmailLinkClick as the same example for the history type, we want to extract the URL of that email link click. 

In the query builder you can see the Url is one of the options. 


So, in order to extract the URL for the clicked link in an email, your dynamic term would be:


For clarity in formatting, let's use 'Created At' as one more quick example. If I want the time the email link click was detected, I would use the following:


Note that the parameter is UPPERCASE while and spaces are replaced with an underscore.


Was this article helpful?
0 out of 0 found this helpful



Please sign in to leave a comment.