I'm new to SFMC so would appreciate any help.

Is there a way for SFMC to call an external API via the Journey Builder?

We need to extend the Journey Builder so that in addition to mobile push notifications and emails being sent, we can also send out app notifications to an external API.  This external API would then publish to a queue and the target web app would subscribe to events and subsequently display events on a notifications page.

What would be the most straight forward way to achieve this?  Would it be via a Custom Activity or is there another way?  If a Custom Activity, could we build this in .NET/.NET Core?



  • Does it need to be in real-time or can delays of about 1 hour be accepted? – Rafał Wolsztyniak Nov 28 '19 at 14:37
  • Hi Rafal, it doesn't necessarily need to be real-time – LeeH Nov 29 '19 at 15:03

This can only be achieved using Custom Activity in Journey Builder. You will need to install a Managed Package in Marketing Cloud, build the activity and host it on a web server.

The whole setup is explained in the documentation: Build Custom Activities and Events


  • A working knowledge of RequireJS for dependency management
  • A working knowledge of jQuery
  • An understanding of the Postmonger event framework
  • Access to a Marketing Cloud account with a fully provisioned and operational Journey Builder instance
  • An understanding of how journeys function in Journey Builder

Check out this thread on SFSE with an example repository that might help you: How to create custom activity

  • Many thanks zuzannamj! – LeeH Nov 29 '19 at 15:01
  • Pleasure @LeeH :-) – zuzannamj Nov 29 '19 at 15:23

You essentially have 2 options and they vary in terms of speed and time necessary to develop them:

  1. Custom Journey Builder Activity (as suggested by zuzannamj)

This is by far the most proper approach and will give you the most flexibility and calls being executed as close to real-time as possible in Marketing Cloud, but it does require resources and time to develop.

  1. Update Contact activity in Journey Builder + Server Side JavaScript in Automation Studio

If you can't build a proper custom activity (due to time constraints, lack of developer resources) and need a quick way of automating those requests, you could go with the following approach:

  • Create a data extension where you will be storing records that need to be sent out,
  • Configure an Update Contact block to log contacts passing through your journey to be logged in the DE from the previous step
  • Create an automation with a script activity that uses SSJS to read the contents of your data extension and sends it out to the external API.

You also need to remember that:

  • you need to make the values passed to the data extension be dynamic and based on journey data (see the answer of JogSottot here)
  • Update Contact writes up to 5 values in a single activity, so you might need more of them to pass all necessary data
  • this solution will not be as close to real time as the Custom Journey Builder Activity - you can run the automation once per hour or more often if you duplicate it (or introduce wait times in it followed by next duplicate script activities in the same automation)

It's pretty much a quick and dirty solution, but it does not require so much development.

  • Many thanks Rafal, both you and zuzannamj have been very helpful! – LeeH Nov 29 '19 at 16:28

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.