1

Trying to make an "execute" request to use the LogUnsubEvent API call. Can't seem to make a successful call. I have followed the Exacttarget documentation: http://help.exacttarget.com/en/technical_library/web_service_guide/technical_articles/unsubscribing_and_logging_an_unsubevent_with_a_logunsubevent_execute_call/

Always returns

{ [Error: Soap Error]
  requestId: '97300bab-103f-4d2f-8bb3-1db7f1d2e4f2',
  results:
   [ { StatusCode: 'Error',
   StatusMessage: 'Object reference not set to an instance of an object.' } ],
  errorPropagatedFrom: 'ExecuteResponseMsg' }

Setup

var FuelSoap = require("fuel-soap");

var etConnectOptions = {
  auth: {clientId: "someid", clientSecret: "somepass"},
  soapEndpoint: "https://webservice.exacttarget.com/Service.asmx"
};

var SoapClient = new FuelSoap(etConnectOptions);

Building the request

SoapClient.execute("LogUnsubEvent", [
    {name: "SubscriberID", value: "12345678788"},
    {name: "SubscriberKey", value: "test@samplecustomer.com"},
    {name: "EmailAddress", value: "test@samplecustomer.com"},
    {name: "JobID", value: "854755857"},
    {name: "ListID", value: "4455656"},
    {name: "BatchID", value: ""},
    {name: "Reason", value: ""}
], function(err, response) {
    if(err) {
        console.log(err);
        return;
    }
    console.log(response.body);
});

XML Envelope:

<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <Header>
    <fueloauth xmlns="http://exacttarget.com">secret</fueloauth>
  </Header>
  <Body>
    <ExecuteRequestMsg xmlns="http://exacttarget.com/wsdl/partnerAPI">
      <Requests>
        <Name>LogUnsubEvent</Name>
        <Parameters>
          <name>SubscriberID</name>
          <value>12345678788</value>
        </Parameters>
        <Parameters>
          <name>SubscriberKey</name>
          <value>test@samplecustomer.com</value>
        </Parameters>
        <Parameters>
          <name>EmailAddress</name>
          <value>test@samplecustomer.com</value>
        </Parameters>
        <Parameters>
          <name>JobID</name>
          <value>854755857</value>
        </Parameters>
        <Parameters>
          <name>ListID</name>
          <value>4455656</value>
        </Parameters>
        <Parameters>
          <name>BatchID</name>
          <value/>
        </Parameters>
        <Parameters>
          <name>Reason</name>
          <value/>
        </Parameters>
      </Requests>
    </ExecuteRequestMsg>
  </Body>
</Envelope>

1 Answer 1

1

I was able to get this working by changing the xmlns to https://webservice.exacttarget.com/etframework.wsdl just for the ExecuteRequestMsg call.

Commit with code change.

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.