# How Scanning Works on Klaviyo

> When Dedupify scans your Klaviyo records, how it learns about changes between scans, and how to run a fresh scan.

Dedupify finds duplicates by scanning. A scan reads every profile and evaluates each one against your match rule. Turning a rule on starts one. After that, Dedupify checks Klaviyo for changed profiles every 5 minutes.

## The first scan

Turning on a match rule starts a scan of every profile in your account. Dedupify evaluates each profile against the rule and adds the pairs it finds to your review queue.

Only one scan runs at a time for your account. If you turn on several rules in a row, the scans queue and run one after another.

A scan moves through these states:

* **Starting.** The scan is waiting to be picked up.
* **Scanning.** Dedupify is working through your records.
* **Complete.** The scan has finished, and the pairs it found are in your review queue.
* **Failed.** The scan stopped on an error, and it shows the reason.
* **Cancelled.** The scan was stopped before it finished, for example because you turned its rule off.

Progress and history are under **Scan status**. It lists each rule's latest scan, with the number of records indexed while it runs and the number of pairs found when it finishes. Select **Retry scan** on a failed scan, and **Start a new scan** on a cancelled scan of a rule that is on.

Here is a scan from turning a rule on to Complete:

**Turn on a rule and watch the scan**

1. **Turn the rule on** Go to the Dedupify page, and on Match rules select Turn on for the rule. It stays review only. It queues a scan of your profiles, which can take a moment to show up on Scan status.
2. **Open Scan status** Scan status lists each rule's scans, newest first.
3. **Watch the scan** It reads Starting for up to 2 minutes while the scan waits for a worker, then Scanning with a running count. Scanning takes a few minutes to tens of minutes, depending on how many records you have, and runs in the background. When it reads Complete, its pairs are in the review queue.

## How Dedupify sees changes

After the first scan, Dedupify needs to learn about records that are created, edited, deleted, or merged.

Klaviyo has no change notification for profiles, so Dedupify asks it instead. Every 5 minutes Dedupify lists the profiles created or edited since its last check and evaluates each against your rules, so a change takes up to about that long to appear. You do not need to run a scan each time a profile changes.

Klaviyo does not report a deleted profile. Once a day, Dedupify reads the profiles in your pending pairs to confirm they still exist. A pair with a profile that was deleted or merged away in Klaviyo leaves the queue.

## Getting a fresh full scan

Turning a rule on queues a full scan, so the way to a fresh pass is to turn the rule off and on again.

You rarely need this, because the check every 5 minutes brings changes in on its own. Use it after a large import you want evaluated at once, or when you think Dedupify missed duplicates.

The scan reads every profile from Klaviyo again.

Turning a rule off stops its scans and dismisses its pending pairs from the review queue. The new scan finds them again, and a pair you rejected stays rejected.

Open **Match rules**, select **Turn off** on the rule, then **Turn on**. Saving new thresholds on a rule that is on does not start a scan. Saving a change to its fields does, and the rule stays on: see [Change a rule that is on](../rules/#change-a-rule-that-is-on).

## What does not start a scan

There is no nightly or scheduled full scan. A full scan starts when a rule is turned on, including turning it back on after turning it off, when you retry a failed scan, and when you save a change to the fields of a rule that is on. **Start a new scan** also runs one again after a cancelled scan of a rule that is on. Between full scans, Dedupify evaluates only the profiles that changed.

## Related

* [Match rules](../rules/): the rules that drive each scan.
* [Review thresholds](../auto-merge/): which pairs reach your review queue.

Source page: https://artifactapps.com/docs/dedupify/klaviyo/scanning/
