sfmc-jbca-react
v1.0.5
Published
sfmc-jbca-react ============
Downloads
171
Readme
sfmc-jbca-react
Salesforce Marketing Cloud Journey Builder Custom Activity
Overview
The purpose of this package is to provide easy way for interaction between MC Journey Builder and custom activity UI written on React.
How to use
Step 1. Install the package
npm i sfmc-jbca-react
Step 2. Wrap your app inside a JourneyBuilderProvider
component
ReactDOM.render(
<React.StrictMode>
<JourneyBuilderProvider>
<App />
</JourneyBuilderProvider>
</React.StrictMode>,
document.getElementById('root')
);
Step 3. Use useJourneyBuilder
hook in your functional components
const {activity, interaction, getTokens, updateActivity, addEventListener} = useJourneyBuilder();
Available objects and methods
activity
interaction
ready
destroy
nextStep
prevStep
getSchema
getTokens
getCulture
updateSteps
updateButton
getEndpoints
getDataSources
updateActivity
addEventListener
getInteractionDefaults
getInteractionTriggerEventDefinition