Names are the contract between your app and your rules, so keep them and add new ones. A rule’s
when names the event it listens to, and an amount can come from a property ({ "from": "total_cents", "per": 100 }).
The answer
receipts: what changed, and the balance after, for each unit. Activityskipped: the rules that did not apply, and why (a limit, a budget, a condition, a supply). Not an error.held: changes a rule parked for a person to give or refuse. Nothing has changed yet.activityisnullwhen nothing changed.
idempotency_key returns the first answer and changes nothing; the same key with a different request is idempotency_conflict. Idempotency
The event catalog
An event nobody listens for is still recorded: it counts as heard, and shows up inGET /v1/events/catalog with how often it came in. That list holds every name sent in the last 30 days or listened for by a rule, in name order (search keeps the names that contain a part of one). It is how you (and an agent) find the names that are in use, and the ones no rule listens to yet. Lurk also defines names for chat events (chat.checkin and others, with kind: "lurk"); chat is not available yet, so Lurk itself sends none of them. Your own server may still send names that start with chat.; see a rule says whose word it takes. Your own names have kind: "own". Each event lists its property names and what each holds (property_types: string, number, boolean, list, never a value). known_values is a hint, never a rule: a rule may still use any value. The values of your own events are never listed unless you ask: see Remember values below. The dashboard’s rule editor picks from this list: Build a rule.
Remember values
When you write a rule on one of your own events, a typo in a value (Pro for pro) is a rule that never fires. So you can ask Lurk to remember the values of a property. It is off for every property, and you switch it on one property at a time, in the dashboard (Events, open an event, Remember values) (an owner or admin signed in; a key or an agent cannot).
- What is kept. Up to 20 different values of that property that your events carried in the last 30 days: text, numbers and true or false, at most 64 characters each. Nothing is kept for a property you did not switch on.
- What is refused. Lurk will not switch it on, and turns it off by itself later (deleting what it kept), if a value looks personal (an email address, a phone number, a link, a long code or free text), is longer than 64 characters, or there are more than 20 different values. Up to 100 properties are remembered once you turn them on; a project at 100 cannot turn on another. Pick properties like a plan, a tier or a venue, not an email, a coupon code or a name.
- Where it shows. The rule editor offers the values in a list (you can still type another; see Build a rule),
GET /v1/events/catalogsends them asknown_valuesfor that property, and Lurky and your agents read them there.GET /v1/known-valueslists every property switched on (a key or an agent may read it), with its values, or with why it turned itself off. - Deleting. Switching it off deletes the values. A value not seen for 30 days drops out by itself, and everything goes with the project. New values show up within about ten minutes.
Good habits
- Send one event per real thing that happened, and let rules decide the value. “Order paid” is better than “give 42 Beans”.
- Send it once it is true, from the place that knows (your payment confirmation), not from a screen.
- Never send a secret as a property. Properties are stored with the event.
- Do not wait on a user’s click for it. Send events in the background and use the receipts when you can.