Updates:
- 20230215: This is now prioritized behind T325098, and we agreed that @Daimona would pick this back up once the email feature is complete.
Background
The existing Programs & Events (aka P&E) Dashboard is the tool that many organisers use for tracking impact in their events. In the P+E Dashboard, organisers already have the ability to add participants to an event. Since this will be a feature overlap with the Event Center, we would like to build an integration between the P+E dashboard and Event Center so participant list can be synchronised between the two platform.
Epic Lead: @Daimona
Reviews necessary for deploy
- Security: Encompassed by privacy review 👇
- Privacy: T320641: Security/Privacy Review For P&E Dashboard Integration with Campaign Registration System
- Performance: TBD
- Database: Done as part of the initial review in T318593.
Implementation Details
Please see the diagram (drawn up by @cmelo based on discussions between the Campaigns engineers and @Ragesoss) below for the plan for MVP integration.
endpoint 1: confirm_event_sync
This one corresponds to the 'Create Event Registration' event, establishing that a particular Event Center event will be responsible for the participant list of a particular Dashboard Course.
POST /wikimedia_event_center/confirm_event_sync as JSON { "course_slug": string // the unique URL slug for the Course "event_id": string or integer // a unique ID for the Event Center event. optional for a dry_run. "organizer_usernames": array of strings // the username(s) of the Event Center event's organizer(s). // At least one must match a user in the "facilitator" role for the Course. "dry_run": boolean (optional) // if truthy, will verify that event sync can be enabled. "secret": string // shared secret between the Event Center and the Dashboard }
On failure, returns a JSON object with the error message and error code.
Possible error codes:
invalid_secret - The shared secret doesn't match course_not_found - A Course with the provided slug doesn't exist not_organizer - The organizer username doesn't match a user in the "facilitator" role already_in_use - The course already has participants, so it can't be linked to the event sync_already_enabled - The course is already linked to an event missing_event_id - No Event Center ID ("event_id") was provided.
endpoint 2: update_event_participants
This is for any time users are added or removed from an event, to push the latest participant list to the Dashboard Course.
POST /wikimedia_event_center/update_event_participants as JSON { "course_slug": string // the unique URL slug for the Course "event_id": string or integer // a unique ID for the Event Center event "organizer_usernames": array of strings // the username(s) of the Event Center event's organizer(s). "secret": string // shared secret between the Event Center and the Dashboard "participant_usernames": array of strings // usernames of event's current participants "dry_run": boolean (optional) // if True, will verify that event is synced and ready for participant updates. }
Possible error codes:
invalid_secret - The shared secret doesn't match course_not_found - A Course with the provided slug doesn't exist sync_not_enabled - This Course isn't linked to the Event Center event (based on event_id)
endpoint 3: unsync_event
Method for disconnecting an Event Center event from a Dashboard course
POST /wikimedia_event_center/unsync_event as JSON { "course_slug": string // the unique URL slug for the Course "event_id": string or integer // a unique ID for the Event Center event "secret": string // shared secret between the Event Center and the Dashboard "dry_run": boolean (optional) // if truthy, will verify that event can be unsynced }
On failure, returns a JSON object with the error message and error code.
Possible error codes:
invalid_secret - The shared secret doesn't match course_not_found - A Course with the provided slug doesn't exist sync_not_enabled - This Course isn't linked to the Event Center event (based on event_id)
misc.
Test environment
- https://dashboard-testing.wikiedu.org
- The API secret is available at P34641 (restricted)
Production environment
- https://outreachdashboard.wmflabs.org
- The API secret is available at P49567 (restricted)