Git Product home page Git Product logo

boot_custom_activity's Introduction

Custom Activity Spring Boot

Introduction

The purpose of this project is to serve as template for building Journey Builder Custom Activities for Marketing Cloud using Spring Boot.

Setup

  1. Clone this repo
  2. Edit custom activity configuration
  3. Customize configuration screen logic
  4. Customize endpoint logic
  5. Deploy your app

Files description

boot_custom_activity/src/main/resources/static
  • /images: Contains the icons used by the custom activity button in Journey Builder
  • /js: Contains all necessary libs
  • config.json: Contains the configurations for the custom activity. These configurations may be overwriten in the configuration screen.
  • customActivity.js: Contains the logic to interact with Journey Builder and configuration screen(index.html)
  • index.html: This is the configuration screen to configure the custom activity in Journey Builder.
  • runnigHover.html
  • runningModal.html
/boot_custom_activity/src/main/java/com/boot/custom
  • ActivityController.java: Contains all the endpoints that will be called by Marketing Cloud Journey.
  • ActivityResult.java: A simple POJO to represent branchResult when building a custom split activity.
  • CustomActivityApplication.java: Entry point of Spring Boot Application
  • ExecutePayload.java: A POJO to represent the data sent by Jouney when the custom activity is triggered.
  • RequestLoggingFilterConfig.java: Configuration to enable logging requests.

Detailed Setup

  1. Clone this repo

  2. Edit custom activity configuration

    • Open config.js file
    • Replace all placeholders as follows:
      • YOUR APPLICATION EXTENSION KEY HERE
      • TYPE, FOR CUSTOM SPLIT ACTIVITY USE RESTDECISION
      • CUSTOM ACTIVITY NAME
      • CUSTOM ACTIVITY DESCRIPTION
      • URL OF THE SERVER RUNNING THE BACKEND
      • EXTERNAL KEY OF THE SALT KEY FOR THE JWT
    • If you aren't creating a custom aplit activity, remove the attribute "outcomes" else configure each path as you want.
    • If you want to know more about custom split activities, please check out this link
    • If you want to learn more about configuration, please check out this link
  3. Customize configuration screen logic

    • Open index.html and customActivity.js files
    • These files already have a working example which update the "inAttibutes" in config.js with the value of the selected event data column. You can edit these files to add your own logic.
    • If you want to add your own logic to configuration screen, you should check the Postmonger events reference
  4. Customize endpoint logic

  5. Deploy your app

TODO

  • Secure endpoints with JWT

boot_custom_activity's People

Contributors

maicongil avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.