@startuml

title Home Internet Exchange

actor FrontlineRep
participant QV
participant QVXP
participant EBS
participant DTIS
participant ODM
participant DMW
participant OMS


FrontlineRep   -> QV:
QV -> QVXP:
== QVXP  calls Service API "getWarrantyEligibility(MSISDN , LineType)" ==
QVXP -> EBS: QVXP calls getWarrantyEligibility to validate eligibility of Subscriber. Swagger for [[https://bitbucket.service.edp.t-mobile.com/projects/EITCODEDOC/repos/flow-documentation/browse/swagger/ss.tmng/storeLocatorV2/swagger.json **/StoreLocatorV2]]  API **
EBS -> ODM :
alt
ODM --> QVXP : <font color=green>If Subscriber is Eligible
       QVXP-> QVXP : <font color=blue>Continue Warranty

else <font color=red> If Subscriber not Eligible
ODM --> QVXP : <font color=red> Display Error message "Customer account not eligible."
end
note over QVXP
Scenario 
1)Reps selects the Line type ISP from QV and toggles to Microapp Warranty Initiation page
2)getWarrantyEligibility service calls determines if the subcriber is eligible or not
3)If Success reps navigates to device Validation page
end note

== QVXP calls Service API "getWarrantyLookUp(MSISDN, LineType)" ==
QVXP -> DTIS :
DTIS -> DMW :
DMW ->  QVXP : <font color=blue> Display all the Device History and only the Line Type Device will be Eligible
note over QVXP
Scenario 
1)Reps lands to Device Validation page
2)getWarrantyLookUp service displays all the Device History
3)If device is not present reps will use Add Device option to enter the defective device
end note

== QVXP calls Service API "getDeviceEligibility(LineType, Device data)" ==
QVXP -> DTIS :
DTIS -> ODM :
alt
ODM  -> QVXP : <font color = green> If Device is eligible for exchange
QVXP -> QVXP : <font color=blue>Continue Exchange
else <font color=red> If Device not Eligible
ODM -> QVXP : <Font color = red > Disable Exchange
end

    == QVXP calls Service API "getReplacementDevice(SKU)" ==
QVXP -> DTIS :
alt
DTIS  -> QVXP : <font color = green> If Replacement device available
QVXP -> QVXP : <font color=blue>Continue Exchange
else <font color=red> If replacement Device not available
DTIS -> QVXP : <Font color = red > Disable Exchange
end

== QVXP calls Service API "getShippingOptions  (ProductType,LineType)" ==
QVXP -> DTIS :
DTIS -> WCS
WCS -> QVXP: <Font color =blue> Displays Overnight  Shipping options and Language Preferences

== QVXP calls Service API "getSubscriberInfo  (MSISDN)" ==
QVXP -> DTIS :
DTIS -> WCS
WCS -> QVXP: <Font color =blue> This is used to display shipping address

== QVXP calls Service API "CreateDraftOrder (LineType, Defective device, Replacement Device)" ==
QVXP -> EBS :
EBS -> OMS
OMS -> QVXP: <Font color =blue> This will create a draft order

== QVXP calls Service API "getOrderDetails(Order Number)" ==
QVXP -> EBS :
EBS -> OMS :
OMS -> QVXP: <Font color =blue> This will us the estimated Shipping date

== QVXP calls Service API "ConfirmOrder(Order Number)" ==
QVXP -> EBS :
EBS -> OMS :
OMS -> QVXP: <Font color =blue> This confirms the Order


@enduml

