Lyfe for Craft CMS

Self-hosted, for Craft Commerce 5

Lifecycle marketing that runs on your own server

Thank-you emails, review requests, replenishment reminders, win-backs and abandoned carts, written as rules in the control panel: when something happens, only if these conditions hold, then do these steps in order, each after its own delay. Your customer data stays in your Craft database, and nothing is billed per contact.

Lyfe

Email bodies are Twig

Subjects and bodies render against the run's payload: contact, order, user, workflow, stats, unsubscribeUrl, and cartRestoreUrl for abandoned carts. A step an admin wrote gets the real Commerce objects. A step anyone else wrote renders in Craft's Twig sandbox against plain data, where order.totalPriceAsCurrency stands in for the commerceCurrency filter.

twig
Hi {{ contact.firstName ?? 'there' }},

Your order {{ order.reference }} for {{ order.totalPrice|commerceCurrency(order.currency) }}
is on its way.

{% if stats.orderCount > 1 %}Thanks for coming back.{% endif %}

<a href="{{ unsubscribeUrl }}">Unsubscribe</a>

Features

A rules engine over Commerce events, with the guarantees you want before it is allowed to email your customers.

When, only if, then

A workflow is a trigger, a set of conditions and an ordered list of steps, each with its own delay before it runs. Ten triggers, twenty-eight conditions and fourteen actions ship with it.

  • Rules in a group must all match; any one group matching is enough
  • Conditions are checked again before every step, not only at the start

Nothing fires twice

Every run carries a deduplication key, and a unique database index on the workflow and that key is the guarantee. A retried webhook, a Commerce event that fires twice or an overlapping sweep collides there and is dropped.

  • After a queue outage, a step far past its time is recorded as abandoned instead of sent late

A simulator that uses the engine

Pick a real order or contact and see, rule by rule, which workflows would run and why the others would not. It calls the same methods a live run does, with a simulate flag, so what it shows is what the engine would do.

  • Also on the command line: php craft lyfe/workflows/simulate <orderId>
  • Dry run per workflow or site-wide records everything and sends nothing

Consent with a paper trail

Lyfe keeps its own contacts, keyed on lowercase email, because most Commerce customers never register. Each carries tags, a phone number and separate email and SMS subscription flags. An unsubscribed contact is never marketed to, and the message log records the refusal.

  • Build contacts from existing orders with php craft lyfe/contacts/backfill

Fourteen presets, all switched off

The common lifecycle flows, from a review request two weeks after completion to a daily scan for customers who have been quiet for 120 days. Each installs disabled, with its placeholder copy marked EDIT ME, so adding a preset never emails anybody.

Abandoned carts and win-backs

Pro tracks cart activity, marks a quiet cart abandoned and gives each email a link that puts the cart back in the customer's session. Scheduled contact scans walk your contacts on a timer, which is how a workflow notices somebody who has simply stopped buying.

  • Recovered carts and their value are summarised in the control panel
  • One-off, expiring discount codes when a nudge needs one

SMS without an SDK

Pro sends SMS through Twilio, which is one authenticated form POST, so Lyfe makes it directly rather than adding a dependency tree. A generic HTTP transport posts to any other gateway, and Sms::EVENT_REGISTER_TRANSPORTS takes your own.

Checkout comes first

Every listener that runs in a customer's request is wrapped on its own, and a failure is logged rather than raised. Steps run from cron or a throttled queue job, never inline, so an automation cannot slow down or stop somebody paying.

Frequently Asked Questions

The questions worth answering before you install it.

Lite runs the engine, Pro runs the infrastructure

Lite is $99: every order and account trigger, every condition, email, tags, webhooks and the simulator. Pro is $179 and adds abandoned carts, scheduled scans, SMS, discount codes, send windows and run limits.