Transform Template Custom Field Mappings
The code samples shown in the tables include all data types that can be used in the Job to WorkOrder Update and WorkOrder to Job Create transform templates. When you configure real-time sync, be careful to specify all necessary mappings for the data types used by any custom fields that you add to these templates.
Job to WorkOrder Update Transform Template
Data Types
Mapping Code
Salesforce
Max
Checkbox
Boolean
"Custom_Checkbox_Max__c":"payload.fields.dev_check_box",
Lookup
Relationship
"Custom_Account_Relationship__c":"payload.fields.dev_account_custom_relationship",
Date
Date
"Custom_Date_Max__c":"payload.fields.dev_custom_date",
DateTime
TimeStamp
"Custom_Date_Time_Max__c":"isoInverseDateFormat(payload.fields.dev_custom_date_time)",
Email
Email
"Custom_Email_Max__c":"payload.fields.dev_custom_email",
Number
Number
"Custom_Number_Max__c":"payload.fields.dev_custom_number",
Percent
Percent
"Custom_Percent_Max__c":"payload.fields.dev_custom_percent",
Phone
Phone
"Custom_Phone_Max__c":"payload.fields.dev_custom_phone",
Picklist/Optionlist
Multi picklist
"Custom_Picklist_Max__c":"payload.fields.dev_custom_picklist",
URL
URL
"Custom_URL_Max__c":"payload.fields.dev_custom_url",
TextArea
Text
"Custom_Text_Area_Max__c":"payload.fields.dev_custom_text_area",
Currency
Currency
"CurrencyIsoCode":"currencyInverseFormat(payload.fields.core_cost, 0)",
"SVMXC__Product_Cost__c":"currencyInverseFormat(payload.fields.core_cost, 1)"
Address fields
Address
"Custom_Address_City__c":"arrayIndexVal(payload.fields.dev_custom_address, 3)",
"Custom_Address_State__c":"arrayIndexVal(payload.fields.dev_custom_address, 4)",
"Custom_Address_Country__c":"arrayIndexVal(payload.fields.dev_custom_address, 6)",
"Custom_Address_Zip__c":"arrayIndexVal(payload.fields.dev_custom_address, 5)"
Number (in seconds)
Interval
"Custom_Interval_Max__c":"periodInverseFormat(payload.fields.dev_custom_interval)"
WorkOrder to Job Create Transform Template
Data Types
Mapping Code
Salesforce
Max
Text
String
"dev_customtext":"fields.Custom_field_text__c",
Checkbox
Boolean
"dev_check_box":"fields.Custom_Checkbox_Max__c",
Lookup
Relationship
"dev_account_custom_relationship":"concat('external-', fields.Custom_Account_Relationship__c)",
Date
Date
"dev_custom_date":"isoDateFormat(fields.Custom_Date_Max__c, false)",
DateTime
TimeStamp
"dev_custom_date_time":"isoDateFormat(fields.Custom_Date_Time_Max__c)",
Email
Email
"dev_custom_email":"fields.Custom_Email_Max__c",
Number
Number
"dev_custom_number":"fields.Custom_Number_Max__c",
Percent
Percent
"dev_custom_percent":"fields.Custom_Percent_Max__c",
Phone
Phone
"dev_custom_phone":"fields.Custom_Phone_Max__c",
Optionlist
Picklist/Multi picklist
"dev_custom_picklist":"fields.Custom_Picklist_Max__c",
URL
URL
"dev_custom_url":"fields.Custom_URL_Max__c",
TextArea
Text
"dev_custom_text_area":"fields.Custom_Text_Area_Max__c",
Currency
Currency
"dev_custom_currency":"ifelse(fields.Custom_Currency_Max__c == null, 'USD 0', concat(fields.CurrencyIsoCode, ' ', fields.Custom_Currency_Max__c))",
GeoLocation
Geocode
/"dev_gecode":"geoCodeFormat(fields.Custom_Geolocation__latitude__s, fields.Custom_Geolocation__longitude__s)",
Address fields
Address
"dev_custom_address": "addressFormat(null, null, fields.Custom_Address_City__c, fields.Custom_Address_State__c, fields.Custom_Address_Zip__c, fields.Custom_Address_Country__c, null, null)"
Number (in seconds)
Interval
"dev_custom_interval": "periodFormat(fields.Custom_Interval_Max__c, false, 'PT0H')"
For more information:
Was this helpful?