Onboarding Foreign » History » Version 10
prin methirattanasophon, 03/04/2026 06:35 AM
| 1 | 1 | prin methirattanasophon | # Onboarding Foreign |
|---|---|---|---|
| 2 | |||
| 3 | 7 | prin methirattanasophon | [[CRS_Question]] |
| 4 | |||
| 5 | 3 | prin methirattanasophon | Changes: |
| 6 | |page|details| |
||
| 7 | |--|--| |
||
| 8 | |1|remove thai title, name, lastname, laser code, id card number| |
||
| 9 | |1|add passport| |
||
| 10 | 8 | prin methirattanasophon | |2|new page (CRS)| |
| 11 | |5|new page (upload verification document)| |
||
| 12 | |6|change email link from thaid to success page| |
||
| 13 | 9 | prin methirattanasophon | |7|new page (confirm email success): "/authentication/signup/foreign/email-confirm-success"| |
| 14 | 3 | prin methirattanasophon | |
| 15 | 10 | prin methirattanasophon | Page ID: |
| 16 | |ID|page| |
||
| 17 | |--|--| |
||
| 18 | |1000|fullname| |
||
| 19 | |1100|appman| |
||
| 20 | |1200|CRS| |
||
| 21 | |1300|basic info| |
||
| 22 | |1400|Suite test| |
||
| 23 | |1500|Verify document| |
||
| 24 | |1600|Confirm email| |
||
| 25 | |1700|Verify email from link| |
||
| 26 | |||
| 27 | |||
| 28 | |||
| 29 | 1 | prin methirattanasophon | Workflow Diagram |
| 30 | |||
| 31 | 3 | prin methirattanasophon | <img style="width: 291px;" src="clipboard-202602271329-bsehb.png"><br> |
| 32 | 1 | prin methirattanasophon | |
| 33 | 3 | prin methirattanasophon | ``` |
| 34 | @startuml onboarding foreign |
||
| 35 | 1 | prin methirattanasophon | |
| 36 | start |
||
| 37 | :fullname; |
||
| 38 | note right: page 1 |
||
| 39 | :appman; |
||
| 40 | note right: acecoin |
||
| 41 | :eligibleCheck; |
||
| 42 | note right: page 2 new |
||
| 43 | :crsQuestion; |
||
| 44 | note right: page 2 new |
||
| 45 | :currentAddress; |
||
| 46 | note right: page 3 Basic info |
||
| 47 | :occupation; |
||
| 48 | note right: page 3 Basic info |
||
| 49 | :sourceOfIncome; |
||
| 50 | note right: page 3 Basic info |
||
| 51 | :workAddress; |
||
| 52 | note right: page 3 Basic info |
||
| 53 | :bank; |
||
| 54 | note right: page 3 Basic info |
||
| 55 | :suitabilityTest; |
||
| 56 | note right: page 4 |
||
| 57 | :selectDocument; |
||
| 58 | 3 | prin methirattanasophon | note right: page 5 new |
| 59 | 1 | prin methirattanasophon | :uploadDocument; |
| 60 | 3 | prin methirattanasophon | note right: page 5 new |
| 61 | :email mobile verify; |
||
| 62 | note right: page 6 |
||
| 63 | 1 | prin methirattanasophon | end |
| 64 | @enduml |
||
| 65 | |||
| 66 | 2 | prin methirattanasophon | ``` |
| 67 | 4 | Ryan Supawarapong | |
| 68 | 1 | prin methirattanasophon | ## Sequence Diagram |
| 69 | 6 | Ryan Supawarapong | <img style="width: 797px;" src="clipboard-202603020844-povww.png"><br> |
| 70 | 4 | Ryan Supawarapong | |
| 71 | ``` |
||
| 72 | @startuml |
||
| 73 | |||
| 74 | title Onboarding Foreigner |
||
| 75 | |||
| 76 | actor "customer" as c |
||
| 77 | participant "frontend" as fe |
||
| 78 | participant "backend" as be |
||
| 79 | database "database" as db |
||
| 80 | participant "notification" as n |
||
| 81 | participant "appman" as ap |
||
| 82 | |||
| 83 | |||
| 84 | c -> fe: choose Foreign Investor |
||
| 85 | fe --> c: ok |
||
| 86 | |||
| 87 | group Fullname Page |
||
| 88 | |||
| 89 | c -> fe: fill fullname, email, mobile and passport detail |
||
| 90 | fe -> be: send fullname, email, mobile and passport detail |
||
| 91 | |||
| 92 | be -> db: check for existing email, mobile and passport |
||
| 93 | db --> be: not found |
||
| 94 | be -> db: create user entry in information |
||
| 95 | db --> be: ok |
||
| 96 | be --> fe: ok & redirect to appman page (init by BE) |
||
| 97 | fe --> c: show next page (Appman) |
||
| 98 | |||
| 99 | group Back to Register |
||
| 100 | db --> be: found |
||
| 101 | be --> fe: found existing user |
||
| 102 | fe --> c: this account already exist. "Enter passport no" |
||
| 103 | c -> fe: enter passport no |
||
| 104 | fe --> be: check passport no for existing user |
||
| 105 | end |
||
| 106 | |||
| 107 | end |
||
| 108 | |||
| 109 | group Appman Page |
||
| 110 | c -> ap: do passport |
||
| 111 | ap --> fe: redirect to next page(CRS) |
||
| 112 | end |
||
| 113 | |||
| 114 | group CRS page |
||
| 115 | fe -> be: send appman state code |
||
| 116 | be -> ap: request customer data |
||
| 117 | ap --> be: send customer data |
||
| 118 | be --> fe: ok |
||
| 119 | |||
| 120 | c -> fe: do eligibility |
||
| 121 | fe --> c: ok |
||
| 122 | c -> fe: TIN detail for CRS |
||
| 123 | fe -> be: send Tin detail |
||
| 124 | be -> db: save TIN |
||
| 125 | db --> be: ok |
||
| 126 | be --> fe: ok |
||
| 127 | fe --> c: redirect to next page(basic info) |
||
| 128 | end |
||
| 129 | |||
| 130 | group Basic Info page |
||
| 131 | |||
| 132 | c -> fe: input data |
||
| 133 | 1 | prin methirattanasophon | fe -> be: same info (Same as regular onboarding) |
| 134 | 6 | Ryan Supawarapong | be -> db: save info |
| 135 | db --> be: ok |
||
| 136 | 4 | Ryan Supawarapong | be --> fe: ok |
| 137 | fe --> c: redirect to next page(Suite test) |
||
| 138 | end |
||
| 139 | |||
| 140 | group Suite test |
||
| 141 | c -> fe: do suite test |
||
| 142 | fe -> be: send suite test result |
||
| 143 | 1 | prin methirattanasophon | be -> db: save suite test result |
| 144 | 4 | Ryan Supawarapong | db --> be: ok |
| 145 | 1 | prin methirattanasophon | db --> fe: ok |
| 146 | 5 | Ryan Supawarapong | fe --> c: redirect to next page(verification document) |
| 147 | 4 | Ryan Supawarapong | end |
| 148 | |||
| 149 | 5 | Ryan Supawarapong | group Verification Document |
| 150 | 4 | Ryan Supawarapong | |
| 151 | c -> fe: choose type & upload document |
||
| 152 | fe -> be: document & document type |
||
| 153 | be -> db: save document & document type |
||
| 154 | db --> be: ok |
||
| 155 | be --> fe: ok |
||
| 156 | fe --> c: redirect to next page(verify email and mobile) |
||
| 157 | |||
| 158 | end |
||
| 159 | |||
| 160 | group Veirfy Email and Mobile |
||
| 161 | |||
| 162 | c -> fe: verify mobile |
||
| 163 | fe -> be: request sms otp |
||
| 164 | be -> n: send sms otp |
||
| 165 | n --> be: ok |
||
| 166 | be --> fe: ok |
||
| 167 | n -> c: sms otp |
||
| 168 | c -> fe: input otp |
||
| 169 | fe -> be: otp code |
||
| 170 | be -> db: check otp code |
||
| 171 | db --> be: ok |
||
| 172 | be --> fe: ok |
||
| 173 | fe --> c: ok |
||
| 174 | |||
| 175 | c -> fe: verify email |
||
| 176 | fe -> be: request verification link |
||
| 177 | be -> n: send email with link |
||
| 178 | n --> be: ok |
||
| 179 | be --> fe: ok |
||
| 180 | n -> c: email with link |
||
| 181 | |||
| 182 | c -> fe: click link |
||
| 183 | fe -> be: jwt token |
||
| 184 | be -> be: check jwt token |
||
| 185 | be -> db: update status |
||
| 186 | db --> be: ok |
||
| 187 | be --> fe: ok |
||
| 188 | fe --> c: ok |
||
| 189 | |||
| 190 | end |
||
| 191 | |||
| 192 | @enduml |
||
| 193 | ``` |