Invite a teammate
In a team workspace app, an admin invites a teammate by email and picks their role; if every seat on the plan is taken, the admin upgrades the plan before inviting. The teammate opens the invite within 7 days, creates an account or signs in, and joins the workspace; an expired or revoked invite opens a page of its own that tells them to ask the admin for a new one. While the invite is pending, the admin can resend or revoke it.
What UJN shows here Point at a note to see its part of the drawing
The source (38 lines)
invite-teammate.puml
@startujnrender { direction: down; arrow_spacing: 24 }journey INVITE_TEAMMATE "Invite a teammate"description: "An admin invites a teammate by email; the teammate signs up or signs in and joins the workspace"unique_id_friendly: invite_teammate actor admin { title: "Workspace admin"; role: Admin }start from_settings { description: "From workspace settings" }view members { title: "Members"; description: "Seats used and pending invites"; route: /settings/members }action revoke { title: "Revoke invite"; description: "The link stops working" }view invite_form { type: modal; title: "Invite teammate"; description: "Email and role" }ref upgrade { journey: PLAN_UPGRADE; title: "Upgrade for more seats"; description: "Prompt, then plan and payment" }action send_invite { type: message; title: "Send invite"; channel: email }handoff invite_email { title: "Invite email"; description: "The teammate opens the invite"; channel: email; timeout: 7 d; resume: /invite/:token }view invite_expired { title: "Invite no longer valid"; description: "Ask your admin for a new one"; route: /invite/expired }view accept { title: "Join the workspace"; description: "Shows who invited you and your role"; route: /invite/:token }ref signup { journey: SIGNUP; title: "Sign up"; description: "Email already confirmed by the invite" }ref signin { journey: SIGNIN; title: "Sign in"; description: "Already has an account" }view workspace { title: "Workspace home"; route: /w/:workspace }end joined { type: success; description: "Teammate joined" } admin --> from_settingsfrom_settings --> membersmembers --> invite_form : [Invite] seat freemembers -right-> upgrade : [Invite] no seat free { returns }members -left-> revoke : [Revoke] invite pendingrevoke ..> membersmembers --> send_invite : [Resend] invite pendinginvite_form ..> members : [Cancel]invite_form --> send_invite : [Send invite] { payload: [email, role] }send_invite --> invite_emailinvite_email ..> accept : [Open link] validinvite_email ..> invite_expired : [Open link] expired or revokedaccept --> signup : [Create account] { returns; payload: [email] }accept -left-> signin : [Sign in] { returns }accept --> workspace : [Join workspace] signed inworkspace -right-> joined : [Get started]@endujn