kompassi
kompassi copied to clipboard
As survey owner I want to receive email notifications of new responses
Implementation options:
- There is the
event_log
application with theSubscription
model.
- Define
Entry
typeforms.response.created
and emit it increateSurveyResponse
- Add
survey_filter
toSubscription
andsurvey
toEntry
- However: The whole event log application could use some rethinking. It follows the sparse table model that has been found problematic in Programme V1.
- In
forms
, add a separateSubscription
model with foreign keys toSurvey
andUser
.
NOTE: CBAC check needs to be done when notifying subscribers. If subscriptions are left around but the user no longer has access, notifications must not be sent. This may be easier with approach 2.
UI for either:
- Add a toggle button in the survey editor saying Subscribe to response notifications or similar
- GraphQL mutations to un/subscribe that create and remove
Subscription
s
- GraphQL mutations to un/subscribe that create and remove