Looking for a solution for the following case:
A smart list is defining an audience for a certain email campaign.
The content in that email is defined by velocity scripting, it is looking to a json object (stored in the script token ).
Depending on additional parameters, there is a change that the velocity code is returning an empty string as the result of the routine. ( which would be completely correct)
In that case I should block the email from being send for that person.
Does someone has a proposal on how to implement this?
Solved! Go to Solution.
Try this post from @SanfordWhiteman; https://blog.teknkl.com/velocity-poison-pill-throw-error-revisited/
If I've understood your use case, I think this does exactly what you're after.
Cheers
Jo
While velocity can customize the content within an email, in the conventional ways, it can most certainly not control the email send activity to the person based on certain conditions like campaign filters/flow conditions can do.
You can prevent the person from qualifying for the campaign by storing the data in a CO instead and use the CO filters in the campaign's smart list, along with the other filters in the SL that you're currently using in the velocity to determine if the email should be sent to a person or not.
The idea is to let only people in if they qualify to receive the email by filtering out the people who should not receive the email by looking at the CO data and other filters. Hope this helps!
Try this post from @SanfordWhiteman; https://blog.teknkl.com/velocity-poison-pill-throw-error-revisited/
If I've understood your use case, I think this does exactly what you're after.
Cheers
Jo