How To Get Your Campaign Live Immediately

This builds on top of the "Create A New Campaign" guide and expects that you've already created a campaign via the Pass On dApp. Follow this guide to quickly get your campaign live ⚡️

We're continuing to build out our platform & are grateful for your patience while we build out fully automated campaign setups (where this manual implementation step is no longer necessary) 🧪

Note: this step is not a requirement for you! You can contact the Pass On team at contact@passon.io with your requirements and we'll be happy to implement this script for you!

Context & Overview

Purpose

Here at Pass On we're iterating towards a fully automated, omni-chain referral campaign solution. Currently you, the brands, can create referral campaigns in the Pass On dApp but must wait for the Pass On team to finalise the configuration of the campaign before it goes live.

We're proposing an intermediate solution to allow you, the brands, to get your campaigns live immediately (i.e. without waiting for us to finalise configuration).

The approach involves coding but is relatively simple and should take a junior software developer <0.5 day to complete.

Approach

To process referral rewards automatically, 2 pieces are required:

  1. A campaign with at least 1 rule

  2. A script which identifies rewardable actions for your campaign and pushes them into our system.


This "Campaign Actions Script" is designed to run periodically, its logic following the sequence below:

  1. The script first fetches data about your campaign from the Pass On API, including data about the campaign's rules and the list of users who have registered as referees.

  2. The rules data is then parsed using the rules' data source properties* to fetch events data for the relevant smart contract on the given network/chain.

    • data source properties = 'contractAddress', 'eventName' and 'chainId'

  3. This events data is then filtered to identify rewardable actions (using the rules' criteria and the campaign's list of registered referees).

  4. This rewardable actions data is pushed into our system via the Pass On API.


To get started:

  1. Fork our "Campaign Scripts Registry" GitHub repository here.

  2. Create a directory with your brand or campaign name (in the src/scripts directory) here

  3. Copy our script template (here) into your directory

  4. Implement your script logic (see examples here)

  5. Create a pull request to merge your changes into our repository

Click on the below image for further context and explanation of the Campaign Actions Script's role in our rewards system:


Follow These Steps

1) Fork our GitHub repository
https://github.com/passon-io/campaign-scripts-registry
2) Copy our script template

Once you've forked and cloned our repository to your machine, navigate into the repository and:

  1. Create a directory with your brand or campaign name (in the src/scripts directory) here

  2. Copy our script template (here) into your directory

3) Implement your script

< todo >

Feel free to contact our CTO on LinkedIn if you encounter any issues or need any help.

3) Publish your script

Once your script is implemented, we need to make sure it runs periodically. We've built some infrastructure to do this for you so all you need to is:

  • Create a pull request on our GitHub repository

We, Pass On, will review and merge the pull request . Feel free to contact our CTO on LinkedIn if you encounter any issues or need any help.


Last updated