On this page

Use two known Aurelia cases to distinguish resemblance from identity, then practice a partial decision with an explicitly added teaching record. These exercises change sample data. Use an isolated learning environment and reset Aurelia afterwards.

Before you begin

Install Aurelia in its initial state: 378 customer records and no completed steward decisions. You need STEWARD or ADMIN plus access to the sample entity. Installation, reset, and ignore/unignore require ADMIN.

For API steps, use the connection setup and curl with jq. Keep the sample’s automatic steward unattached during the exercise. Complete the read-only quality exercise first.

Compare the two candidate groups

Open Ana’s email group, by-email-anagarciaexamplecom. In the initial sample it contains CRM-0001 and CRM-DUP-0001, scores 84, and is classified REVIEW. Compare names, tax identifier, email, and phone. Read the evaluation rather than treating the score as a probability.

Now inspect by-name-postcode-javiertorresmelgar-37001. The two Javier records, CRM-NEAR-0001 and CRM-NEAR-0002, score 56. Their names and postcode agree, but their tax identifiers differ. The supplied scenario describes two different people. Similarity alone would be a poor reason to merge them.

Record that the Javier pair is different

Choose They are different for the Javier pair, or call:

curl --fail-with-body --silent --show-error \
  -H "Authorization: Bearer $GOLDEN_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"comment":"Different tax identifiers; the sample describes two people"}' \
  "$GOLDEN_URL/api/golden/sample-customer-entity/duplicates/clusters/by-name-postcode-javiertorresmelgar-37001/disconnect"

Read both records. They remain distinct, and their _metadata._unrelated values record the separation. The judgment does not require that they vanish from every candidate view. A later merge of that separated pair is refused unless someone explicitly overrides the separation with a comment.

Prepare a third record for the partial decision

The supplied Ana email group has two records. The following teaching extension adds an unrelated person using the same contact email. It is not part of the installed sample.

curl --fail-with-body --silent --show-error \
  -H "Authorization: Bearer $GOLDEN_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"insert":true,"record":{"fullName":"Another person",
       "email":"ana.garcia@example.com","taxId":"87654321X"},
       "comment":"Teaching extension: unrelated person sharing an email"}' \
  "$GOLDEN_URL/api/golden/sample-customer-entity/upsert" \
  > aurelia-extension.json

OTHER_ID=$(jq -er '.record._id' aurelia-extension.json)

Keep the returned identifier. A forced insertion generates an identity; do not assume an identifier supplied in the input will be retained. Wait until the email group’s evaluation includes OTHER_ID, CRM-0001, and CRM-DUP-0001. If indexing is pending, follow the record’s index status before proceeding.

Separate the third person

jq -n --arg id "$OTHER_ID" \
  '{recordIds:[$id],comment:"Different person sharing a contact email"}' |
curl --fail-with-body --silent --show-error \
  -H "Authorization: Bearer $GOLDEN_TOKEN" \
  -H "Content-Type: application/json" --data-binary @- \
  "$GOLDEN_URL/api/golden/sample-customer-entity/duplicates/clusters/by-email-anagarciaexamplecom/disconnect/records"

Read the three records. The third record is unrelated to both Ana records; this action has not separated the two Ana records from each other. The records still exist. Merging all three without an override is now refused.

Merge only the two Ana records

Preview the selected result first:

curl --fail-with-body --silent --show-error \
  -H "Authorization: Bearer $GOLDEN_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"recordIds":["CRM-0001","CRM-DUP-0001"]}' \
  "$GOLDEN_URL/api/golden/sample-customer-entity/duplicates/clusters/by-email-anagarciaexamplecom/merge/records/preview"

Inspect the proposed values, then apply the same selection:

curl --fail-with-body --silent --show-error \
  -H "Authorization: Bearer $GOLDEN_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"recordIds":["CRM-0001","CRM-DUP-0001"],"comment":"Merge the two Ana records"}' \
  "$GOLDEN_URL/api/golden/sample-customer-entity/duplicates/clusters/by-email-anagarciaexamplecom/merge/records" \
  > aurelia-merge.json
SURVIVOR_ID=$(jq -er '.record._id' aurelia-merge.json)

Verify that the survivor has the expected values and contributing origins. Read OTHER_ID separately: it still exists, and the survivor retains the separation from it. Selection limits which source records are merged.

Undo and inspect

Send the returned survivor identifier to merge undo:

jq -n --arg id "$SURVIVOR_ID" \
  '{recordId:$id,comment:"Undo tutorial merge"}' |
curl --fail-with-body --silent --show-error \
  -H "Authorization: Bearer $GOLDEN_TOKEN" \
  -H "Content-Type: application/json" --data-binary @- \
  "$GOLDEN_URL/api/golden/sample-customer-entity/merge/undo"

Verify that CRM-0001 and CRM-DUP-0001 are back. Undo depends on retained history; it is not a general rollback for every edit or deletion.

Ignore or remove the teaching record

An administrator can temporarily ignore and unignore a group. Both actions preserve its records; they change candidate visibility and processing state. Use the decision API guide for the routes.

Delete only the teaching extension identified by the insert response:

jq -n --arg id "$OTHER_ID" \
  '{recordIds:[$id],comment:"Remove teaching extension"}' |
curl --fail-with-body --silent --show-error --request DELETE \
  -H "Authorization: Bearer $GOLDEN_TOKEN" \
  -H "Content-Type: application/json" --data-binary @- \
  "$GOLDEN_URL/api/golden/sample-customer-entity/duplicates/clusters/by-email-anagarciaexamplecom/delete/records"

Read CRM-0001 and CRM-DUP-0001 and verify that both remain. A whole-group deletion would target a different set of records.

Reset and continue

The exercises also recorded separation and audit information. Deleting the teaching record alone does not restore a pristine sample. Have an administrator reinstall Aurelia, then verify the original 378 records and the initial Ana and Javier cases before repeating the tutorial.

Golden 3.0.0 · Published 2026-10-04