Skip to main content

Skip duplicates

Stepdedupecontrolside effects

Stops the run quietly when the same document was already handled, for example the same invoice number from the same supplier.

At a glance​

PropertyValue
Step namededupe
ResourceClusterStep (lumen.ai/v1alpha1)
Palette group, categorycontrol, logic
Credits0.5 credits each time it succeeds
Side effectsyes It changes something outside Lumen, so a retry asks first and a test shows what it would do instead of doing it.
Installation must providenothing

Inputs​

PropertyValue
Needsnothing
Producesfields
Works onitem one document at a time

Needs and Produces are data types (file, text, fields, email). The editor offers a step only where what it needs is already on the path. See Documents and data.

Outputs​

A later node references an output as {nodeId.field} in text, or nodeId.field in a condition.

OutputType
duplicateboolean
firstSeenAtdate

Settings​

Set under config: on the flow node. Text settings may contain {nodeId.field} placeholders.

SettingTypeDefaultDescription
keyrequiredstring-For example the invoice number and the supplierminLength 1; maxLength 500
daysinteger90Days is how long a key is remembered. Unset is 90.minimum 1; maximum 365

The full JSON Schema of these settings: dedupe.schema.json.

Example​

Skip an invoice you already handled

config
days: 90
key: '{supplier} {invoiceNumber}'

Use it in a flow​

A node that runs dedupe goes under spec.nodes of a Flow. Give it any id, and list the next node ids in next.

flow.yaml
apiVersion: lumen.ai/v1alpha1
kind: Flow
metadata:
name: dedupe-example
namespace: tenant-acme
spec:
displayName: "Skip duplicates"
triggers:
- id: start
ref: {name: manual-run}
next: [dedupe]
nodes:
- id: dedupe
stepRef: {name: dedupe}
config:
days: 90
key: '{supplier} {invoiceNumber}'