Sometimes, you want to skip a record mapping when running a message. You can use a condition that is defined as an expression to indicate if the record mapping must be applied. The record mapping is only applied if the expression condition is met.

You define an expression with self-defined variables. Variables must be linked to fields from the source document or the target document.
Example:
Expression: Price>Amount
Condition value: IF(Price>Amount, true, false)
Variables:
  • Price is linked to SalesPrice field of the SalesLine source record.
  • Amount is linked to LineAmount field of the SalesLine source record.
The record mapping is only applied if the sales price is higher than the line amount.
For more information on expressions, refer to: Expression.


Standard procedure

1. Click Connectivity studio Integration Design.
2. On the Message tab, in the list, find and select the desired message.
3. Click Edit.
4. In the Mapping section, in the Target record pane, find and select the desired record.
5. In the Condition field, select 'Expression'.
6. Click the Mapping Condition tab.
7. In the Expression field, enter the expression, using variables.
8. You can invert the condition of the expression. By default, if the expression condition is met, the record mapping is applied. If you invert the expression condition, the record mapping is applied if the expression condition is not met.
  Select Yes in the Invert condition field.
9. Sub-task: Define variables.
  9.1 Add a variable line for each variable that is used in the expression.
  Click New.
  9.2 In the Variable field, type exactly the variable name as used in the expression.
  9.3 Define if the variable is linked to a field in the source document or target document.
  In the Record origin field, select an option.
  9.4 Define the document record to which the variable is linked.
  In the Record field, enter or select a value.
  9.5 Define the document record field to which the variable is linked.
  In the Record field field, enter or select a value.
 

Note: The field type, as defined for the document record field, is shown as well.

  9.6 You can indicate how the variable value must be handled in the expression, regardless of the document record field type.
  In the Variable type field, select an option.
  9.7 You can define the language in which the variable is expressed.
  In the Language field, type a value.

Notes

Applying expression conditions can influence the message performance. So, only apply an expression condition if required and keep it as simple as possible.


Some examples of a more complex condition expression. Note that both an 'AND' and 'OR' statement are used.
  • Example 1: Based on the values of 'role', 'email', and 'invoiceId', the record mapping is done or not.

  • Example 2: Based on the values of the 'email' and 'invoiceId', the record mapping is done or not.

Related to Notes

Set up record mapping

 

Provide feedback