0

Theoretically it should be possible to create a Triggered Send without an underlying Triggered Send Data Extension. The JSON passed to messageDefinitionSends REST call should still be available to the email, where it can be parsed. The latter probably through a combination of SSJS and AmpScript. I have been trying to find examples of this approach, but unfortunately without any luck.

Does any of you have succeeded in building triggered sends without data extension, and with JSON from the messageDefinitionSends call parsed directly in the email? Is there any ressource out there describing this approach?

Thank you Brgds Lukas

1

You can achieve this when creating a triggered send definition under Email Studio -> Interactions -> Triggered Emails. There you need to select the All Subscribers list under "Subscriber Management".

Then you can trigger the send using the API and the key of the created triggered send:

/messaging/v1/messageDefinitionSends/key:[external key of your triggered send]/send

You need to supply the data you like to process in the body of the request sent to the api under To.ContactAttributes.SubscriberAttributes:

{
    "From": {
        "Address": "from@yourdomain.com",
        "Name": "yourname"
    },
    "To": {
        "Address": "subscriber@domain.com",
        "SubscriberKey": "SUBSCRIBERKEY",
        "ContactAttributes": {
            "SubscriberAttributes": {
                "YourAttribute": "DATA"
            }
        }
    }
}

Then you can use the data in the triggered email using the following AMPscript-code:

Var @YourAttribute
Set @YourAttribute = AttributeValue("YourAttribute")
  • Does this approach also support multi-level /nested JSON? E.g. "SubscriberAttributes": { "YourAttribute": "DATA", "OtherAttribute": [{ "62935": { "isProductLine": true, "isShippingLine": false, "product": { "id": 62930 } } I guess some SSJS should be applied to parse the JSON structure. But is the approach generally supported? – Lukas Lunow Nov 21 '16 at 8:13
  • I didn't try this out but I don't think this is supported out of the box. But you could put a String representation of your json inside one String-Attribute and parse it in the email using SSJS. – Markus Slabina Nov 21 '16 at 8:17
  • I have been looking towards that approach, but I was quickly limited by the 4000 character limit of the Text data type in a data extension. However, this might not be a limitation, since I am not utilizing a data extension in this approach, but sending the data directly to the triggered email object? – Lukas Lunow Nov 21 '16 at 8:29
  • I don't know how this is handled in the background but I would just give it a try. And please let us know if it did work out for you. – Markus Slabina Nov 21 '16 at 8:38
  • I just found out that there is a way to use more than 4000 characters, so I think it is possible with attributes or even with data extensions: help.salesforce.com/apex/… Please accept my answer, so others can see that this is the way to use triggered sends without creating a triggered send data extension. Thanks! – Markus Slabina Nov 22 '16 at 9:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.