Personalisation of emails with data from one-to-many relation tables?

Avatar

Avatar
Level 1
SorenDahl
Level 1

Likes

0 likes

Total Posts

11 posts

Correct reply

0 solutions
View profile

Avatar
Level 1
SorenDahl
Level 1

Likes

0 likes

Total Posts

11 posts

Correct reply

0 solutions
View profile
SorenDahl
Level 1

18-03-2021

Hi there! 

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. 


Maybe it is possible with javascript somehow? 

Accepted Solutions (0)

Answers (1)

Answers (1)

Avatar

Avatar
Boost 5
Employee
denisb91363072
Employee

Likes

8 likes

Total Posts

33 posts

Correct reply

6 solutions
Top badges earned
Boost 5
Affirm 5
Boost 3
Boost 1
Affirm 3
View profile

Avatar
Boost 5
Employee
denisb91363072
Employee

Likes

8 likes

Total Posts

33 posts

Correct reply

6 solutions
Top badges earned
Boost 5
Affirm 5
Boost 3
Boost 1
Affirm 3
View profile
denisb91363072
Employee

24-03-2021

Hi,

It's perfectly possible to use a one-to-many relation to Recipients to personalise deliveries, what you have to do is

  1. Data Model: Ensure you have a link to Recipient from the many part of the relation
  2. Workflow
    1. After the Schedule/Start activity, do a a fork with 2 branches
    2. Branch 1: Query your recipient entity
    3. 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)
    4. Join Branch 1 and Branch 2 via an Intersection activity, 
    5. Do a dedup on Recipient email/id to keep only 1 voucher per recipient 
    6. Use the voucher in Target Data as field in the delivery

That should work, 

Thanks

Denis

  1.