Supported data types and conversions

You can map a field of a supported data type to an attribute or message of the same type or for which Platform provides an automatic conversion. In request mappings only, you can use Expression and Formula fields that evaluate to any of the supported data types. In response mappings, you cannot use Formula fields, Expression fields, or any other read-only fields. These fields include system fields such as createdBy, createdAt, updatedBy, and updatedAt. In response mappings, if a date field is not compatible with Platform formats, you can convert the date.

See the following sections for more information:

Supported data types

Mappings between Platform and Corticon, support the following data types:

Data type conversions

If there is a data type mismatch between a Platform field and a Corticon field, Platform performs the following type conversions automatically for both request and response mappings:

Platform data type Corticon data type
String Any data type
Any data type String
Date Date/Time
Date/Time Date
Decimal Integer
Integer Decimal

When there is a type conversion, the mapping tool displays nodes in orange and displays conversion type text when the map is selected. The following screen shows a map with a type conversion from Date to Date/Time.

Data Type Conversion

Note: To enable Object Type Attribute for Data Maps, see Extending Object with Object Types.

Supported Date and Date/Time formats

When mapping the data service response to Platform Date or Date/Time fields, the value must be in one of the formats supported by Platform. If the format in the response is not supported, you can edit the generated formula convertResponseData() method to convert the value to a JavaScript Date object. The following example shows where you can edit the code:

function convertResponseData(value,type,isRbPickList,rbFieldName,rbObjectName){     
  if(!type || !value) return value;     
  if(isRbPickList === true){        
    returnformatPickListValue(rbObjectName,rbFieldName,value);    
  }    
  if(type === 'Date'|| type=== 'DateTime'){         
  //Write your own logic to convert Corticon response to JavaScript Date object 
  //if the response doesn't match a supported date or Date/Time format.
    return newDate(value);    
  }     
  else if(type ==='Integer'){         
    return Number(value);    
  }     
  else if(type ==='Boolean'){         
    return((value==='true' || value===true)?true:false)    
  }     
  return value 
}

See Overriding functions to provide custom behavior for more information about editing the trigger formula.

Supported Date formats include:

  • YYYY/MM/DD
  • MM/DD/YYYY
  • MMM d, yyyy
  • MMMMM d, yyyy
  • yyyy/M/d
  • M/d/yyyy

Supported Date/Time formats include:

  • YYYY/MM/DD h:mm:ss a

  • MM/DD/YYYY h:mm:ss a

  • MMM d, yyyy h:mm:ss a
  • MMMMM d, yyyy h:mm:ss a

  • yyyy/M/d h:mm:ss a

  • M/d/yyyy h:mm:ss a

  • MM/dd/yyyy H:mm:ss

  • yyyy/MM/dd H:mm:ss

  • M/d/yyyy H:mm:ss

  • yyyy/M/d H:mm:ss

  • MMM d, yyyy H:mm:ss

  • MMMMM d, yyyy H:mm:ss

  • MM/dd/yyyy HH:mm:ss

  • yyyy/MM/dd HH:mm:ss

  • M/d/yyyy HH:mm:ss

  • yyyy/M/d HH:mm:ss

  • MMM d, yyyy HH:mm:ss

  • MMMMM d, yyyy HH:mm:ss

  • MM/dd/yyyy hh:mm:ss a

  • M/d/yyyy hh:mm:ss a

  • yyyy/MM/dd hh:mm:ss a

  • yyyy/M/d hh:mm:ss a

  • MMM d, yyyy hh:mm:ss a;

  • MMMMM d, yyyy hh:mm:ss a;