Skip to main content
Idempotency keeps a workflow from running more than once for the same logical event. When you fire an event for a linked account, a retry or a double-send can deliver that event twice. With idempotency on, Refold reads a key from each incoming call and ignores any repeat that carries a key it has already seen inside the configured window. Use it on event-triggered workflows where the caller might send the same event more than once, so a duplicate delivery never creates a duplicate run.

How it works

You configure idempotency on the workflowโ€™s event trigger. Refold extracts a value from each incoming event and treats it as the callโ€™s unique identity. If another call arrives with the same value before the time period elapses, Refold drops it instead of starting a new run.
SettingWhat it does
Key fromWhere Refold reads the key from on the incoming event: the request Header or the Payload.
Idempotency keyThe path to the unique value, written as {event:<key>}. The value at {event:<key>} uniquely identifies each call in the selected source. For example, {event:id} uses the eventโ€™s id.
Time periodHow long a key is remembered. Duplicate calls within this window are ignored. Defaults to 5 minutes.

Configure idempotency

1

Open the trigger settings

In the workflow, open the event trigger and find the idempotency settings.
2

Choose where the key comes from

Set Key from to Header or Payload, depending on where your caller puts the unique value.
3

Point to the unique value

Set the Idempotency key to {event:<key>}, where <key> is the field that uniquely identifies each call, for example {event:id}.
4

Set the time period

Choose how long duplicates are ignored. The default is 5 minutes.
Pick a key that is stable across retries but unique per logical event, such as an upstream record ID or event ID. A value that changes on every send (like a timestamp) defeats deduplication.

See also