# Compare values Source: https://neondeerdata.com/docs/platform/automations/steps/compare-values/ Step · Compare Compares two sets of email addresses, domains or phone numbers: only in A, only in B, or in both. ## Inputs | Label | Key | Type | Required | Notes | | -------------- | ------------------------ | ------------------------------------------- | -------- | ----------------------------------------------------------------------------------------- | | Attribute type | `attribute_type` | Choice: Domain, Email address, Phone number | Yes | Variables cannot be wired into this input. The value inputs below change with the choice. | | Set A | `previous__values` | Values of the chosen type | No | | | Set B | `new__values` | Values of the chosen type | No | | ## Outputs | Label | Key | Type | Always set | Notes | | ----------- | ----------- | --------------------------------- | ---------- | ----- | | Only in B | `added` | Group: Count, Values, Values text | Yes | | | Only in A | `removed` | Group: Count, Values, Values text | Yes | | | Differences | `changed` | Group: Count, Values, Values text | Yes | | | In both | `unchanged` | Group: Count, Values, Values text | Yes | | ## How it behaves - Reads each value’s normalized form (falling back to the original, and the root domain for domains), then trims, lowercases and de-duplicates. - Outputs are the lowercased normalized forms, not the original strings. Values text joins the values with “, ”, or reads `none` when empty. ## Errors Fails when - Neither Set A nor Set B is wired for the chosen Attribute type. Wire at least one set. For errors that every step can return, see [Troubleshooting](https://neondeerdata.com/docs/platform/automations/troubleshooting/). ## Notes - Workspace members are not supported here; use Compare members. ## Example Detect which email addresses were added to a person's record. **Example inputs** | Input | Value | | -------------- | ------------------------------------- | | Attribute type | Email address | | Set A | priya@acme.com, p.shah@gmail.com | | Set B | Priya@Acme.com, priya.shah@globex.com | **Example outputs** | Output | Value | | ----------- | ------------------------------------------------------------- | | Only in B | Count 1; Values text: priya.shah@globex.com | | Only in A | Count 1; Values text: p.shah@gmail.com | | Differences | Count 2; Values text: p.shah@gmail.com, priya.shah@globex.com | | In both | Count 1; Values text: priya@acme.com | Values are compared lowercased, so Priya@Acme.com matches priya@acme.com.