1

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?

Thanks,

Lee

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

3 Answers 3

2

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

Prerequisites:

  • 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

2
  • Many thanks zuzannamj!
    – LeeH
    Commented Nov 29, 2019 at 15:01
  • Pleasure @LeeH :-)
    – zuzannamj
    Commented Nov 29, 2019 at 15:23
2

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.

1
  • Many thanks Rafal, both you and zuzannamj have been very helpful!
    – LeeH
    Commented Nov 29, 2019 at 16:28
0

I've an untested idea with reference to the above question:

Make a dummy email send from which we execute the API call through SSJS to the external application, and then use the AMPScript Raiseerror() function to ensure the email is not being sent, not perfect, but can still be achieved within the Journey.

1
  • Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.
    – Community Bot
    Commented Feb 1 at 16:44

You must log in to answer this question.

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