Skip to content

Instantly share code, notes, and snippets.

@angrycider
Created March 27, 2017 22:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save angrycider/62ffa5285d7399b2fbaa8d63989c64c0 to your computer and use it in GitHub Desktop.
Save angrycider/62ffa5285d7399b2fbaa8d63989c64c0 to your computer and use it in GitHub Desktop.
13. Create Email Send Definition
//Create User Initiated Send
var folderID = '100506' //Hover over or inspect the folder in the UI and grab the CID querystring parameter
var dexObjectID = 'cc7ce594-070f-e711-a5d3-8cdcd4aff7c9'; //DEX Object ID: https://gist.github.com/angrycider/47a2727e274ef87632c115b333aeb473
var guid = uuid.v1() // https://github.com/kelektiv/node-uuid
var co = {
"Name": "TuneIn_201757f52c3c0dbf0", //Should be dynamic...same as used to create email
"CustomerKey": guid,
"Email": {
"ID":"105947", //Email ID https://gist.github.com/angrycider/ee39a7a87454201ea469108104b6f0e0
"IDSpecified":true
},
"SendClassification":{
"ObjectID":"8eed5631-9f42-e511-9915-8cdcd4aff7c9" //Hover over or inspect the send classification in the UI and grab the g= querystring parameter
},
"SendDefinitionList":[
{
"CustomObjectID":dexObjectID, //Data Extension Object ID from retrieve DEX above
"DataSourceTypeID":"CustomObject"
}
],
"CategoryID":folderID //Folder ID from Create Folder Above
};
SoapClient.create('EmailSendDefinition',co, null, function(err, response){
if(err){
console.log(err);
}
else{
console.log(response.body.Results);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment