type.inbound
and length(attachments) == 0
// VertiStream's tracking-link format on the sender's own domain
and any(body.current_thread.links,
.href_url.domain.root_domain == sender.email.domain.root_domain
and regex.imatch(.href_url.path, '/[0-9]+-[0-9]+/[0-9]+')
and (
// ?uid=&prom_type=&prom_id=
all(["uid", "prom_type", "prom_id"],
. in keys(..href_url.query_params_decoded)
)
// ?c=<uuid>&s=<uuid>
or (
any(.href_url.query_params_decoded["c"],
regex.imatch(.,
'[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}'
)
)
and any(.href_url.query_params_decoded["s"],
regex.imatch(.,
'[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}'
)
)
)
)
)
Playground
Test against your own EMLs or sample data.