Onboarding Diagram » History » Version 3
Ryan Supawarapong, 03/12/2026 04:04 AM
| 1 | 1 | Ryan Supawarapong | # Onboarding Diagram |
|---|---|---|---|
| 2 | |||
| 3 | ## API Spec Template |
||
| 4 | |||
| 5 | ```plantuml |
||
| 6 | 3 | Ryan Supawarapong | @startuml Onboarding |
| 7 | title Onboarding |
||
| 8 | 1 | Ryan Supawarapong | |
| 9 | 3 | Ryan Supawarapong | actor "customer" as c |
| 10 | participant "app" as a |
||
| 11 | participant "backend" as be |
||
| 12 | database "database" as db |
||
| 13 | participant "notification" as n |
||
| 14 | participant "appman" as am |
||
| 15 | participant "thaid" as th |
||
| 16 | |||
| 17 | c -> a: input mobile and email |
||
| 18 | a -> be: check existing email and mobile |
||
| 19 | be -> db: check database for existing data |
||
| 20 | alt found data |
||
| 21 | db --> be: found data |
||
| 22 | be --> a: found data |
||
| 23 | |||
| 24 | else |
||
| 25 | db --> be: not found |
||
| 26 | be --> a: not found |
||
| 27 | a -> be: confirm email & mobile |
||
| 28 | be -> db: save email & mobile info |
||
| 29 | db --> be: ok |
||
| 30 | be -> n: send email & mobile otp |
||
| 31 | be --> c: send otp to customer email & mobile |
||
| 32 | c -> a: input otp |
||
| 33 | a -> be: forward otp |
||
| 34 | be -> db: check otp |
||
| 35 | db --> be: ok |
||
| 36 | be -> a: ok |
||
| 37 | |||
| 38 | end |
||
| 39 | a --> c: redirect user to login |
||
| 40 | |||
| 41 | a -> be: check customer onboarding status |
||
| 42 | be -> db: check status |
||
| 43 | alt done |
||
| 44 | db --> be: done |
||
| 45 | be --> a: done |
||
| 46 | a --> c: done |
||
| 47 | |||
| 48 | else |
||
| 49 | a -> c: redirect to onboarding |
||
| 50 | end |
||
| 51 | |||
| 52 | c -> a: select citizenship type |
||
| 53 | c -> a: PDPA agreement |
||
| 54 | c -> a: input fullname |
||
| 55 | |||
| 56 | a -> be: send fullname |
||
| 57 | be -> db: save data |
||
| 58 | db --> be: ok |
||
| 59 | be --> a: ok |
||
| 60 | |||
| 61 | group appman |
||
| 62 | a -> be: init appman |
||
| 63 | be -> am: generate appman link |
||
| 64 | be -> db: save response |
||
| 65 | be --> a: return appman link |
||
| 66 | |||
| 67 | a -> c: redirect to appman |
||
| 68 | c -> am: do appman |
||
| 69 | am --> a: redirect back |
||
| 70 | a -> be: send id that is done |
||
| 71 | be -> am: get detail |
||
| 72 | am --> be: return detail |
||
| 73 | be -> db: save detail |
||
| 74 | db --> be: ok |
||
| 75 | be -> be: check face comparsion |
||
| 76 | be -> be: check mule? |
||
| 77 | be -> be: check freeze, hr, led, dopa, pep |
||
| 78 | be --> a: ok |
||
| 79 | |||
| 80 | end |
||
| 81 | |||
| 82 | a -> c: redirect to address page |
||
| 83 | c -> a: fill current and register address |
||
| 84 | a -> be: send data |
||
| 85 | be -> db: save data |
||
| 86 | db --> be: ok |
||
| 87 | be --> a: ok |
||
| 88 | |||
| 89 | a -> c: redirect to occupation page |
||
| 90 | c -> a: fill occupation |
||
| 91 | a -> be: send data |
||
| 92 | be -> db: save data |
||
| 93 | db --> be: ok |
||
| 94 | be --> a: ok |
||
| 95 | |||
| 96 | |||
| 97 | a -> c: redirect to workplace address page |
||
| 98 | c -> a: fill workplace address |
||
| 99 | a -> be: send data |
||
| 100 | be -> db: save data |
||
| 101 | db --> be: ok |
||
| 102 | be --> a: ok |
||
| 103 | |||
| 104 | a -> c: redirect to bank page |
||
| 105 | c -> a: fill bank |
||
| 106 | a -> be: send data |
||
| 107 | be -> db: save data |
||
| 108 | db --> be: ok |
||
| 109 | be --> a: ok |
||
| 110 | |||
| 111 | |||
| 112 | a -> c: redirect to income page |
||
| 113 | c -> a: fill source of income and country of income |
||
| 114 | a -> be: send data |
||
| 115 | be -> db: save data |
||
| 116 | db --> be: ok |
||
| 117 | be --> a: ok |
||
| 118 | |||
| 119 | |||
| 120 | a -> c: redirect to suitability test page |
||
| 121 | c -> a: fill suitability |
||
| 122 | a -> a: check if more than 30 points |
||
| 123 | |||
| 124 | alt more than 30 points |
||
| 125 | a -> c: acknowledge agreement |
||
| 126 | end |
||
| 127 | |||
| 128 | a -> be: send data |
||
| 129 | be -> db: save data |
||
| 130 | db --> be: ok |
||
| 131 | be --> a: ok |
||
| 132 | |||
| 133 | a -> c: redirect to verify identity page |
||
| 134 | c -> a: choose ndid or Thaid |
||
| 135 | |||
| 136 | group Thaid |
||
| 137 | |||
| 138 | a -> be: ask for thaid link/qr |
||
| 139 | be -> be: generate thaid link/qr |
||
| 140 | be -> db: save thaid link/qr |
||
| 141 | db --> be: ok |
||
| 142 | be --> a: return link/qr |
||
| 143 | c -> th: do thaid |
||
| 144 | |||
| 145 | th --> be: send data |
||
| 146 | be -> db: save data |
||
| 147 | db --> be: ok |
||
| 148 | |||
| 149 | |||
| 150 | end |
||
| 151 | |||
| 152 | group Ndid |
||
| 153 | |||
| 154 | c -> a: choose bank |
||
| 155 | a -> be: ask for ndid link/qr |
||
| 156 | be -> be: generate ndid link/qr |
||
| 157 | be -> db: save ndid link/qr |
||
| 158 | db --> be: ok |
||
| 159 | be --> a: return link/qr |
||
| 160 | c -> th: do thaid |
||
| 161 | |||
| 162 | th --> be: send data |
||
| 163 | be -> db: save data |
||
| 164 | db --> be: ok |
||
| 165 | |||
| 166 | |||
| 167 | end |
||
| 168 | |||
| 169 | 1 | Ryan Supawarapong | @enduml |
| 170 | ``` |
||
| 171 | 3 | Ryan Supawarapong | |
| 172 | <img style="width: 1153px;" src="clipboard-202603121103-zz3jz.png"><br> |