We are in the process of developing a Custom JB Activity for our requirement.

After going through all documentation and code samples available on the internet, what we understand is that the custom activity and its associated resources (config.json, images, index.html, customactivity.js etc need to be hosted on a web server with SSL access.

My question is that can all this be hosted in a cloudpage instead of an external web server? If yes, then how is it done? Any example or documentation would be very useful.

1 Answer 1


Not entirely. It's mostly feasible, but there are some limitations. Firstly, you'll need to purchase the installation of SSL Certs on your CloudPages from Salesforce. Secondly, you'd not be able to authenticate requests made to your Execute route using JWT (SSJS and AMPScript lack the required libraries to decode the JWT), so there are quite a few scenarios where you'd not want to do this. Thirdly, for decisions, SSJS and AMPScript can't return the clean JSON that Journey Builder can understand (extra line breaks are added to the response). Lastly, your Config.json can't be hosted in CloudPages because Journey Builder expects a traditional web server with a directory structure... It's expecting config.json to be available in the root of your application. CloudPages doesn't allow you to define paths in this way... 'https://mysapdomain.com/myactivity/config.json'. Other than that, hosting much of the rest of it in CloudPages is possible.

I normally go for a hybrid approach where I host config.json and most static assets used in the UI (notably SLDS's huge array of css and images) on S3 or Github and host the only endpoint that really needs to be active, the Execute route, in a Cloud Pages code resource. Again, it's really only good where actions carried out by the Execute endpoint aren't sensitive - think "Is It Sunny?" decision splits.

  • Thank you Macca for your valuable input. Decided to stick with heroku for hosting the Custom JB activity.
    – Keddy
    Commented Jul 29, 2019 at 5:52
  • @Keddy. A wise choice for most purposes, IMHO.
    – Macca
    Commented Jul 29, 2019 at 8:22

You must log in to answer this question.

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