Often there is a need to test a triggered campaign after it's creation. Using Leanplum's API library in Postman, you can speed up your testing and eliminate the need to manually trigger campaigns from your Leanplum enabled app.
This method is best used on campaigns that involve server-side actions (Push, Email or Webhook). Any client-side messages will need to be viewed by opening the app (In-app, App Inbox, App function).
- Install Postman from the official website.
- Import Leanplum's API collection from our documentation.
* Don't forget to get your Leanplum API keys and add them as environment variables, as explained.
- Create your triggered campaign in the Leanplum dashboard.
*Optional: Set the same custom event/state for Trigger and Goal. This way the user will exit and immediately re-enter the campaign on each event occurrence, for faster testing.
- In Postman, open the Track API call from the collection (documentation for Track).
- Populate your test user ID and event/state name. The rest of the fields will pull data from your environment variables form step 2.
- Send the API call. The campaign should trigger and your user should receive the campaign actions. Repeat to exit and immediately re-enter the user in the campaign, repeating all campaign actions.