AI Insights & CCTV
Core Platforminsights_checkinsAI Insights & CCTVRetrieves facility check-in / visit history from the Member Management System (MMS) partner integration.
Shows member swipes and visits recorded by door readers, kiosks, apps, or manual entry. Each check-in represents a verified visit event pushed from the MMS.
Data returned per check-in:
- checkInId, facilityId, externalMemberId, timestamp (ISO 8601)
- check_in_type: member, class, staff, guest, trial
- source: how it was captured (manual, tag, rfid, kiosk, app, door_reader, booking)
- class_id: optional, if tied to a class booking
Member enrichment:
Members are returned as a separate array (matched by externalMemberId) with:
- firstName, lastName, gender, dateOfBirth
- membershipStatus, membershipPlans, memberType
- profilePicture, mobilePhone
Filtering:
- Date range via startDate/endDate
- checkInType: filter by visit type (e.g., only "member" check-ins)
- source: filter by capture method (e.g., only "door_reader" swipes)
Use cases:
- Analyze daily visit volume and patterns
- Cross-reference check-in data with AI face detection data (insights_timeline_search)
- Identify members who check in but don't appear on cameras (or vice versa)
- Track class attendance via class-type check-ins
- Verify visit frequency for membership disputes
Parameters
| Name | Type | Description |
|---|---|---|
facilityId* | string | Facility ID to query |
startDate | string | Start date in YYYY-MM-DD format (default: 2 days ago) |
endDate | string | End date in YYYY-MM-DD format (default: today) |
timezone | string | IANA timezone (default: Pacific/Auckland) |
limit | number | Max check-ins to return (default 100, max 500) |
checkInType | "member" | "class" | "staff" | "guest" | "trial" | Filter by check-in type (member, class, staff, guest, trial) |
source | "manual" | "tag" | "rfid" | "kiosk" | "app" | "door_reader" | "booking" | Filter by capture source (manual, tag, rfid, kiosk, app, door_reader, booking) |
nextToken | string | Pagination token from a previous response |
insights_match_unidentifiedAI Insights & CCTVCorrelates unidentified people (from AI vision) with MMS check-in records by timestamp proximity to find likely identity matches.
How it works:
For each unidentified person with multiple visits, the tool looks for check-in swipes that occurred within a configurable lookback window (default 60 minutes) before each detection. If the same member consistently checks in before the same unidentified person is detected, the probability of a match increases.
Use cases:
- Find unidentified people who are actually known members without profile photos
- Identify duplicate unidentified profiles that belong to the same member
- Generate a report of likely matches for manual review before auto-linking
- Audit facility identification coverage
Configurable parameters:
- lookbackMinutes: How far before a detection to search for check-ins (default 60)
- minVisits: Minimum detection sessions required (default 3). More visits = more reliable matching.
- minProbability: Minimum match score to include (default 0.3)
Output includes:
- Ranked matches with probability scores and confidence tiers (high/medium/low)
- Matched timestamp samples showing detection vs check-in times
- Duplicate groups: multiple unidentified profiles matching the same member
- Processing metadata (volumes, timing)
Confidence levels:
- high (80%+, 0-1 other candidates): strong match, candidate for auto-linking
- medium (50-79%): worth manual review
- low (30-49%): needs more data, informational only
Important: This is a read-only analysis tool. It does not modify any records or link profiles.
Part of the AI Insights & People module.
Parameters
| Name | Type | Description |
|---|---|---|
facilityId* | string | Facility ID to analyze |
startDate | string | Start date YYYY-MM-DD (default: 30 days ago) |
endDate | string | End date YYYY-MM-DD (default: today) |
timezone | string | IANA timezone (default: Pacific/Auckland) |
lookbackMinutes | number | Minutes before detection to search for matching check-ins (default: 60) |
minVisits | number | Minimum detection sessions for an unidentified person to be considered (default: 3) |
minProbability | number | Minimum match probability to include in results, 0-1 (default: 0.5) |
insights_people_searchAI Insights & CCTVSearches people registered in a facility's AI Insights system by name, membership status, or other attributes.
Supporting fast full-text search with fuzzy matching. Returns person profiles with membership data and faceted counts.
Use cases:
- Find a person by name: query "John Smith"
- List all people with expired memberships: membershipStatus "expired"
- Browse all identified people sorted by name: sortBy "lastName", sortOrder "asc"
Data returned per person:
- Identity: personID, firstName, lastName, fullName, gender, dateOfBirth
- Membership: membershipStatus (active/expired/on_hold/none), memberType (member/guest/staff), externalMemberId
- Profile: profilePicture URL, isIdentified, faceValidationPassed, created, updated
- Attention flags: needsReview, reviewReason, attentionReasons (array)
- Tags: custom tags assigned to the person
Facets returned:
- membershipStatus: count by status (active, expired, on_hold, etc.)
- memberType: count by type (member, guest, staff, etc.)
Use this to find specific people, then drill into their activity with insights_person_get and insights_person_activity.
Part of the AI Insights & People module.
Parameters
| Name | Type | Description |
|---|---|---|
facilityId* | string | Facility ID to query |
query | string | Free-text search (e.g., person name). Uses fuzzy matching. |
membershipStatus | string | Filter by membership status (e.g., "active", "expired", "on_hold", "none") |
memberType | string | Filter by member type (e.g., "member", "guest", "staff") |
limit | number | Results per page (default 20, max 100) |
page | number | Page number (default 1) |
sortBy | "created" | "lastName" | "firstName" | "membershipUpdatedOn" | Sort field (default: created) |
sortOrder | "asc" | "desc" | Sort direction (default: desc) |
insights_person_activityAI Insights & CCTVRetrieves the face detection history for a specific person over a date range — their visit log.
Shows every time the person was detected by cameras, with timestamps, which camera saw them, and optionally images and demographics.
Detail levels (use the 'detail' parameter):
- "summary": Per detection: timestamp, camera ID, start/end unix only. Minimal payload for counting visits and calculating patterns.
- "standard" (default): Adds image URLs, similarity score, dominantGender (from multi-frame DeepFace analysis), genderBreakdown, age range. Good for reviewing visit quality.
- "full": Everything including raw emotion data per detection.
Data returned:
- detections: Array of face detection records (capped at 200 per request)
- person: The person's profile (enriched with membership data)
- devices: Camera devices the person was seen on (sensitive fields stripped)
- meta: Query parameters (timezone, date range, unix timestamps)
- nextToken: Pagination token for fetching the next page
Use cases:
- Track visit frequency for a specific member over time
- Analyze which areas/cameras a person visits most
- Check when an expired member was last actively using the facility
- Verify visit patterns for membership disputes
Use after insights_person_get or insights_timeline_search to drill into a specific person's history.
Part of the AI Insights & People module.
Parameters
| Name | Type | Description |
|---|---|---|
facilityId* | string | Facility ID the person belongs to |
personId* | string | Person ID to query activity for |
startDate | string | Start date in YYYY-MM-DD format (default: 7 days ago) |
endDate | string | End date in YYYY-MM-DD format (default: today) |
timezone | string | IANA timezone (default: Pacific/Auckland) |
limit | number | Max detections to return (default 50, max 200) |
nextToken | string | Pagination token from a previous response |
detail | "summary" | "standard" | "full" | Response detail level. "summary" = timestamps/cameras only, "standard" (default) = adds images/demographics, "full" = everything |
insights_person_getAI Insights & CCTVRetrieves the full profile of a specific person in the AI Insights system, enriched with membership data.
Returns identity information, membership details, and system metadata for a single person.
Data returned:
- Identity: personID, firstName, lastName, clubID
- Face: avatar/profile picture URL, collectionId, isIdentified, type (identified/unidentified)
- Membership: memberId, memberID (external), membershipStatus, membershipPlans (with start/end dates), memberType, mobilePhone
- Timestamps: created, updated (unix timestamps)
When to use:
- After finding a person via insights_people_search or insights_timeline_search
- To get the full profile before querying their activity history with insights_person_activity
- To check membership details, plans, and contact information
Parameters
| Name | Type | Description |
|---|---|---|
facilityId* | string | Facility ID the person belongs to |
personId* | string | Person ID to retrieve |
insights_report_snapshotsAI Insights & CCTVRetrieves facility-wide AI Insights report snapshots for a date range.
This is the best starting point for understanding facility activity. Returns aggregated KPIs and breakdowns for the specified period.
Detail levels (use the 'detail' parameter):
- "summary": KPIs only (~320 bytes) — totalDetections, uniquePeople, gender split, identified/unsure counts, avgDurationSecs
- "standard" (default): KPIs + per-camera counts and age demographics (~3KB)
- "full": Everything including per-camera emotion distributions, hourly detection patterns (24-value arrays), and daily breakdowns (~40-170KB depending on date range)
KPIs returned:
- totalDetections, totalTracks, uniquePeople, uniquePeopleMale, uniquePeopleFemale
- avgDurationSecs (average visit duration in seconds)
- identifiedCount, unsureCount, blacklistCount, unknownCount, checkInCount, expiredCount
Per-camera data (standard/full):
- Detection counts, unique people, age buckets by gender (18-24, 25-34, 35-44, 45-54, 55+)
Full detail additionally includes:
- Emotion distributions by gender per camera (ANGRY, DISGUST, FEAR, HAPPY, NEUTRAL, SAD, SURPRISE — totalConfidence / count = average confidence)
- Hourly detection/track/unique people patterns (24-element arrays, index = hour of day)
- Daily breakdowns with per-camera sub-detail
Use "summary" first to assess the facility, then "full" for deep analysis on specific areas.
Part of the AI Insights & People module.
Parameters
| Name | Type | Description |
|---|---|---|
facilityId* | string | Facility ID to query |
startDate* | string | Start date in YYYY-MM-DD format |
endDate* | string | End date in YYYY-MM-DD format |
detail | "summary" | "standard" | "full" | Response detail level. "summary" = KPIs only, "standard" (default) = KPIs + per-camera counts, "full" = everything including emotions and hourly patterns |
insights_timeline_searchAI Insights & CCTVSearches AI-powered face detection timeline blocks for a facility — the primary "who was in the facility" view.
Returns paginated, pre-aggregated visit blocks showing who was seen, when, for how long, and on which cameras. Backed by OpenSearch for fast queries.
Key capabilities:
- Filter by date range, membership status, match type (identified/unsure/blacklist)
- Search by person name using free-text query
- Filter by specific person ID
- Exclude or include specific camera zones (e.g., exclude "Reception" to avoid false positives)
- Paginated with facets for understanding data distribution without fetching all records
Detail levels (use the 'detail' parameter):
- "summary": personName, personId, matchType, membershipStatus, timestamps, duration, cameraCount (~200 bytes/result)
- "standard" (default): Adds cameras with names/groups, dominant emotion, age, dominantGender (~500 bytes/result)
- "full": Adds raw emotion confidence arrays per camera (~1.5-2.5KB/result). Emotion confidence: divide totalConfidence by count to get average.
Camera zone filtering:
- excludeCameraGroups: Exclude results where the person was ONLY seen on these camera groups. Useful for excluding Reception area (people with expired memberships often go to reception to cancel — not a genuine facility visit).
- includeCameraGroups: Only include results where the person was seen on at least one of these camera groups.
Facets returned:
- matchType, cameraIds, membershipStatus, isOngoing, checkInFound — with counts per value
Use this tool after insights_report_snapshots to investigate who specifically visited.
Part of the AI Insights & People module.
Parameters
| Name | Type | Description |
|---|---|---|
facilityId* | string | Facility ID to query |
timezone* | string | IANA timezone (e.g., Pacific/Auckland, Australia/Brisbane) |
startDate | string | Start date in YYYY-MM-DD format |
endDate | string | End date in YYYY-MM-DD format |
personId | string | Filter to a specific person ID |
query | string | Free-text name search (e.g., "John Smith") |
matchType | "identified" | "unsure" | "blacklist" | Filter by match type |
membershipStatus | string | Filter by membership status (e.g., "active", "expired", "on_hold") |
limit | number | Results per page (default 20, max 200) |
page | number | Page number (default 1) |
sortBy | "startUnix" | "endUnix" | "created" | Sort field (default: endUnix) |
sortOrder | "asc" | "desc" | Sort direction (default: desc) |
excludeCameraGroups | array | Exclude results where person was ONLY seen on these camera groups (e.g., ["Reception"]) |
includeCameraGroups | array | Only include results where person was seen on at least one of these camera groups (e.g., ["Gym Floor", "Corridor"]) |
detail | "summary" | "standard" | "full" | Response detail level. "summary" = core fields only, "standard" (default) = adds camera info, "full" = includes raw emotion arrays |