@startuml
title <size:18>__Manage Account - Line Details__</size>
actor "Agent or Customer" as Agent
participant "Rebellion" as UI
participant "API Gateway" as GW
participant "Experience Services" as ES
participant WSIL
participant OMD
participant ESP

Agent -> UI : User navigates from Account Landing to  \nLine Details landing page \n(SC1111)
UI -> UI : Display MSISDN list from cache
alt Cache information is not available
UI -> GW : API_2006_accountSummary (CCID, FAN)
GW -> ES : API_2006_accountSummary (CCID, FAN)
ES -> WSIL: CustomerSummaryWSIL.getAggregatedCustomerInfo (FAN)
ES <-- WSIL : Return aggregated customer info
ES -> WSIL : FinancialAccountDataWSIL.getMonthlyRecurringCharges(FAN)
ES <-- WSIL : Return estimated monthly recurring \ncharges for the next bill cycle
GW <-- ES : Return account summary
UI <-- GW : Return account summary
end

UI -> UI : Select the first Line as default
Agent -> UI : User selects a line

group Parallel Call 1
UI -> GW : API_2040_lineDetails (CCID, FAN, LoS ID)
GW -> ES : API_2040_lineDetails (CCID, FAN, LoS ID)
ES -> WSIL: LineOfServiceDetailsWSIL.GetLineOfServiceDetails \n(CCID, FAN, LoS ID)
ES <-- WSIL : Return LoS detail
GW <-- ES : Return LoS detail
UI <-- GW : Return LoS detail
end

group Parallel Call 2
UI -> GW : API_2009_lineUsageSummary (MSISDN)
GW -> ES : API_2009_lineUsageSummary (MSISDN)
ES -> WSIL: UsageWSIL.getUsageSummary (MSISDN)
ES <-- WSIL : Return Usage Summary
GW <-- ES : Return Usage Summary
UI <-- GW : Return Usage Summary
end

group Parallel Call 3

UI -> GW : API_2010_lineSessionPassDetails (LoS ID)
GW -> ES : API_2010_lineSessionPassDetails (LoS ID)
ES -> WSIL: LineOfServiceDetailsWSIL.getSessionPassDetails (LoS ID)
ES <-- WSIL : Return data for One Time Charges
GW <-- ES : Return data for One Time Charges
UI <-- GW : Return data for One Time Charges
end

group Parallel Call 4
UI -> GW : API_2022_deviceDetails (FAN, MSISDN)
GW -> ES : API_2022_deviceDetails (FAN, MSISDN)
ES -> WSIL: FinancialAccountDetailsWSIL.GetAccountDeviceDetails(FAN, MSISDN)
ES <-- WSIL : Return Device Name, Image Url
GW <-- ES : Return Device Name, Image Url
UI <-- GW : Return Device Name, Image Url
end

group Parallel Call 5
UI -> GW : orders-search (FAN, orderTimeRange)
GW -> OMD: orders-search (FAN, orderTimeRange) [[http://flows.corporate.t-mobile.com/all-diagrams/sequence_diagrams/omd/ce.dsg.od.api.orders-search.puml/ OMD-OrdersSearch]]
GW <-- OMD : Return Pending orders
UI <-- GW : Return Pending orders
end

UI -> UI : Display Line Details

UI -> GW : API_2025_GetCustomerNotifications
GW -> ES : API_2025_GetCustomerNotifications
ES -> ESP: AlertEnterprise.getAlerts
ES <-- WSIL : Return line level alerts
GW <-- ES : Return line level alerts
UI <-- GW : Return line level alerts
UI -> UI : Display Alerts Block


@enduml