@startujn render { direction: down; arrow_spacing: 24 } journey APP_SETUP "Set up the app on a new phone" description: "Sign in, then ask for notifications and location; the user can skip either" unique_id_friendly: app_setup start from_home { description: "Opened after install" } start from_invite { type: deep-link; description: "Invite link"; route: /invite/:code } ref sign_in { journey: SIGNIN; title: "Sign in or sign up" } view notify_ask { title: "Get order updates"; description: "Why we send notifications"; route: /setup/notifications } action notify_os { type: permission; title: "Allow notifications"; description: "Either answer goes on" } view location_ask { title: "Find places near you"; description: "Why we use location"; route: /setup/location } action location_os { type: permission; title: "Allow location" } view location_off { title: "Location is off"; description: "How to turn it on later"; route: /setup/location-off } handoff phone_settings { title: "Phone settings"; channel: phone settings } view all_set { title: "All set"; route: /setup/done } end ready { type: success; description: "On the home screen" } from_home --> sign_in from_invite --> sign_in { payload: [invite_code] } sign_in ..> notify_ask : signed in notify_ask --> notify_os : [Turn on] notify_ask --> location_ask : [Not now] notify_os --> location_ask location_ask --> location_os : [Turn on] location_os --> all_set : allowed location_os -x-> location_off : denied location_ask --> all_set : [Not now] location_off --> phone_settings : [Open Settings] location_off --> all_set : [Not now] phone_settings ..> all_set : [Turn location on] phone_settings .x.> location_off : [Leave it off] all_set -right-> ready : [Start using the app] @endujn