The User Feedback Modal uses the UserFeedback service. Use promptForFeedback(), which already makes all the necessary datastore calls to check if the feedback modal should be triggered.
Note that the modal should only open if the campaign is ongoing, the user has not given feeback yet, and has not seen the modal before.