1

Since SFMC SMS/MMS service isn't available in some countries other than the U.S, we have to build our own custom activity within marketing cloud for SMS/MMS sending by calling out 3rd party SMS/MMS sending service. As we learned, save() function is used for saving custom app configurations by sending data from custom app to salesforce marketing cloud. However, this save() function can only be invoking by using Node.js programming method. Regarding this fact, we have two questions need clarification from your side: 1. Is this save() method supported by other web programming language, like Java, pathon? 2. If other programming languages are not supported, can we execute Node.js SDK from the front-end, instead of executing it from the background?

2

Custom Activities can be written in any language or framework. They are certainly not limited to Node.js. There are two options for retrieving save data.

Save Endpoint

Journey Builder will make a request with the Activity parameters to the save URL defined in the configurationArguments object in your config.json file

Postmonger Event

Journey Builder uses Postmonger for cross-domain messaging between Journey Builder and the Custom Activity interface (displayed in an iframe on the Journey Canvas). this a lightweight Javascript utility (not Node.js) which should be able to be used with most application frameworks.

When a Custom Activity is added to the Journey Canvas, default values for arguments, configurationArguments and metaData are loaded from the Activity’s config.json file. Any subsequent loading of a Custom Activity’s configuration interface will load the data from the Activity’s model. As the data is sent to the Custom Activity’s configuration interface each time it is loaded, the entire object should be sent as a payload when the Custom Activity is saved.

The updateActivity event is called when the Custom Activity iframe needs to close and data from the Custom Activity interface needs to be saved. This event expects an Activity definition payload to be passed.

The toJbPayload parameter should be set to the payload received on initActivity and modified based on user inputs in the Custom Activity interface.

The parameter toJbPayload.metaData.isConfigured must be set to true for Journey Builder to recognize that the activity is fully configured (when the Journey is published).

var toJbPayload = {};
toJbPayload.metaData.isConfigured = true;
connection.trigger('updateActivity', toJbPayload);

SMS Alternative in Marketing Cloud

Before you run off and build your own SMS integration, I would encourage you to contact Pierry as they have built a HubExchange app for Marketing Cloud (with an interface very similar to MobileConnect). In APAC, Salesforce recommends Pierry's solution for countries where MobileConnect is not supported.

  • Thank you, Eliot! Your comments help a lot! We will take a deep look into this based on your suggestion. – StackBruce May 8 '17 at 6:00

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.