I have been puzzling a bit with how much it is possible to personalise emails. It seems that apparantly you can "only" use recipipient specific 1st level data to insert dynamic and personalised content.
I was wondering if it is possible to somehow insert other data from tables that may contain more than 1 row per recipient.
Use-case: I want to insert a voucher code into an email. There can be multiple vouchers related to the recipient but I want to sort decending on the most recent and unused voucher and insert that one.
Currently we are setting that voucher in the workflow as targetData.voucher BUT that seems like a lot of work since I am unable to send proofs when it is related to target data. Therefore I am looking to insert it directly when editing the email delivery.
It's perfectly possible to use a one-to-many relation to Recipients to personalise deliveries, what you have to do is
Data Model: Ensure you have a link to Recipient from the many part of the relation
After the Schedule/Start activity, do a a fork with 2 branches
Branch 1: Query your recipient entity
Branch 2 Query the many entity to bring all the records you're interested in (for instance voucher that has not been redeemed yet or voucher that has not been sent to customer yet), Add any attributes from the entity as Additional Data then do a Change Dimension to bring back the Targeting dimension to Recipient (hence the link on Data Model step)
Join Branch 1 and Branch 2 via an Intersection activity,
Do a dedup on Recipient email/id to keep only 1 voucher per recipient
Use the voucher in Target Data as field in the delivery