> ## Documentation Index
> Fetch the complete documentation index at: https://docs.alumio.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Logic: Xor

> Checks that exactly one condition matches.

export const FormField = ({property, label, required = false, diType, uiPatterns, children}) => {
  const patterns = Array.isArray(uiPatterns) ? uiPatterns : uiPatterns ? [uiPatterns] : [];
  return <div style={{
    margin: '1.5rem 0'
  }}>
      <div style={{
    display: 'flex',
    alignItems: 'baseline',
    flexWrap: 'wrap',
    gap: '0.5rem',
    marginBottom: '0.25rem'
  }}>
        <strong>{label}</strong>
        <span style={{
    fontSize: '0.7rem',
    fontWeight: 600,
    textTransform: 'uppercase',
    letterSpacing: '0.04em',
    color: required ? '#6241f5' : '#6b7280'
  }}>
          {required ? 'Required' : 'Optional'}
        </span>
      </div>

      <div>{children}</div>

      {diType || patterns.length > 0 ? <p style={{
    fontSize: '0.85rem',
    color: '#6b7280',
    marginBottom: 0
  }}>
          {diType ? <>
              See the <a href={`/references/${diType}`}>{diType}</a> reference.{' '}
            </> : null}
          {patterns.length > 0 ? <>
              Accepts a <a href={`/documentation/placeholders-and-patterns/patterns#${patterns[0]}`}>pattern</a>.
            </> : null}
        </p> : null}
    </div>;
};

Combines two conditions and matches only when *exactly one* of them is satisfied. If both match, or neither matches, the rule fails. Use this when two situations should never be true at the same time, for example flagging a price that is either unusually high *or* unusually low, but treating a normal price as neither.

This documentation describes: [Schema](/schemas/condition/logic-xor)

## Fields

<FormField property="left" label="Left condition" required diType="condition">
  The first of the two checks to compare. You pick and configure any condition here, such as a number comparison or an equality check.
</FormField>

<FormField property="right" label="Right condition" required diType="condition">
  The second of the two checks to compare. The rule matches only when this check and the left check disagree: one matches and the other does not. When both match, or both fail, the rule fails.
</FormField>

## Sample data

This rule compares two checks on an order's `price`: greater than 100 on the left, less than 10 on the right. A price matches when exactly one side is true. A mid-range price triggers neither side, so it does not match. (A price cannot be both above 100 and below 10, so the "both true" case never arises here; if it ever did, the rule would not match.)

| Field           | Value                     |
| --------------- | ------------------------- |
| Left condition  | Number greater than `100` |
| Right condition | Number less than `10`     |

| Price | Greater than 100? | Less than 10? | Matches? |
| ----- | ----------------- | ------------- | -------- |
| `250` | yes               | no            | yes      |
| `5`   | no                | yes           | yes      |
| `50`  | no                | no            | no       |

```json Configuration theme={null}
{
  "prototype": "logic-xor",
  "parameters": {
    "left": { "prototype": "number-greater-than", "parameters": { "value": 100 } },
    "right": { "prototype": "number-less-than", "parameters": { "value": 10 } }
  }
}
```
