jbca-postmonger-react
v1.0.1
Published
Connect Postmonger with React
Downloads
2
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 jbca-postmonger-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;
setDirtyActivityState;
requestInspectorClose;
nextStep;
prevStep;
getSchema;
getTokens;
getCulture;
updateSteps;
updateButton;
getEndpoints;
getDataSources;
updateActivity;
addEventListener;
getInteractionDefaults;
getInteractionTriggerEventDefinition;