Genesys Cloud - Main

 View Only


Discussion Thread View
  • 1.  How to convert microsecond epoch timestamp to millisecond in Inbound Call Flow

    Posted 11 days ago

    Hi Guys,

    One of our vendors requires us to pass the timestamp value in Millisecond epoch format. I was able to build a data action with the following API which gathers timestamp value in epoch format, but the value is in microseconds and the requirement is to be in milliseconds.

    "GET
    /api/v2/telephony/sipmessages/conversations/{conversationId}/headers"
    I use the above call data action in an inbound call flow and collect the timestamp value in microseconds (string). now the trouble is on how to convert this string value to integer and convert it to milliseconds to pass it in the set participant data and another data action as input (vendor data action).
    need some direction on the above.
    Thanks!

    #Integrations
    #Routing(ACD/IVR)

    ------------------------------
    Sagar Tawde
    MetLife Services and Solutions, LLC
    ------------------------------


  • 2.  RE: How to convert microsecond epoch timestamp to millisecond in Inbound Call Flow

    Posted 11 days ago

    Hello Sagar,

    What format is the vendor expecting?

    Do they want a Unix Timestamp?



    ------------------------------
    Jan Heinonen
    Contact Center Specialist
    GlobalConnect AB
    ------------------------------



  • 3.  RE: How to convert microsecond epoch timestamp to millisecond in Inbound Call Flow

    Posted 11 days ago

    yes, they need UNIX timestamp in milliseconds. Genesys SIP trace gives us microsecond UNIX timestamp, but the timestamp value is a "string".



    ------------------------------
    Sagar Tawde
    MetLife Services and Solutions, LLC
    ------------------------------



  • 4.  RE: How to convert microsecond epoch timestamp to millisecond in Inbound Call Flow

    Posted 11 days ago

    Unless I have misunderstood your requirement, why can't you do simple maths.
    First to convert string to Int, use ToInt() in the update data step.
    Next divide the number by 1000 to convert to milliseconds.



    ------------------------------
    Vineet Kakroo
    FIL Fund Services (Bermuda) Limited
    ------------------------------



Need Help finding something?

Check out the Genesys Knowledge Network - your all-in-one access point for Genesys resources