@startuml
actor Client
actor OMS
actor EBSWrapper
actor Tibco


title Creating Draft Warranty Exchange/POIP Order in OMNI

Client -> OMS: TMOCreateDraftOrder request

Group if transactionType=POIP

OMS -> Tibco: checkTaxExemption request

alt success 

Tibco -> OMS: Tibco responds with success message

else error

Tibco -> OMS: Tibco responds with error message

end

end

OMS -> EBSWrapper: OMSOrder.taxQuote request 

EBSWrapper -> Tibco: Get tax via [[http://flows.corporate.t-mobile.com/all-diagrams/sequence_diagrams/dice/ce.dsg.dice.vertex.taxquote.txt/ taxQuote]]

alt success

Tibco -> EBSWrapper: taxQuote response with Tax Info

EBSWrapper -> OMS: OMSOrder.taxQuote response with Tax Info

OMS -> OMS: OMS will create the draft order successfully and generate order ID

OMS -> Client: TMOCreateDraftOrder response containing OMNI Order ID

else error

Tibco -> EBSWrapper: publicTaxQuote response error

EBSWrapper -> OMS: OMSOrder.taxQuote response with Error

OMS -> OMS: OMS will NOT create the draft order successfully 

OMS -> Client: TMOCreateDraftOrder response containing error response

end

@enduml