Journey Trigger is a custom Salesforce Marketing Cloud Journey Builder Activity designed to trigger one journey from another with the Journey Data of the current journey. With a unique identifier mechanism and robust logging capabilities, this activity ensures seamless journey integrations and detailed tracking.
- Retrieving Journeys: Automatically retrieves journeys for your selection based on their entry source if it is APIEvent.
- Persistence: The activity remembers your selection in current and new versions.
- Journey Integration: Allows triggering of specified journeys based on API event keys.
- Detailed Logging: Logs the results of triggering journeys and shows it after the journey runs.
-
Journey Data Dependency: This activity uses the Journey Data of the journey that incorporates the activity. Therefore, if the journey you intend to trigger has additional non-nullable or required fields, this activity will not function properly.
-
Entry Source Requirement: The entry source must be set before using the activity because the activity retrieves Journey Data from the entry source when it is saved.
-
Experimental Project Disclaimer: This project was created for fun rather than as a stable solution for large-scale Business Units. If you have 1,000 journeys and plan to use this trigger activity for a journey that sends to 1 million contacts, you will need to modify the code a bit to not pay a huge bill for Heroku or having the longest log table in history.
This activity can be used for projects where a complete customer journey cannot be created due to many phases or elements. By dividing that "whole" journey into more maintainable "little" journeys, if the criterion for subsequent journeys is simply "the contact must enter this after leaving the first or second journey," this activity simplifies and streamlines the process. Normally, you would need additional configuration to inject contacts into those journeys, but with this activity, it is simple and straightforward.
This activity is developed for Heroku-hosted deployments, complementing Salesforce Marketing Cloud (SFMC) integration. Postgre SQL has been used in addition to Node.
- Create a Journey Builder Activity package along with Server-to-Server API Integration package that has the correct permissions for Journey data.
- Set the endpoint URL to
https://yourherokudomain.herokuapp.com
.
This will automatically add Journey Activity into your Journey Builder UI.
First, you would need Heroku Postgres add-ons to handle database. This can be added on Overview. When you add the add-on, it automatically creates the necessary DATABASE_URL variable.
After deploying the app via a GitHub repository:
- Define the necessary configuration variables within Heroku's settings to match the SFMC package details.
With these configurations, the app is ready for use.
JourneyTrigger is open-sourced under the MIT License. See the LICENSE file for more details.
I would like to say thanks to Theon Thai Yun Tang because I used the template that he created, which can be found here:
https://github.com/theonthai45/SFMC-custom-activity-template