Multi-field handlebar expressions
Does anyone have any documentation or good examples of the differences between regular import mapping with Mapper 2.0, and multi-field mapping with handlebar expressions? An upsert for salesforce is a good example use case of the latter.
I'm convinced there are stark differences and that this isn't documented well of at all.
0
Comments
Matt Wiese are you trying to use a handlebar expression here? After you left office hours, I built a flow using upsert for an internal workflow and it worked fine. In my case, I have a “Student” object and on it there is an external id field called “Skilljar Id” so I'm just specifying user.id for that.
hi Tyler Lamparter
this is in the mapping for the Import Mapping where you can select a Multi-Field mapping and apply an expression containing functions.
Matt Wiese can you share what function you're trying to use and what your input data looks like?
{{#if record.Platform_Intelligence__c.[0].DailyValuesConcatenation__c}} {{replace record.Platform_Intelligence__c.[0].DailyValuesConcatenation__c ";" ","}}{{dateFormat 'DD'}}:{{record.count}}; {{else}} {{dateFormat 'DD'}}:{{record.count}}; {{/if}}
{
"profileId": "redacted",
"clientId": "redacted",
"count": "5025",
"Platform_Intelligence__c": [
{
"attributes": {
"type": "Platform_Intelligence__c",
"url": "/services/data/v61.0/sobjects/Platform_Intelligence__c/redacted"
},
"Id": "redacted",
"DailyValuesConcatenation__c": "01:4934,02:4940,03:4985,04:5005,05:5027,06:5021,07:5025,08:5047,09:5066,10:5070,11:5212,12:5219,13:5209;",
"Date__c": "2025-01-13",
"ExternalID__c": "01-2025-redacted-redacted-SCA",
"Measure_Days__c": 13,
"Measure_Value__c": 65760,
"Measure__c": "Available SKUs",
"Month_Year__c": "1-2025",
"Monthly_Measure_Average__c": 5058,
"Monthly_Measure_Latest_Day_Date__c": "2025-01-13",
"Monthly_Measure_Latest_Day_Value__c": 5209,
"Monthly_Measure_Peak__c": 5219,
"Monthly_Measure_Minimum__c": 4934,
"RecordTypeId": "redacted",
"Supported_Site__c": null
}
]
}
I have several…
Matt Wiese can you try the below? The
record.
structure isn't available in the older mapper 1.0 AFE. With all the newer AFE inputs, therecord.
is available so that other things like settings could be included in AFE inputs.thanks Tyler Lamparter removing that “primitive” worked for me, as well as several other expressions that weren't working before. I have one last expression if you don't mind looking (same data).
this one works -
{{#if Platform_Intelligence__c.[0].Date__c}}{{Platform_Intelligence__c.[0].Date__c}}{{else}}{{dateFormat 'YYYY-MM-DD' (subtract (dateFormat 'x' job.startedAt) 86400000) 'x'}}{{/if}}
but this one does not, returns null -
{{#if Platform_Intelligence__c.[0].Monthly_Measure_Latest_Day_Date__c}}{{Platform_Intelligence__c.[0].Monthly_Measure_Latest_Day_Date__c}}{{else}}{{dateFormat 'YYYY-MM-DD' (subtract (dateFormat 'x' job.startedAt) 86400000) 'x'}}{{/if}}
Tyler Lamparter I think I got to the bottom of that last one, resolved now. Here's what the issue was and I think it may be a weird bug (albeit fairly benign IMO):
Originally, when I was testing, I was performing a Standard mapping for that attribute and elected to set a timezone to that date value, later finding out this is unnecessary as Celigo integrations operate in UTC (thankfully).
Replacing the Standard mapping with an expression seems to not clear that timezone setting. This is confirmed by setting it back to a Standard mapping and noticing the timezone setting is still there, remove that setting by opening the drop down and selecting ‘Please Select’, then trying the same expression again and voila.
tl;dr for those reading, make sure these settings are cleared prior to changing a Standard mapping to a Multi-Field (handlebar expression) mapping
Matt Wiese sounds good, glad you got it figured out. In mapper 2.0, this is all much more clear. We're working to get mapper 2.0 to NetSuite and Salesforce so that we can eventually deprecate mapper 1.0.
Please sign in to leave a comment.