My Mule flow query a Database and inserts the data queried in Salesforce. One of the column in DB has values say 'C','P'&'U' this needs to be inserted into a picklist in Salesforce which has values 'Company', 'Person', 'Unknown' where C should map to Company and P to Person etc. Any pointers on how to do this would be of great help. Thanks!
0
votes
1 Answers
1
votes
You can create a custom MEL function and use it in your flow, in an expression-transformer:
<configuration>
<expression-language>
<global-functions>
def translateType(t) {
typeMap = ['C' : 'Company', 'P' : 'Person', 'U' : 'Unknown'];
typeMap[t];
}
</global-functions>
</expression-language>
</configuration>
With this in place, you can use translateType in your flows.
Reference: MEL Global Configuration