Guide 13, intermediate
Record sequences with rules
Write rules in plain terms, such as a person crosses the entrance and then enters the centre within 10 seconds, and find the events they record.
- Time
- 20 minutes
- You need
- The route scene from guide 11
- Pages of the app
- Experiments, Data
- Topics
- Routes and rules
What you will be able to do
- Write a sequence rule with a time window
- Write a single-trigger rule with its own label
- Read rule and sequence events
- Choose between routes and sequence rules
Lines, zones and routes count on their own. Rules add observations in plain terms that combine several steps, for example:
WHEN Person CROSSES Entrance THEN ENTERS Centre floor WITHIN 10 s RECORD AS Entered centre after the entrance
This guide adds two rules to the corridor scene from
guide 11. That scene has the Entrance gate and the
Centre floor zone.
Step 1. Create the experiment
- Open Experiments and click New experiment.
- Set Name to
Corridor sequences, pick theCorridorcamera, keep Person and click Create experiment. - On the experiment page, Scene version stays on Latest, which is the route scene you saved in guide 11.
Step 2. A sequence rule
- In the Rules panel, click Add rule.
- In the mode list next to the rule name, choose Sequence (then…). A THEN step appears.
- Set the rule like this:
- Rule name:
Into the centre. - WHEN: Person.
- CROSSES:
Entrance, any direction. - THEN: pick
Centre floor. The step changes from crosses to enters by itself. Set within to10seconds. - RECORD AS:
Entered centre after the entrance.
- Rule name:
- Leave OVERALL TIMEOUT empty. It limits the whole sequence, which only matters when a rule has several steps.
Step 3. A single-trigger rule
- Click Add rule again. Keep Single trigger.
- Set the rule like this:
- Rule name:
Entrance count. - WHEN: Person.
- CROSSES:
Entrance, any direction. - COUNT AS:
Entrance passage.
- Rule name:
- Click Save at the top of the page.
Step 4. Run and find the events
- Click Start, and open Results when the run has finished.
- Events by type now includes Sequence and Rule.
- Open the Events tab. Set Event type to Sequence. The
Route / label column shows
Entered centre after the entrance, and Duration shows the time between the two steps. - Set Event type to Rule to see the
Entrance passageevents.
With the recommended detector the sample has 3 entrance passages, at about 00:03, 00:16 and 00:44. Two of those people entered the centre within 10 seconds, at about 00:16 and 00:44. The person at 00:03 was already in the centre when they crossed the entrance. The rule needs an entry after the crossing, so it did not match.
How rules behave
- Every step can fail. A sequence that does not reach its next step within its within time is dropped. Under Rule engine on the Diagnostics tab of the results, sequence expired counts those. sequence track lost counts sequences whose object left the view first, like the person at 00:03.
- Steps run in order. Add more steps with Add step. Each step’s time counts from the step before.
- One rule, one label. The label appears in counters during a run, in the Route / label column and in exports.
- Actions. Count adds to the counters, Record event stores the event, and Send webhook posts it to another system. See guide 20.
Routes or sequence rules
- Use routes when every person who starts should end up in exactly one category, including Unknown, Abandoned and Lost track. Routes give shares and decision times.
- Use sequence rules for any other chain of steps, for example a visit to a display after the entrance, or two zones in a row. A person can match several rules, or none.
Next
Guide 14 runs two versions of an experiment and compares them side by side.
This page is docs/guides/13-sequences.md from ajm2004/CV-Scope@eaf904a
, committed 30 September 2026. The repository is the source of truth; this site renders
it.