[SalesForce] Exact Target Data extensions and Fuel REST API

I am trying to send email and populate data extension using Triggered send REST API of exact target in salesforce to populate values in Data Extension using REST API.

I was able to send an batch sent email in salesforce using REST API.
I was able to populate attributes in data extension and printed in mail too.

But the challenge is
Each subscriber will receive a mail with his favourites data.

For example
"X" likes Apple,Grape,Banana.
"y" likes Grape,Mango.

I have 2 data extensions Transaction Extension and Favourites Extension. currently with no relation

In My mails X should receive a mail with he likes
1.Apple
2. Grape
3. Banana

What i want to know is
How should I send these values as a JSON Payload in MessageSend.
How can we relate these two extensions.
what should be the ampscript in the mail.

Please Help someone.

more info

Transactions
Tid     Subscriber Email    first name
1           alpha@gmail.com         Alpha
2           beta@yahoo.com          Beta

Favourtes       
Favourtesid         Transaction id  Item Name
1                       1           Apple
2                       1           Orange
3                       1           Grape
4                       2           Apple
5                       2           Grape

Best Answer

You would want to use dataevents by addingg rowsets.

Here is a sample call -

POST https://www.exacttargetapis.com/hub/v1/dataevents/key:DataExtensionExternalKey/rowset

Add the header:

Authorization: Bearer gd2324hruukedkremtwqhae9

and the payload:

[
    {
        "keys":{
                "Email": "someone@exacttarget.com"
                },
        "values":{
                "LastLogin": "2013-05-23T14:32:00Z",
                "IsActive": true,
                "FirstName": "John",
                "FollowerCount": 2,
                "LastName": "Smith"
                }
    },
    {
        "keys": {
                "Email": "someone2@exacttarget.com"
                },
        "values":{
                "LastLogin": "2013-05-23T14:32:00Z",
                "IsActive": true,
                "FirstName": "Jane",
                "FollowerCount": 2,
                "LastName": "Smith"
                }
    }
]
Related Topic