---
# System prepended metadata

title: Ticketing Flow

---

# Ticketing Flow

## Create User Ticketing

```plantuml
actor user as u
participant "everpro-ticket" as et
database "everpro_ticket" as db1
participant "popaket-auth" as ea
database "everpro_auth" as db2

u -> et : create user ticketing
activate et
et -> db1 : save to `user_3pl` table
et -> ea : hit endpoint `/v1/register-email` to register a new user
activate ea
ea -> db2 : save to `users` table
ea -> et : return created
deactivate ea
et -> u : return success
deactivate et
```

## Validate OTP Forgot Password User Ticketing

```plantuml
actor user as u
participant "everpro-ticket" as et
database "everpro_ticket" as db1
participant "everpro-auth" as ea
database "popaket_auth" as db2
participant "everpro-user" as eu

u -> et : submit OTP from email
activate et
et -> db1 : validate user 3pl is exist
db1 --> et
et -> ea : hit endpoint `/v1/verify-email-otp` to verifying OTP 
activate ea
ea -> ea : generating new access token
group we dont need this process for `user_category_id` == 300
ea -> eu : hit endpoint `/private/v1/<user_id> to get user detail
eu -> ea : return user detail
end group
ea -> db2 : reset email token
ea -> et : return success
deactivate ea
et -> u : return success
deactivate et
```