WS metric/internal/line-crossings

Location movement

Within-location movement crossings at named lines (directional traffic between zones).

Returns crossings of a within-location-movement line — a directional gate counted whenever a person traverses between two zones inside the store. Use it for flow analysis: shoppers moving from one department to another, throughput at choke points, queue ingress.

Not the same as Line entries. A within-location-entry line is a one-sided threshold (“did they step into this zone?”) — see Line entries. A within-location-movement line is a two-sided gate (“did they cross between two zones?”), with direction.

Movement lines are configured per recording — see Line definitions to enumerate them. The taxonomy you pass identifies which configured movement line(s) to count — see Taxonomies for how these strings are defined.

Body parameters

FieldTypeRequiredDescription
startstring (ISO 8601)yesInclusive start timestamp with timezone
endstring (ISO 8601)yesInclusive end timestamp with timezone
entitiesstring[]yesArray of location, organisation, or recording IDs (matching entityType)
entityType"location" | "organisation"yesAggregation level
taxonomystring[]yesArray of zone path strings, e.g. ["Service:Checkout"]see how taxonomies work
facetsstring[]yesWhat to include: segments, summary, aggregates, thumbnails, thumbnails-with-statelems
aggregationPeriodstringyesTime granularity — see aggregation period options
breakdownByDimensionsstring[]noSplit data by: entity, taxonomy, age, gender, role
rolesstring[]conditionalRequired when breakdownByDimensions includes role. Values: customer, staff, customer-customer, customer-staff, staff-staff
gendersstring[]conditionalRequired when breakdownByDimensions includes gender. Values: male, female
agesstring[]conditionalRequired when breakdownByDimensions includes age. Values: 0_15, 16_24, 25_34, 35_44, 45_54, 55_64, 65_100
insideRecordingTimesbooleannotrue to restrict to opening hours only. Default false

Example request

{
  "action": "metric",
  "data": {
    "id": "req-lc-001",
    "route": "internal/line-crossings",
    "body": {
      "start": "2024-04-01T00:00:00.000Z",
      "end": "2024-04-07T23:59:59.000Z",
      "entities": ["64a1b2c3d4e5f6a7b8c9d0e3"],
      "entityType": "location",
      "taxonomy": ["Service:Checkout"],
      "facets": ["segments", "summary"],
      "aggregationPeriod": "day"
    }
  }
}

Example response

req-lc-001|0|0|{
  "segments": [
    { "index": "2024-04-01T00:00:00.000", "location": "64a1b2c3d4e5f6a7b8c9d0e3", "internal_line_crossings": 428 },
    { "index": "2024-04-02T00:00:00.000", "location": "64a1b2c3d4e5f6a7b8c9d0e3", "internal_line_crossings": 401 }
  ],
  "summary": [
    { "location": "64a1b2c3d4e5f6a7b8c9d0e3", "internal_line_crossings": 2812 }
  ],
  "meta": {
    "units": {
      "internal_line_crossings": "peopleCount"
    }
  }
}

Update frequency

Line events refresh throughout the day:

Date rangeRefresh cadence (UK time)
Today / recent daysEvery ~10 minutes
Yesterday and historical02:00 daily
Last full week03:00 Mondays
Last full month / quarter / year05:00 on the 1st