Advanced mapping

Apply advanced logic to access custom fields within objects or lists
Add advanced mapping to a Remote Field

Advanced mapping is available for Remote Fields of type array [] or object {} to help you only sync a specific field or to apply unique businesss logic. When you select an applicable field from the Remote Fields dropdown in the Merge dashboard or in Merge Link, you will see the advanced mapping option appear below. Clicking Advanced mapping will allow you to view the full response.

The easiest way to create an advanced mapping is to click the value in the array or object you want to map, and Merge will auto-generate the expression.


JMESPath basics

Indexing in JMESPath is 0-based and allows you to select a specific element in a list. For example, the expression [1] applied to the array ["a", "b", "c", "d", "e", "f"] will result in "b".

To implement advanced mapping with more complex logic, refer to the JMESPath tutorial to write an expression. We recommend reaching out to our support representative if you need help.

Generate JMESPath expression with AI
You can provide ChatGPT with your array or object and ask it to get the field you want using JMESPath

In the following example, we want to get emailUri. To do this with ChatGPT simply ask "Get the email URI only if shortName is Personal E-mail using JMESPath and share only the snipped and the outputted value".

  • To get emailURi by index, use the expression: "[0].emailUri"
  • To get emailUri only if shortName is Personal E-mail, use the expression: [?nameCode.shortName == 'Personal E-mail'].emailUri | [0]