ConvertKit - v1.0.0
Forms Integration
Pairs with artisanpack-ui/forms. Flip on the integration and every submission of a form the feed matches is evaluated, mapped to a Kit payload, and dispatched to a queue.
Sub-pages:
Enable
CONVERTKIT_FORMS_INTEGRATION=true
CONVERTKIT_QUEUE_CONNECTION=redis
CONVERTKIT_QUEUE=convertkit
The listener is subscribed at boot via string binding — the FormSubmitted event class only needs to exist at runtime, not at package boot. That means you can install this package before installing artisanpack-ui/forms and nothing blows up.
How it works
- A user submits a form.
artisanpack-ui/formsstores the submission and dispatchesArtisanPackUI\Forms\Events\FormSubmitted. - The
HandleFormSubmittedForKitlistener fires. It bails immediately if the integration is disabled. - The listener loads every active
KitFeedfor the submitted form. - The submission values are extracted once (via
FieldMapper::extractValues()). - For each feed, in order:
- The conditional logic is evaluated against the values. If it fails,
KitFeedSkippedfires withreason: 'conditional_logic'. - The submission is mapped to a Kit payload. If mapping fails (missing email, etc.),
KitFeedSkippedfires withreason: 'field_map:...'. - A
ProcessKitFeedjob is dispatched with the mapped payload and the feed'skit_tag_ids.
- The conditional logic is evaluated against the values. If it fails,
- The worker executes the job. On success,
KitSubscribedfires. On terminal failure,KitSubscriptionFailedfires (see Events).
One malformed feed cannot poison the loop — every failure path is caught per-feed so the rest of the feeds for the same submission still fire.
Do I need a Kit form?
No. A KitFeed with kit_form_id = null uses the raw subscribers()->create() path and applies tags via follow-up subscribers()->tag() calls. A feed with kit_form_id set uses forms()->subscribe(), which is one API call for the subscribe + tag combo. Prefer setting a kit_form_id when you can — it's cheaper on Kit's rate limit.
Where to configure
- Enable / disable:
convertkit.forms_integration.enabled. - Point at your form model:
convertkit.forms_integration.form_model. - Point at the event class:
convertkit.forms_integration.form_submitted_event. - Route Kit jobs to a dedicated queue:
queue_connectionandqueue.
What events to react to
KitSubscribed— a feed successfully subscribed an email.KitSubscriptionFailed— a job failed terminally (auth, validation, or exhausted retries).KitFeedSkipped— a feed matched a submission but was skipped (conditional logic, missing email, etc.).
Continue to Feeds →