This guide will showcase how to build a campaign based on a dynamic Star Rating action. The user will be presented with a different flow, depending on the number of stars they submit when presented with the Star Rating action. For this example, 1-3 stars will forward the user to an external webpage for submitting feedback, whereas 4-5 stars will present the native App Review prompt for iOS/Android*.
*Android native prompt requires additional implementation in code
Campaign setup:
- Delivery: Triggered
- Trigger event: User starts app
(Seeing the in-app messages on the same session after starting the app is not guaranteed) - Actions in campaign:
- 1) STAR RATING
- Template: Rich in-app > Star Rating
- Top-level action (on its own branch)
- Delay: 0
- Sub-delivery (display event): Set the custom event you want to trigger this action.
- !!! IMPORTANT: Make sure to check the "Include display event parameters" checkbox
- 2) FEEDBACK REQUEST
- Template: Any
- Top-level action (on its own branch)
- Delay: 0
- Accept action: OpenURL (optional, leading to feedback form)
- Sub-delivery (display event)**:
Event .m<StarRatingID> Submit triggers when parameter input is 1
OR Event .m<StarRatingID> Submit triggers when parameter input is 2
OR Event .m<StarRatingID> Submit triggers when parameter input is 3
- 3) APP REVIEW REQUEST
- Template: App Function > Request App Rating
- Top-level action (starting its own branch)
- Delay: 0
- Sub-delivery (display event)**:
Event .m<StarRatingID> Submit triggers when parameter input is 4
OR Event .m<StarRatingID> Submit triggers when parameter input is 5
- 1) STAR RATING
** The special syntax used in the Sub-delivery sections of actions 2) and 3) is required, as their names and action events won't populate in the autocomplete menu, if the campaign hasn't been published yet. We explain how to manually input the required event in this guide.
Here is how such a campaign looks in Leanplum. We have also expanded the Sub-delivery section of the FEEDBACK REQUEST action, to better showcase the manual event syntax: