Skip to content

Data preparation and quality

Reconcile contact preferences

Reconcile explicit preference additions and removals with remove-wins conflicts.

Available recipeIncludes configuration, sample data and tests

Make it your own

Review the setup and limits below, then open an editable copy in Turbyn.

Use this recipe

Your selection stays with you through signup.

What it does

Allowed-value validation, unrelated-value preservation, deterministic sorting.

What to customize

Configure allowed preference values and conflict policy.

Run the included tests with your configuration and mappings. Review success, missing-input and failure results before publishing.

Expected outcome

This included example runs in dry-run mode with synthetic data. Integration tests separately cover provider responses using test doubles. It is not a live customer result.

Sample input

sample-input.json

{
  "inputFields": {
    "field1": "[\"email\",\"sms\"]",
    "field2": "[\"sms\"]",
    "field3": "phone"
  }
}
Sample output

sample-output.json

{
  "outputFields": {
    "output1": "[\"email\",\"phone\"]",
    "output2": "reconciled",
    "output3": "Added 2; removed 1; conflicts follow remove-wins."
  }
}

Returned fields

output1
JSON resulting set
output2
reconciled or invalid
output3
change explanation

What changes when it runs

Reads JSON additions, removals, and comma-separated current values; returns resulting set without inferring consent or writing externally.

Ready to try it with your rules?

Map your inputs, test a sample and publish the version you’ve checked.

Use this recipe