Trigger CC from an App
Version Compatibility
This feature is compatible with v4.24 and later of the JourneyApps Container, and with v1.0.0 and later of CloudCode.
CloudCode tasks can be called directly from an app and return the result.
The task will need to have the "App" trigger enabled in the configuration.
For example, given the task echo_task
:
When called from the app as follows:
Will produce the following result:
The ID of the user calling the task is available as this.userId
in the task context (this value will be null
if the task was not called from an app). The user object can then be loaded in the task as follows (assuming that the user is of type user
):
Last updated