Day 17 Challenge Resources
A library just started using Marketing Cloud and wants to send an email to confirm every time someone borrows a book. The email should show the last three books that the same person didn’t return. A marketer gathers data in two places: Transactions and Transaction_History. Transactions has information about subscribers, as well as the last time and ID of the transaction. Transaction_History has all the details about the transaction, including the name of the book and if it was returned.
Today’s challenge involves multiple process loops. To avoid confusion while working on the code, it is important to use proper variable names. Transactions, Transaction History
SubscriberKey | FirstName | LastName | LastTransactionId | LastTransactionDate | |
---|---|---|---|---|---|
9083 | james.bond@mi6.com | James | Bond | 115463 | 2023-04-26 |
5367 | tony.stark@starkindustries.com | Tony | Stark | 109762 | 2023-04-21 |
TransactionId | SubscriberKey | TransactionDate | BookName | Status |
---|---|---|---|---|
115463 | 9083 | 2023-04-26 | Simply Lies | Check-in |
115323 | 9083 | 2023-04-24 | It Ends With Us | Waiting |
115231 | 9083 | 2023-04-21 | Spare | Waiting |
109762 | 5367 | 2023-04-21 | Worthy Opponents | Check-in |
… | … | … | … | … |
We will keep this preview simple, but stay tuned as we update our templates.
Hi James Bond,
This is the confirmation for the books you borrowed today:
- Simply Lies
Here are the books you borrowed before.
- It Ends With Us
- Spare
Best regards,
Next Library
Crafted with 💜 by AMPscript30.
AMPScripted Smiles Ltd.
456 Data Extension Drive Suite 321, Loop City,
Variable Valley, DE 12345