Download your data

A user asks for a copy of all the data the product holds about them. After they confirm their password, a background job builds an archive within 48 hours, and an email brings them back to download it within 7 days; an expired link opens a page where they can ask again. Deleting the account is a separate journey, linked from the same page.

15 screens and steps16 arrows0 warnings

What UJN shows here Point at a note to see its part of the drawing

Download your data  EXPORTAsk for a copy of your data and download it from an email linkStart From privacy settingsStartFrom privacy settingsYour data (View) Download or delete your data Route: /settings/privacyViewYour dataDownload or delete your data/settings/privacyDelete account (Journey) 30-day grace period Journey: DELETEJourneyDelete account30-day grace periodDELETEConfirm your password (Auth) Sign in again before a sensitive downloadAuthConfirm your passwordSign in again before a sensitive downloadQueue export (Action)ActionQueue exportExport requested (View) We email you when it is ready Route: /settings/privacy/exportViewExport requestedWe email you when it is ready/settings/privacy/exportExport ready (Event) The background job finished Timeout: 48 hEventExport readyThe background job finished48 hExport archive (File) Deleted after 7 days Location: /exports/:user_id.zipFileExport archiveDeleted after 7 days/exports/:user_id.zipSend failure notice (Message) Asks the user to try again Channel: emailMessageSend failure noticeAsks the user to try againemailEnd, failure Export not built in 48 hEnd, failureExport not built in 48 hSend download link (Message) Channel: emailMessageSend download linkemailDownload link (Handoff, returns) The user opens the email Channel: email Timeout: 7 d Resume: /export/:tokenHandoff, returnsDownload linkThe user opens the emailemail · 7 dDownload your data (View) Sign-in required; one archive, about 200 MB Route: /export/:token Trace: req:PRIV-02, test:e2e/export.spec.ts Id: unique id 83d5004848eViewDownload your dataSign-in required; one archive, about 200 MB/export/:tokenLink expired (View) The archive was deleted Route: /export/expiredViewLink expiredThe archive was deleted/export/expiredEnd, success Data downloadedEnd, successData downloadedNo label Navigation from from_privacy to Your dataDownload my data Navigation from Your data to Confirm your passwordDownload my dataverified Navigation from Confirm your password to Queue exportverifiedNo label Navigation from Queue export to Export readybuilt Navigation from Export ready to Send download linkbuilttimeout Negative from Export ready to Send failure noticetimeoutNo label Negative from Send failure notice to not_builtNo label Navigation from Send download link to Download link Payload: {email, link}{email, link}Open link · valid Return, resume from Download link to Download your dataOpen link · validOpen link · expired Return, resume from Download link to Link expiredOpen link · expiredRequest a new export Navigation from Link expired to Confirm your passwordRequest a new exportDownload Navigation from Download your data to doneDownloadDelete account Navigation from Your data to Delete accountDelete accountNo label Navigation from Queue export to Export requestedNo label Navigation, write from Export ready to Export archive Payload: {archive}{archive}wrong password Failed return from Confirm your password to Your datawrong password
The source (46 lines)
data-export.puml
@startujnrender { direction: down; arrow_spacing: 24 }journey EXPORT "Download your data"description: "Ask for a copy of your data and download it from an email link"unique_id_friendly: export start from_privacy { description: "From privacy settings" }view privacy { title: "Your data"; description: "Download or delete your data"; route: /settings/privacy }ref delete_account { journey: DELETE; title: "Delete account"; description: "30-day grace period" }action reauth { type: auth; title: "Confirm your password"; description: "Sign in again before a sensitive download" }action queue { title: "Queue export" }view requested { title: "Export requested"; description: "We email you when it is ready"; route: /settings/privacy/export }action export_ready { type: event; title: "Export ready"; description: "The background job finished"; timeout: 48 h }data archive { type: file; title: "Export archive"; description: "Deleted after 7 days"; location: "/exports/:user_id.zip" }action fail_notice { type: message; title: "Send failure notice"; description: "Asks the user to try again"; channel: email }end not_built { type: failure; description: "Export not built in 48 h" }action send_link { type: message; title: "Send download link"; channel: email }handoff mail_link { title: "Download link"; description: "The user opens the email"; channel: email; timeout: 7 d; resume: /export/:token }view download{  title: "Download your data"  description: "Sign-in required; one archive, about 200 MB"  route: /export/:token  trace: [req:PRIV-02, test:e2e/export.spec.ts]  unique_id: 83d5004848e  ' AUTO GENERATED - DO NOT CHANGE}view link_expired { title: "Link expired"; description: "The archive was deleted"; route: /export/expired }end done { type: success; description: "Data downloaded" } from_privacy --> privacyprivacy -right-> delete_account : [Delete account]privacy --> reauth : [Download my data]reauth --> queue : verifiedreauth .x.> privacy : wrong passwordqueue -left-> requestedqueue --> export_readyexport_ready -left-> archive { payload: [archive] }export_ready --> send_link : builtexport_ready -x-> fail_notice : timeoutfail_notice -x-> not_builtsend_link --> mail_link { payload: [email, link] }mail_link ..> download : [Open link] validmail_link ..> link_expired : [Open link] expiredlink_expired --> reauth : [Request a new export]download --> done : [Download]@endujn