Pre script

Service Manager Integration Suite (SMIS) executes the pre script after field mapping and before value mapping. You can use the pre script to initialize variables so that SMIS can use these variables in value mapping, or execute additional calculations to influence the value mapping. You can follow normal Javascript syntax to compose the pre script. For the objects that the pre script can use, see Placeholder objects.

For example, the following pre script first verifies if the properties.Description field in the endpoint is not empty. If the field is not empty, the script calls a function and assigns the result of the function back to the properties.Description field.

if(ep['properties.Description']) ep['properties.Description'] = lib.CaseExchange_SAWUtil.processHtmlText(param, context, 'description', ep['properties.Description']);

It is not supported to update the affected record by using JavaScript statements in the Pre Script section. Only the update of the record itself via the running SMIS instance is supported.

Related topics

Placeholder objects
Post script
Integration Instance Mapping