Skip to main content
The same guest often exists several times in one entity: once from the direct booking, once from the OTA that sent the reservation, once from the email given at check-in. The hotel then sends the same campaign twice and reads a stay history split across three records. Cleaning that up is a partner job, because you are the one who sees the duplicates.

How it works

Four steps, three of them API calls:
  • Walk the base with Browse guests, page by page.
  • Group candidates on your side, on whatever your data makes reliable: the same address, the same domain plus the same surname, the same phone.
  • Score each group with Compute merge confidence, which returns a number on the same scale as the merge threshold.
  • Merge above your threshold with Merge guests, and keep the result.
The examples reuse the bearer token from the Quick start. Replace {entityId} with your entity.

Walk the base

The query model needs at least one criterion, so a negation on a value no guest carries walks the whole entity. Send limit in the body, then send back the afterKey the response returns until it stops coming.
Run Count guests with the same query first if you want to size the job before starting. The browse projection is an index, not the full profile: it carries what searching needs and flattens a single value to a string. Read a candidate with Get a guest when you need the sourced attributes behind it.

Score, then merge

Both calls run in the background. They answer 200 with an empty body and a location header pointing at a task, which you read until its status settles. A confidence task carries the score in result; a merge task carries an object whose rid ends with the identifier of the merged profile.

Undo a wrong merge

A merge is recoverable. Unmerge a guest takes the merged profile in the path and splits it back into the profiles it was made of:
The identifier must be a merged profile, the one whose type is merge. Pass a plain guest and the call answers 400 with the code system.invalidQuery. After the split, the merged identifier stops resolving and each source answers on its own identifier again.

Tips

  • Score before merging on anything but an exact address match. Two guests sharing a surname and a domain are often colleagues, not one person. The score is what separates them.
  • Keep the identifiers you already stored. After a merge, reading a source identifier returns the merged profile, so nothing on your side breaks. Pass redirect=false to read the original and expand=true to inspect the sources behind it.
  • Record the score you merged on. It is the only way to tell later whether a threshold of 75 was right for your data, and the input for raising or lowering it.

Compute merge confidence

The score, and the task that carries it.

Unmerge a guest

Split a merged profile back apart.