As mentioned by Adam Spriggs, JourneyBuilder is using the REST API and is not addressable via SOAP.
The object you are referring to are not related to the current JoruneyBuilder object in Marketing Cloud. As you can see in the SOAP Supported Operations For Objects And Methods neither InteractionBaseObject
nor InteractionDefinition
is listed at all.
Yes, there is a SOAP object for both of them but a simple api.describe('InteractionBaseObject')
will return nothing.
The only official option to interact with JourneyBuilder is via the Journey Builder REST API.
The newly written documentation is a massive improvement and many examples are given on how to interact with this API.
You can execute any API call within SSJS inside SFMC by using Script.Util.HttpRequest()
Here is a simple function which should give you a good starting point to execute any REST or CRUD API call.
<script runat=server>
Platform.Load("Core", "1");
/**
* Perform an HTTP request allowing the usage of API methods.
*
* @param {string} method The method to use e.g: POST, GET, PUT, PATCH, and DELETE
* @param {string} url The url to send the request to
* @param {string} [contentType] The contentType to use e.g: application/json
* @param {object} [payload] A payload for the request body
* @param {object} [header] Header values as key value pair
*
* @returns {object} Result of the request
*/
function httpRequest(method,url,contentType,payload,header) {
var req = new Script.Util.HttpRequest(url);
req.emptyContentHandling = 0;
req.retries = 2;
req.continueOnError = true;
req.method = method;
for( var k in header ) {
req.setHeader(k, header[k]);
}
if(typeof contentType !== 'undefined' && contentType !== null) { req.contentType = contentType; }
if(typeof payload !== 'undefined' && payload !== null) { req.postData = Platform.Function.Stringify(payload); }
try {
var res = req.send();
return {
status: Platform.Function.ParseJSON(String(res.statusCode)),
content: Platform.Function.ParseJSON(String(res.content))
};
} catch(e) {
return {
status: '500',
content: e
};
}
}
</script>