Decision Server Events contains an internal JavaScript engine that supports data transformations in the Decision Server Events environment.
You can use JavaScript to:
Any required transformations can be done by the event runtime, which greatly simplifies technology connector coding. Under most circumstances, event connectors pass data through to the event runtime where all the required transformations are done. Action connectors can then retrieve the transformed data and pass it through to touchpoint systems formatted appropriately.
Differences in data definitions between disparate touchpoint systems can be reconciled. For example, if one touchpoint system defines a customer name as consisting of a single field, called Full Name and another touchpoint system expects a customer name to consist of two fields (Given Name and Family Name), JavaScript can be used to parse Full Name into separate Given Name and Family Name fields.
Values for fields required for event rule evaluation can be created. For example, if a business decision is based on the percentage of an account balance that a transaction represents and this information is not provided by the touchpoint system through an event, then a business object field can be defined to contain a JavaScript expression to calculate the percent of balance. This field can then be used in a filter to evaluate whether the percentage of balance threshold has been reached.
If you have an event mapping a field into a business object along with a JavaScript definition, the JavaScript definition is used if no field is mapped, but the event mapping takes precedence. For example, if Family Name is the last part of FullName, if Given Name is the first part of FullName, and if FullName is made up of Given Name plus Family Name, whichever fields are sent, the other fields are populated successfully.