Retrieve the Triggered Send Data Extension template verified

Learn how to retrieve a Triggered Send DefinitionTemplate in Salesforce Marketing Cloud (SFMC) with SSJS (server-side JavaScript). Code snippets include the WSProxy method.

WSProxy

var api = new Script.Util.WSProxy();

var name = "TriggeredSendDataExtension";

var cols = ["Name", "CustomerKey"];

var filter = {
    Property: "Name",
    SimpleOperator: "equals",
    Value: name
}

var result = api.retrieve("DataExtensionTemplate", cols, filter);
<script runat="server">

    Platform.Load("core", "1");

    var api = new Script.Util.WSProxy();

    try {

        var name = "TriggeredSendDataExtension";

        var cols = ["Name", "CustomerKey"];

        var filter = {
            Property: "Name",
            SimpleOperator: "equals",
            Value: name
        }

        var result = api.retrieve("DataExtensionTemplate", cols, filter);

        Write(Stringify(result));

    } catch(err) {

        Write(Stringify(err));

    }

</script>
{
    "Status": "OK",
    "RequestID": "S0M3-GU1D-K3Y-G03SR1G4T-H3R3",
    "Results": [
        {
            "Name": "TriggeredSendDataExtension",
            "Description": null,
            "Client": null,
            "PartnerKey": null,
            "PartnerProperties": null,
            "CreatedDate": "0001-01-01T00:00:00.000",
            "ModifiedDate": null,
            "ID": 0,
            "ObjectID": null,
            "CustomerKey": "S0M3-GU1D-K3Y-G03SR1G4T-H3R3",
            "Owner": null,
            "CorrelationID": null,
            "ObjectState": null,
            "IsPlatformObject": false
        }
    ],
    "HasMoreRows": false
}

Reference

Ressources and references related to the current methods.

SOAP object

Last Updated: