EventLogger Rules

EventLogger Rules

EventLogger Rules evaluates every EventLogger event against the event rules configured in the CRM and runs the matching rules' actions: sending emails, posting to Slack, creating CRM tasks and editing suppliers. It also serves the REST API the CRM uses to manage rules, action templates and rule history, and it forwards CRM events to EventLogger.

The application is serverless: one AWS SAM stack per account with two Lambda functions, one for the API and one for background work, and no servers waiting for requests.

New here? Start with System architecture, then Event processing and rules for what happens to an event.

What it does

Capability Where it lives

Run event rules for every event on the em_events Kinesis stream

WorkerFunction (handlers/worker.py), see Event processing and rules

Rule, action template and history management for the CRM

ApiFunction (handlers/api.py) behind RulesApi, see REST API

Capture events from SDKs and tracking pixels (/capture-message, /track, /tracking)

ApiFunction, publishing to the em_events SNS topic

Flag rules that stopped firing (watchdog)

WorkerFunction (handlers/watchdog.py), every 15 minutes in production

Forward CRM events to EventLogger

WorkerFunction (handlers/crm_event.py), subscribed to em_events_create_event

Environments

Environment AWS account Stack Deployed from

Staging

605668041275

eventlogger-rules-dev

develop_new_rules

Production

625663093496

eventlogger-rules-prod

new-rules-P312

Both run in us-east-1. In production the API is published on api.payability.com under /eventlogger_v2, /track and /tracking.

Where to go next