0

I am trying to create a User Initiated Send definition in my Business Unit with the following code according to the wiki example: http://wiki.memberlandingpages.com/en/documentation/exacttarget/content/server_side_javascript/server_side_javascript_syntax_guide/core_library_server_side_javascript_functions/send_server_side_javascript_functions/

I am receiving an error message: "Error adding EmailSendDefinition."

    var esdParams = {
        "CustomerKey" : "Test",
        "Name" : "Test",
        "EmailSubject" : "Test"
    };
    Send.Definition.Add(esdParams,"Default Transactional","TestEmail",89136);

"TestEmail" = the name of my email (not sure how to retrieve the external key?)

"89136" = the ID of my list

Does anyone have any ideas or some working examples I can try?

2 Answers 2

1
var emailProperties = Email.Retrieve({Property:"Name",SimpleOperator:"equals",Value:"NAME_OF_EMAIL"});

var emailKey = emailProperties[0].CustomerKey;

Just replace "NAME_OF_EMAIL" with the name of your email -

0

The value "TestEmail" is the Name of the email, however that parameter is expecting the Customer Key value. In order to get the Customer Key value for an email, a retrieve will need to be done where you filter on Name.

Example syntax for doing an SSJS retrieve on email can be found at: http://wiki.memberlandingpages.com/en/documentation/exacttarget/content/server_side_javascript/server_side_javascript_syntax_guide/core_library_server_side_javascript_functions/email_server_side_javascript_functions/

1
  • Doesnt work in 2023 Commented Jan 5, 2023 at 15:09

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .