8. Find Sequences Where an Event Does Not Occur

Negation lets you find sequences (a series of actions) where a specified event must not occur after the required actions.

4 min readProduct documentationzinzu user guide

For example, find a payment failure that was not followed by a successful payment within the checked window.

Negation is an Is Negation setting on a User Defined Event.

Build the Query

  1. Drag the required events onto the canvas and connect them in order.
  2. Add the event that must not occur as the final event, connected directly to End.
  3. Right-click that final event and turn on Is Negation.
  4. Place Any immediately before the negated event to check across subsequent activity.
Example:
Start → Payment Failed → Any → Payment Succeeded (Is Negation ON) → End
Illustrative query: Any checks subsequent activity for the negated event.

How It Works

The behavior depends on whether Any appears immediately before the negated event.

With Any: Check across subsequent activity

Payment Failed → Any → Payment Succeeded (negated) → End

Query example: Find a payment failure without a later successful payment.

After Payment Failed matches, zinzu checks subsequent records for the same EventOwner:

  • If Payment Succeeded occurs within the observation window, the sequence is incomplete.
  • If the queried records for that EventOwner end without Payment Succeeded, the sequence completes.
  • If the sequence record limit is reached first without Payment Succeeded, it closes with COMPLETED_LIMIT_REACHED.

Other activity can occur during this check. If there are no records after Payment Failed, the sequence also completes.

Without Any: Check only the next record

Payment Failed → Payment Succeeded (negated) → End

Query example: Check only the next record for a successful payment.

After Payment Failed matches, zinzu checks only the next record:

  • If it matches Payment Succeeded, the sequence is incomplete.
  • If it does not match Payment Succeeded, the sequence completes immediately.

A successful payment occurring later does not change that completed sequence.

If there is no next record, the sequence remains incomplete unless the preceding required event has already reached the sequence record limit.

Use Any when your question is “Did this event remain absent across subsequent activity?”

Example

Query:
Start → Payment Failed → Any → Payment Succeeded (negated) → End
Query example: Find a payment failure without a later successful payment.

The table explains possible negation evaluation outcomes. The Results modal currently displays completed sequences only.

Activity after Payment FailedResult
Retry Started → Error Logged → queried records endCompleted
Retry Started → Payment SucceededIncomplete
No further queried records for that EventOwnerCompleted
Other activity continues until the record limit, without Payment SucceededCOMPLETED_LIMIT_REACHED
Illustrative Results modal: completed sequences only. Payment Succeeded! marks the negated event; the named events retain their defined order.

When to Use It

Find unsuccessful payment recovery
Payment Failed → Any → Payment Succeeded (negated) → End
Query example: Find a payment failure without a later successful payment.

Find payment failures without a subsequent successful payment in the checked window.

Find unresolved support tickets
Ticket Opened → Any → Ticket Resolved (negated) → End
Query example: Find tickets without a later resolution.

Find tickets without a resolution event in the checked window.

Find orders without shipment
Payment Confirmed → Any → Order Shipped (negated) → End
Query example: Find confirmed payments without a later shipment.

Find confirmed payments without a subsequent shipment event in the checked window.

Important Notes

  • Only one event per query can have Is Negation enabled.
  • The negated event must be the final event, connected directly to End.
  • It must immediately follow a named event or Any.
  • A record counts as the forbidden event only if it matches that event’s source and filter conditions.
  • The absence check starts after the preceding required actions match. Earlier occurrences do not invalidate it.
  • The default sequence limit is 50 records, including required actions and records captured by Any.
  • Completion confirms absence only within the checked window. The event may occur outside the query’s data range or after the sequence limit.

Next: Submit the query and view results.

Search documentation · Esc to close
Open original image ↗