@startujn render { 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_settings from_settings --> members members --> invite_form : [Invite] seat free members -right-> upgrade : [Invite] no seat free { returns } members -left-> revoke : [Revoke] invite pending revoke ..> members members --> send_invite : [Resend] invite pending invite_form ..> members : [Cancel] invite_form --> send_invite : [Send invite] { payload: [email, role] } send_invite --> invite_email invite_email ..> accept : [Open link] valid invite_email ..> invite_expired : [Open link] expired or revoked accept --> signup : [Create account] { returns; payload: [email] } accept -left-> signin : [Sign in] { returns } accept --> workspace : [Join workspace] signed in workspace -right-> joined : [Get started] @endujn