Our subscriber row has many rows, two of which are SubscriberKey, and ModifiedDate
I have a data extension that contains info about what the subscriber purchased
it is a one to many relationship, meaning that a subscriber can have multiple products associated to it.
Here is an example
subscriberKey name dateModified
1231 joe 12/15/2001
subscriberkey productName datePurchased
1231 coke 10/04/2001
1231 pizza 10/04/2001
1231 cake 12/15/2001
1231 apple 12/15/2001
What happens is when a customer of our checks out, we store the purchase history of that customer in a data extension, and triggerSend an Email. The Email that will be sent out, has an area that is dynamic in size, which is the list of items and their associated details.
What I am trying to understand is, how do I get the right rows using the AMPScript?
When the TriggerSend is activated, how do I get the data extension rows that are associated with that session?
I can use LookupRows() using the subscriberKey and date to get the rows that took place on lets say 12/15/2001. But there is a problem with that, if the same customer returns on the same date and makes a new purchase as follows:
subscriberkey productName datePurchased
1231 coke 10/04/2001
1231 pizza 10/04/2001
1231 cake 12/15/2001 <--- Order #1
1231 apple 12/15/2001 <--- Order #1
1231 pie 12/15/2001 <--- Order #2
1231 orange 12/15/2001 <--- Order #2
Then using the date restriction will not work. What I need is a means to grab the new rows I inserted into the date extension, so that when triggerSend is called, it knows which rows to look at.
How do I do this?