Skip to main content

Hey everyone, I’m stuck with a Salesforce Time field issue.

In OmniScript, when a user selects 2:00 PM, the JSON shows it as 14:00, but DataRaptor gives an “invalid value: 14:00” error.

Earlier we used DateTime, and Salesforce stored a converted UTC time like 18:00:00.000Z, which shifted the actual time.

Even in the UI, Salesforce converts and stores the time differently (e.g., 2:00 PM becomes 14:00:00.000Z), and sometimes shifts again on update.

Has anyone figured out the correct way to save Time values from OmniScript to Salesforce without timezone issues?

#Omnistudio
1 risposta
  1. 1 giu, 15:17

    Hi, 

     

    Transform the value before passing to DataRaptor

     

    Option A — Formula Element in OmniScript Add a Formula element after the Time picker:

    %timeField% & ":00.000Z"

    This turns 14:00 → 14:00:00.000Z. Map this formula output to DataRaptor, not the raw picker value. 

     

    Option B — SetValues / DataJSON manipulation Use a SetValues element to construct the correct string:

     

    json

    {

    "transformedTime": "{timeField}:00.000Z"

    }

     

    Option C — Integration Procedure (recommended for complex flows)

    Use a Transform action in an Integration Procedure to append :00.000Z before the Load step hits Salesforce. 

     

     

0/9000