InboundLeadAging (inbound_lead_aging v1.0.0)

Copy Markdown View Source

Age buckets for untouched inbound leads (see https://www.onegtmlab.dev/glossary/inbound-lead).

Rows are maps with "lead", "created_at" (RFC 3339) and an optional "first_touch_at". Only leads with no first touch are aged, measured to now.

Summary

Functions

Returns %{counts: %{bucket => n}, oldest: [{lead, minutes}], touched: n}. now is a DateTime.

Bucket label for an age in minutes.

Bucket labels, freshest first.

Parse a simple CSV (header row, no quoted commas) into maps.

Render the result as plain text.

Functions

age(rows, now)

Returns %{counts: %{bucket => n}, oldest: [{lead, minutes}], touched: n}. now is a DateTime.

bucket(minutes)

Bucket label for an age in minutes.

buckets()

Bucket labels, freshest first.

parse_csv(text)

Parse a simple CSV (header row, no quoted commas) into maps.

render(map)

Render the result as plain text.