7. Follow Different Paths Based on the Time Between Two Events
Duration Difference Branch compares the time between two selected events and uses that duration to choose which path a sequence (a series of actions) follows.
Use it when you expect different follow-up actions depending on how quickly or slowly an earlier part of a process happened.
Build the Query
- Drag the required events onto the canvas and connect them in order.
- Add Duration Difference Branch after both events you want to compare.
- Click the control and select the two events: the earlier event first, then the later event.
- Enter the threshold in milliseconds and click Confirm Selection.
- Connect all three outputs—GT, EQ, and LT—to their required paths.
- Continue each path with additional events or connect it to End.
The control uses one shared threshold for all three outputs.
Example: Support Assignment and Follow-Up
Start → Ticket Opened → Agent Assigned → Duration Difference Branch
Select Ticket Opened first and Agent Assigned second. Set the threshold to 900,000 ms (15 minutes).
| Output | Time between the selected events | Next required event |
|---|---|---|
| LT | Less than 15 minutes | Agent Responded → End |
| EQ | Exactly 15 minutes | Assignment Reminder Sent → End |
| GT | More than 15 minutes | Ticket Escalated → End |
These follow-up events must represent records in your data. zinzu does not generate reminders or escalations.
How It Works
zinzu calculates:
Duration Difference = Second selected event’s timestamp − First selected event’s timestamp
It uses this difference to select an output, then checks the current incoming record against the event connected to that output.
For the example above:
- Agent assigned after 10 minutes: LT is selected. The next record must match Agent Responded.
- Agent assigned after exactly 15 minutes: EQ is selected. The next record must match Assignment Reminder Sent.
- Agent assigned after 20 minutes: GT is selected. The next record must match Ticket Escalated.
The selected time difference determines the path—not the timestamp of the follow-up action.
For example, if assignment took 10 minutes, LT is selected even if Agent Responded occurred much later. To constrain that later delay, you would need a condition that measures it.
Selecting an output does not complete the sequence. The required events on that path must also match.
When to Use It
Analyze support assignment delays Find different follow-up actions after a fast or delayed assignment.
Analyze payment retry handling Look for different recovery actions depending on the time between Payment Failed and Retry Started.
Analyze order fulfillment Find different follow-up actions depending on the time between Payment Confirmed and Order Shipped.
Important Notes
- Both selected events must have matched earlier in the same sequence.
- They do not have to be adjacent. Use Any between named events when you want to capture intervening activity.
- Select the earlier event first and the later event second.
- All three outputs must be connected.
- The threshold is shared by all three outputs.
- This measures the gap between the selected events, which may be only part of the sequence.
- Duration uses timestamps in your data, not query execution time. 1 second = 1,000 milliseconds.
Next: Submit the query and view results.

