@startuml
participant Configurator
participant ODC
participant PCC
participant APIGEE
participant PS
Configurator -> ODC : send Last-Modified (optionally) , store-id , SKU (optionally)
note left
Configurator TMOGetConfigurationModel
Configurator TMOProcessConfigurationPics
end note
ODC-> ODC : Process input request and determine a search profile
alt (use ODC cache data)
    ODC -> PCC: get device pricing details using Last-Modified via [[https://flows.corporate.t-mobile.com/all-diagrams/sequence_diagrams/omd/ce.dsg.od.omni.odc.cachelogic/ ODC Cache]]
    alt Last-Modified from Configurator and ODC is same
    PCC -> ODC : Status code 304 with empty response
    ODC -> ODC : prepare response
    ODC -> Configurator: send status code 304 in header with empty response
    else Last-Modified from Configurator is not same compared with ODC cache
    par get all device pricing
    PCC -> ODC : Status code 200 with device pricing details
    ODC -> ODC : prepare response
    ODC -> Configurator: send status code 200, latest Last_modified and response with device pricing details
    end par
    end
else (use P&S API to get details incase ODC-PCC interagtion is not avaialble or data is not in cache)
    ODC -> APIGEE : send JWT token, channel, Transaction Type, Market Groups, Billing Type, start, limit, sellable only, Last-Modified to APIGEE proxy
    APIGEE -> PS : send input from ODC via [[https://flows.corporate.t-mobile.com/sequence_diagrams/PS/ps.api.OMNI.puml.svg P&S Product_Offers]] 
    alt Last-Modified from Configurator and P&S is same
    PS -> APIGEE : Status code 304 with empty response
    APIGEE -> ODC : return Status code 304 with empty response
    ODC -> ODC : prepare response
    ODC -> Configurator: send status code 304 in header with empty response
    else Last-Modified from Configurator is not same compared with P&S Last-Modified
    PS -> APIGEE : Status code 200 with device pricing details
    APIGEE -> ODC : return Status code 200 with device pricing details
    ODC -> ODC : prepare response
    ODC -> Configurator: send status code 200, latest Last_modified and response with device pricing details
    end
end
|||
@enduml