Skip to main content

I have created a custom activity, deployed in Heroku as always and worked properly.  Now, what I have to do in doing deployment in AWS, I had many issues but the last one is regarding the Journey validation  This is the error I am getting :   

A custom activity or entry source failed validation. Check to ensure that the activity or entry source publishes to a valid endpoint.  What did I do ?  Well, I created a config.js that has the content below, the reason I did that is because My app could not load config.json even though I created a route for it, and even added the file explicitly.  It worked with config.js, I know it working because I can see the icon of the activity in the journey builder, so it is surely loaded, but still have doubts that this is the issue.

 

The config.json is beeing loaded in the browser, I can see it, inside SFMC it is not loaded, I get a warning saying so.  

 

define([], function(){

return {

"workflowApiVersion":"1.1",

"metaData":{

"icon":"https://domain/images/icon.png",

"isConfigured":true,

"configurationDisabled":false,

"configOnDrop":false

},

"copySettings":{

"allowCopy":true,

"displayCopyNotification":true

},

"type":"REST",

"lang":{

"en-US":{

"description":""

}

},

"arguments":{

"execute":{

"url":"https://domain/activity/execute",

"verb":"POST",

"body":"",

"header":"",

"format":"json",

"useJwt":true,

"timeout":100000,

"retryCount":5,

"retryDelay":10000,

"concurrentRequests":1,

"inArguments":[

],

"outArguments":[

{

"status":""

},

{

"errMsg":""

}

]

}

},

"configurationArguments":{

"applicationExtensionKey": "dc64c7b1-1628-490b-8362-f082ca74152e", // wrong one :)

"save":{

"url":"https://domain/activity/save",

"verb":"POST",

"useJwt":false

},

"validate":{

"url":"https://domain/activity/validate",

"verb":"POST",

"useJwt":false

},

"publish":{

"url":"https://domain/activity/publish",

"verb":"POST",

"useJwt":false

},

"unpublish":{

"url":"https://domain/activity/unpublish",

"verb":"POST",

"useJwt":false

},

"stop":{

"url":"https://domain/activity/stop",

"verb":"POST",

"useJwt":false

}

},

"userInterfaces":{

"configInspector":{

"hideHeader":true,

"size":"scm-sm"

},

"configModal":{

"height":200,

"width":300

},

"runningHover":{

"url":"https://domain/runningHover.html"

},

"runningModal":{

"url":"https://domain/runningModal.html"

}

},

"schema":{

"arguments":{

"execute":{

"outArguments":[

{

"status":{

"dataType":"Text",

"isNullable":true,

"access":"Visible",

"direction":"Out"

}

},

{

"errMsg":{

"dataType":"Text",

"isNullable":true,

"access":"Visible",

"direction":"Out"

}

}

]

}

}

}

};

});

 Data extension I am using is a simple one, it is a sendable DE with an email address field, even though I don't really need that, all I need are some Journey setting data and values from the form inside the app.

 

https://i.stack.imgur.com/stXJD.png

 

Also, If I remove the activity from the Journey, the journey get validated with no issue.

 I see in the network tab, the errors, but I don't undertsand them, they seem so vague and not related to Interaction studio ( unless they are talking about a different interaction studio that I don't know )   In POSTMAN, my routes are working, all of them, I need only the execute ones, the other ones are in fact all returning 200 status at the moment

 

https://i.stack.imgur.com/x58PW.png  And here the code :   

/**

* Triggered when user validates or publishes the journey

*/

router.post('/save', (req, res) => {

res.status(200).json({ "success": true });

});

/**

* Triggered when user validates or publishes the journey

*/

router.post('/validate', (req, res) => {

res.status(200).json({ "success": true });

});

/**

* Triggered when user publishes the journey

*/

router.post('/publish', (req, res) => {

res.status(200).json({ "success": true });

});

/**

* Triggered when user stops the journey

*/

router.post('/unpublish', (req, res) => {

res.status(200).json({ "success": true });

});

/**

* Triggered when user stops the journey

*/

router.post('/stop', (req, res) => {

res.status(200).json({ "success": true });

});

module.exports = router;

 

Any help would be much appreciated.

2 answers
  1. Mar 17, 2024, 11:12 PM

    For other people who end up here:- 

    The config.json and config.js are loaded differently, specifically the config.json is loaded by the the SFMC backend server where as the config.js is loaded via the user browser.

    If you are developing behind a firewall, the config.json will not load unless it is made public, whereas the config.js will.. Hope this helps someone!!

0/9000