LaneyGuide
Mobile app and notifications

Reservation notification Query examples

Review reservation notification events, AND, OR, search, relative time, and custom-field conditions.

ReferenceVerified Aug 9, 2026Owner Laney Product

A reservation notification Query selects the moment when one reservation enters its result. The event chooses which data change to inspect. The Query narrows which reservations send an alert. Test both matching and nonmatching synthetic reservations before production use.

Events and entry behavior

UI eventValueNotification condition
New reservationinsertThe new row matches the Query.
Reservation updateupdateThe row did not match before the update and matches after it.
Reservation deletiondeleteThe row matches immediately before deletion.

An update rule uses the result boundary. Saving a reservation that already matches does not send a duplicate. Removing a reservation from the result does not send an alert. A later update sends a new alert if the reservation enters the result again.

An empty Query matches every reservation for that event. Add at least one row for production alerts, then verify it with synthetic data.

Fields available in condition rows

FieldCommon useCommon operators
Reservation statusSeparate pending, confirmed, completed, cancelled, and no-show recordseq, neq, in
Reservation startSelect upcoming reservations or a time rangeeq, gt, gte, lt, lte, in
Reservation endSelect an end-time rangeeq, gt, gte, lt, lte, in
NotesMatch VIP, urgent, campaign, or other texteq, neq, like, ilike, in
Customer IDSelect one customer or a customer listeq, neq, in
Creation timeSelect a recent creation rangeeq, gt, gte, lt, lte, in
Reservation IDSelect one reservation or a reservation listeq, neq, in
Custom fieldSelect branch, tier, owner, or multiple valuesOperators for the field kind

Reservation custom fields appear in the same field list. Advanced JSON addresses one with custom.<key>.

Operators

OperatorBehavior
eqEquals the value.
neqDoes not equal the value.
gt, gteIs greater than, or greater than or equal to, the value.
lt, lteIs less than, or less than or equal to, the value.
likeMatches a pattern. % replaces many characters and _ replaces one.
ilikeMatches a pattern without case sensitivity.
inEquals one value from the entered list.
containsRequires an array custom field to contain every entered value.

Add different operators to the same field. For example, gte = now and lt = now+1d on the reservation start select the next 24 hours. One Query cannot repeat the same field and operator pair.

Useful rules made with condition rows

These examples use synthetic operating scenarios.

Operating caseEventQuery rows
Reservation created as confirmedNew reservationstatus eq confirmed
Pending reservation becomes confirmedReservation updatestatus eq confirmed
Reservation with a VIP noteNew reservation or updatenotes ilike %VIP%
Confirmed or completed reservationRequired eventstatus in confirmed, completed
Start within the next 24 hoursRequired eventstarts_at gte now, starts_at lt now+1d
Reservation tagged for app and SMSRequired eventcustom.channels contains app, sms
Cancelled reservation is deletedReservation deletionstatus eq cancelled

Laney combines all condition rows with AND. status eq confirmed with notes ilike %VIP% requires both conditions.

Relative time

Time fields accept now and an offset in minutes, hours, or days.

ValueMeaning
nowTime when Laney inspects the event
now-30m30 minutes before inspection
now+2hTwo hours after inspection
now-7dSeven days before inspection
now+1dOne day after inspection

Laney resolves relative time when the reservation event occurs. Time passing does not create a data change event. Use a heartbeat automation when elapsed time alone must find the reservation.

Use OR in advanced JSON

Advanced JSON supports where, or, and search. This example selects a pending or confirmed reservation when its notes contain urgent or its customer tier is vip.

{
  "where": {
    "status": { "in": ["pending", "confirmed"] }
  },
  "or": [
    {
      "notes": { "ilike": "%urgent%" },
      "custom.customer_tier": { "eq": "vip" }
    }
  ]
}

Inside one object in the or array, one condition must match. The where object and the or object must both match.

Combine several OR groups

Several objects in or combine with AND. The next example requires a pending reservation. It also requires urgent or vip and Gangnam branch or Kakao source.

{
  "where": {
    "status": { "eq": "pending" }
  },
  "or": [
    {
      "notes": { "ilike": "%urgent%" },
      "custom.customer_tier": { "eq": "vip" }
    },
    {
      "custom.branch": { "eq": "gangnam" },
      "custom.source": { "eq": "kakao" }
    }
  ]
}

Do not use in or contains inside or. Put list and array conditions in where. Keep only the alternative conditions in or.

Combine search and filters

search finds a term in searchable reservation values. Reservation search includes status, notes, and customer ID. This example requires consultation in a searchable value. It also requires a pending or confirmed reservation that starts within the next day.

{
  "search": "consultation",
  "where": {
    "status": { "in": ["pending", "confirmed"] },
    "starts_at": { "gte": "now", "lt": "now+1d" }
  }
}

search, where, and every or group all apply together.

Combine custom fields

This example requires the labels custom field to contain both vip and mobile. It also requires the tier custom field to equal gold.

{
  "where": {
    "custom.labels": { "contains": ["vip", "mobile"] },
    "custom.tier": { "eq": "gold" }
  }
}

Review custom-field keys and kinds under Custom fields for the current organization. Use contains for multiple selections. Use like or ilike for text. Use eq, neq, or in for a single selection or switch value.

Unsupported advanced properties

A reservation notification checks membership for one changed row. It does not support the list properties embed, order, limit, or offset. Use a regular automation and the automation Query reference for relationships, sorting, or multi-row reads.

Laney cannot convert advanced JSON with OR or search back into condition rows without losing data. Keep editing and saving that rule in advanced JSON mode.

On this page