[SalesForce] ExactTarget Data Extract with SOAP using Node.js

I am trying to create a data extract activity with the SOAP web service API using nodejs. Have you been able to find any open source libraries related to this, i am happy to contribute back if applicable.

Best Answer

We currently have a closed project we are working on that utilizes xml2js which helps streamline some of the calls.

Currently, the configuration I am using to simplify the calls is below:

Requests:

var envelope = {
    '$': {
        "xmlns": "http://schemas.xmlsoap.org/soap/envelope/",
        "xmlns:xsi": "http://www.w3.org/2001/XMLSchema-instance"
    },
    'Header': {
        'fueloauth': {
            '$': {
                "xmlns": "http://exacttarget.com"
            },
            "_": token
        }
    },
    "Body": request
}


var buildOptions = {
    rootName: "Envelope",
    headless: true
}

var builder = new xml2js.Builder(buildOptions);
return builder.buildObject(envelope);

Response:

var parseOptions = {
    trim: true,
    normalize: true,
    explicitArray: false,
    ignoreAttrs: true
};

--Hopefully we will be able to open source the project in the next month or so.--

Update The Fuel Node SOAP client library has been opened up - you can find it on Github https://github.com/ExactTarget/Fuel-Node-SOAP

I recommend checking it out.

Related Topic