SynchronizeConfiguration

The synchronize configuration determines how to resolve to an existing object in the Limecraft Flow platform.

Field Type Description

matchingCriteria

List.<Object>

A list of ways to match

options

Object

Options to determine how the matchingCriteria are used

Example

{
    matchingCriteria: [
        {
            properties: ['name'],
        },
    ],
    options: {
        failOnMultipleMatches: true
    }
}

matchingCriteria

The matchingCriteria is a list of criteria. When providing multiple criteria one of them is sufficient to have a match (OR).

multiple matchingCriteria are combined using OR

An individual matching criterion is an object with a properties key. properties is a list of objects or strings, determining which property to match on, and how. All properties need to match (AND) for the criterium to be a match.

multiple properties of one entry in matchingCriteria are combined using AND
{
    "properties": [
        {
            "name": "customFields.my_custom_field",
            "type": "PARTIAL_IGNORE_CASE"
        }
    ]
}
  • The name refers to a property or subproperty of the object (with dot notation), e.g. name or customFields.my_custom_field.

  • The type determines how the match with that property should happen. Its possible values are:

type Description

EXACT

This is the default. The value of the property should correspond exactly.

IGNORE_CASE

The value of the property should correspond exactly, with the exception of differences in casing.

PARTIAL

The value of the property should contain the value defined in the MediaObjectRequest. Casing should match however.

PARTIAL_IGNORE_CASE

The value of the property should contain the value defined in the MediaObjectRequest, and differences in casing are allowed.

For EXACT matching, the property object can be shortened to just the property name. So the following

{
    "properties": [
        "customFields.my_custom_field"
    ]
}

is equivalent to

{
    "properties": [
        {
            "name": "customFields.my_custom_field",
            "type": "EXACT"
        }
    ]
}

options

The synchronizeConfiguration.options determine how the matchingCriteria are used.

Option Type Description

matchOnFirstHit

true|false

When iterating over the matching criteria, return the first matching object (if any). This prevents having to calculate the score for all objects. This prevents failure in case failOnMultipleMatches is true

failOnMultipleMatches

true|false

If multiple objects match, throw an error.

failOnMissingInput

true|false

When a property is given for matching, throw an error when the property is missing in the source object.

matchOnMissingInput

true|false

When a property is given for matching and the property is missing the source object, consider it a wildcard and match with all destination objects.

matchOnMissingTarget

true|false

When a property is given for matching and the property is missing in the destination object, consider it as a match.