Project

General

Profile

Actions

Foreigner Sequence Diagram


@startuml

title Onboarding Foreigner

actor "customer" as c
participant "frontend" as fe
participant "backend" as be
database "database" as db
participant "notification" as n
participant "appman" as ap


c -> fe: choose Foreign Investor
fe --> c: ok

group Fullname Page

c -> fe: fill fullname, email, mobile and passport detail
fe -> be: send fullname, email, mobile and passport detail

be -> db: check for existing email, mobile and passport
db --> be: not found
be -> db: create user entry in information
db --> be: ok
be --> fe: ok & redirect to appman page (init by BE)
fe --> c: show next page (Appman)

  group Back to Register
    db --> be: found
    be --> fe: found existing user
    fe --> c: this account already exist. "Enter passport no"
    c -> fe: enter passport no```
@startuml

title Onboarding Foreigner

actor "customer" as c
participant "frontend" as fe
participant "backend" as be
database "database" as db
participant "notification" as n
participant "appman" as ap


c -> fe: choose Foreign Investor
fe --> c: ok

group Fullname Page

c -> fe: fill fullname, email, mobile and passport detail
fe -> be: send fullname, email, mobile and passport detail

be -> db: check for existing email, mobile and passport
db --> be: not found
be -> db: create user entry in information
db --> be: ok
be --> fe: ok & redirect to appman page (init by BE)
fe --> c: show next page (Appman)

  group Back to Register
    db --> be: found
    be --> fe: found existing user
    fe --> c: this account already exist. "Enter passport no"
    c -> fe: enter passport no
    fe --> be: check passport no for existing user
  end

end

group Appman Page
  c -> ap: do passport
  ap --> fe: redirect to next page(CRS)
end

group CRS page
  fe -> be: send appman state code
  be -> ap: request customer data
  ap --> be: send customer data
  be --> fe: ok
  
  c -> fe: do eligibility
  fe --> c: ok
  c -> fe: TIN detail for CRS
  fe -> be: send Tin detail
  be -> db: save TIN
  db --> be: ok
  be --> fe: ok
  fe --> c: redirect to next page(basic info)
end

group Basic Info page

  c -> fe: input data
  fe -> be: same info (Same as regular onboarding)
  be -> db: save info
  db --> be: ok
  be --> fe: ok
  fe --> c: redirect to next page(Suite test)
end

group Suite test
  c -> fe: do suite test
  fe -> be: send suite test result
  be -> db: save suite test result
  db --> be: ok
  db --> fe: ok
  fe --> c: redirect to next page(verification document)
end

group Verification Document

  c -> fe: choose type & upload document
  fe -> be: document & document type
  be -> db: save document & document type
  db --> be: ok
  be --> fe: ok
  fe --> c: redirect to next page(verify email and mobile)

end

group Veirfy Email and Mobile

  c -> fe: verify mobile
  fe -> be: request sms otp
  be -> n: send sms otp
  n --> be: ok
  be --> fe: ok
  n -> c: sms otp
  c -> fe: input otp
  fe -> be: otp code
  be -> db: check otp code
  db --> be: ok
  be --> fe: ok
  fe --> c: ok

  c -> fe: verify email
  fe -> be: request verification link
  be -> n: send email with link
  n --> be: ok
  be --> fe: ok
  n -> c: email with link

  c -> fe: click link
  fe -> be: jwt token
  be -> be: check jwt token
  be -> db: update status
  db --> be: ok
  be --> fe: ok
  fe --> c: ok

end

@enduml
fe --> be: check passport no for existing user

end

end

group Appman Page
c -> ap: do passport
ap --> fe: redirect to next page(CRS)
end

group CRS page
fe -> be: send appman state code
be -> ap: request customer data
ap --> be: send customer data
be --> fe: ok

c -> fe: do eligibility
fe --> c: ok
c -> fe: TIN detail for CRS
fe -> be: send Tin detail
be -> db: save TIN
db --> be: ok
be --> fe: ok
fe --> c: redirect to next page(basic info)
end

group Basic Info page

c -> fe: input data
fe -> be: same info (Same as regular onboarding)
be -> db: save info
db --> be: ok
be --> fe: ok
fe --> c: redirect to next page(Suite test)
end

group Suite test
c -> fe: do suite test
fe -> be: send suite test result
be -> db: save suite test result
db --> be: ok
db --> fe: ok
fe --> c: redirect to next page(verification document)
end

group Verification Document

c -> fe: choose type & upload document
fe -> be: document & document type
be -> db: save document & document type
db --> be: ok
be --> fe: ok
fe --> c: redirect to next page(verify email and mobile)

end

group Veirfy Email and Mobile

c -> fe: verify mobile
fe -> be: request sms otp
be -> n: send sms otp
n --> be: ok
be --> fe: ok
n -> c: sms otp
c -> fe: input otp
fe -> be: otp code
be -> db: check otp code
db --> be: ok
be --> fe: ok
fe --> c: ok

c -> fe: verify email
fe -> be: request verification link
be -> n: send email with link
n --> be: ok
be --> fe: ok
n -> c: email with link

c -> fe: click link
fe -> be: jwt token
be -> be: check jwt token
be -> db: update status
db --> be: ok
be --> fe: ok
fe --> c: ok

end

@enduml

Updated by Ryan Supawarapong about 2 months ago · 2 revisions