Custom Activities for Journey Builder

Custom Activities in Journey builder

Add power to your Customer Journey

Journey Builder offers many standard activities for building a Journey in Salesforce Marketing Cloud. These make sure your customer receives an email, sms or other message, or splits from or rejoins a path. A Journey is personalised based on individual data and interactions, as configured within the activities.

The basic functionalities in Journey Builder fit the bill for building a simple, yet robust customer journey, but what if you need more options not available in the Standard Activities? In that case, you can simply build a Custom Activity to fit your purpose.

As the name implies, a Custom Activity allows you to execute custom processes, like data processing, API calls, specific JavaScript functions or data exchange.

Using the results of your Custom Activity, you can trigger actions that take place outside Marketing Cloud, such as seemless integrations with third party software.

When to deploy a Custom Activity

A Custom Activity provides a solution for cases where you can’t make something happen with a Standard Activity. For example: connect to an external In-App messaging system. With a Custom activity it’s possible to exchange data or messages between Marketing Cloud, via a Journey, and external (third party) systems.

In many cases, a Custom Activity works more efficiently than a standard Activitiy. You can combine more than one process in one Custom Activity, instead of putting them in several steps in the Journey.

For instance: A Custom Activity can perform API calls to a third party to import or process additional data. This gives you extra functionalities and complete control over your data.

What (and who) do you need for Custom Activities?

We use JavaScript to program specific actions in a Custom Activity, like data connections or modifications. To build the Custom Activity, you need to be able to work with JavaScript, in NodeJS or another framework, or work with a partner who can provide that expertise.

A JavaScript framework is an environment where you can execute JavaSript outside your browser. You also need Postmonger, a JavaScript utility. Postmonger works as a translator and enables data exchange between the iframed activity and the Journey.

Last, but not least, you need admin rights for Salesforce Marketing Cloud and the knowledge to configure a Marketing Cloud Installed Package and set up a Journey in Journey Builder.

Connecting your Custom Activity to Marketing Cloud

As a scripted application, a Custom Activity needs to be hosted on a server. Salesforce recommends Heroku as hosting server. You upload your application files in JavaScript here. After the upload, you will have a URL you can use in Marketing Cloud.

Under setup –> Installed Packages you can configure extras in Salesforce Marketing Cloud. You need Admin rights to do this. Create an Installed Package by clicking ‘New’. Add a component, select Journey Builder Activity here. In this component, you can connect your Custom Activity to Journey Builder.

Name the Activity and select ‘custom’ as category (1). Paste the Endpoint URL you obtained from Heroku (or another hosting platform you are using) after uploading your JavaScript in the designated field. Under the tab Access, you can specify the users that need access to the Custom Activity (2).

Custom Activities voor Journey Builder

The interface where your users configure the Activity is fully customizable. You can set this up while creating your Custom Activity. You can give them a dropdown menu to select a specific message, of a field to set a status. Once you have completed your Custom Activity, it is ready to be used in a Journey.

User interface Custom Activity

Using a Custom Activity in a Journey

When a customer lands on the Customer Activity in a Journey, the application is triggered. The data configured in the Activity  is requested from the Journey, as soon as it is available the specified actions are executed.

For example: a request is made to a third party using the data that’s obtained. After that, the Custom Activity returns the new data to a data extension in Marketing Cloud for use in the Journey.

Use Cases

Here are some inspirational ideas on how to use Custom Activities:

Trustpilot Business Generated Links

These are links that take you directly to a review page. By adding code to a URL, there is no need for the user to log in. To make this request, you need specific libraries and API calls. You can configure this in a Custom Activity.

In App messages via Leanplum

Leanplum enables you to send custom messages in an App. Using a Custom Activity, you can connect Leanplum to Marketing Cloud. The Custom Activity requests the available messages from Leanplum and displays them in the user interface in Journey Builder for selection. When a customer reaches the Activity in the Journey, Leanplum is triggered.

Discount code Custom Activities

You may make use of discount codes generated by a third party. You can request a discount code per user at a specific moment in the Journey with a Custom Activity. Data from Marketing cloud is used to make a request via an API call. When the data is correct, the Custom Activity receives the discount code, to store in Marketing Cloud. The code can be used in any communication with the customer (email, sms, in-App).

Want to know more?

Curious about Custom Activities in Salesforce Marketing Cloud, or do you have other questions about Marketing Cloud or cross-cloud solutions?

Contact us, we’d love to tell you more!


This website uses functional cookies and trackers to gain insight in visitor behaviour.