Hi fellow Marketers,
The objective is to send emails and alerts triggered by consumer interaction on our website. In an effort to avoid sending multiple emails and alerts to and about the same consumer, but providing a complete picture, we would like to bundle all of the interactions within a certain time frame and send them in a single email and alert.
Current Drafted solution-
Before I go create new fields for each product willy nilly, I'd like to bounce the idea around and get input to make sure I have the optimal solution.
Thoughts?
Thanks in advance!
Benjamin Murray Ebony Venters Caycia Banks
Solved! Go to Solution.
I def'ly approve of the idea of consolidating actions, and since you have a classic Dead Man's Switch problem, the wait step is the best workaround.
My specific suggestion would be to store the interaction history in JSON array fragment, which can be parsed in Velocity. I say "fragment" instead of "field" because you can't actually enclose the outer array with brackets, since flows doesn't speak JSON. Instead, append objects to the array:
{ "page" : "{{trigger.web page]}", "ts" : "{{system.datetime}}" }, {{lead.interaction history}}
Then in Velocity wrap it in square brackets [] before turning it into a live ArrayList. From there you can do anything with the data.
Not sure you'd know if this was optimal until you tried it. I suppose it could work. Have you considered Custom Objects?
Have you done any smart lists to determine a possible Wait time? Or even how many people it could affect periodically?
Theoretically optimal might be a better description. By that I mean something along the lines of having the smallest footprint (field creation, smart campaigns/processes) and low maintenance effort.
I haven't considered Custom Objects yet.
Yes, we have an idea of the consumer behavior on our website via several smart lists and will settle on a duration.
I haven't considered Custom Objects yet.
Don't.
COs are entirely unsuitable for this project due to volume alone.
I def'ly approve of the idea of consolidating actions, and since you have a classic Dead Man's Switch problem, the wait step is the best workaround.
My specific suggestion would be to store the interaction history in JSON array fragment, which can be parsed in Velocity. I say "fragment" instead of "field" because you can't actually enclose the outer array with brackets, since flows doesn't speak JSON. Instead, append objects to the array:
{ "page" : "{{trigger.web page]}", "ts" : "{{system.datetime}}" }, {{lead.interaction history}}
Then in Velocity wrap it in square brackets [] before turning it into a live ArrayList. From there you can do anything with the data.
This is an awesome alternative. I've parsed JSON with JS before, but I've only used very basic Velocity. I will definitely draft this up, but it will require some research on my end. Might you have any documentation around this handy?
Thanks for the input!
I've got http://blog.teknkl.com/tag/velocity...
This is great stuff- really leveraging velocity and the capabilities of a single field. Drafting a solution in our sandbox for proposal. Thanks!
How would one wrap the ${activityField} in brackets? I can manipulate the JSON at will when I set it manually, but I can't seem to throw brackets on it without running into a variety of errors.
If you have an "open-ended" list/JSON array (i.e. without the square brackets, like so):
{"page":"http://www.example.com/url1"}, {"page":"http://www.example.com/url2"}
Then turn it into a live ArrayList with this VTL:
#set( $urlHistory = '#set( $urlHistory = [' + $lead.urlHistoryOpenArray + '] )' )
#evaluate( $urlHistory )