=== SwiftAction ===
Contributors: swiftcoder
Tags: marketing automation, email marketing, woocommerce, popup, abandoned cart
Requires at least: 6.9
Tested up to: 7.1
Requires PHP: 8.0
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Marketing automation for WordPress: a visual workflow builder, popups, banners and designed emails, with contacts and logs. Runs on your own site.

== Description ==

SwiftAction automates your site's marketing: workflows that react to sign-ups, orders and forms, popups and banners that collect leads, and emails with proper unsubscribes. Everything runs on your own site, with no external service and no per-contact fees.

Every feature is included. There are no limits on workflows, popups, banners, contacts or emails, and nothing to unlock.

**Full documentation:** [swiftcoder.in/docs/swiftaction](https://swiftcoder.in/docs/swiftaction)

= Workflow builder =

* Drag-and-drop canvas with triggers, actions, If/Else branches and delays.
* AND/OR condition groups on contact, order, cart, product, tag and custom fields.
* Delays of minutes, hours, days or weeks, or until a set date and time.
* Drafts, publishing, versions and re-entry rules, so running contacts are never broken by an edit.
* Live view: watch contacts move through the workflow in real time, with counts on every step.
* Replay any run step by step, and Simulate a workflow for a contact before it goes live.
* A run page for every run: each step, its result and the values behind each If/Else decision.
* 6 ready-made workflows: welcome email, new-lead alert, tag form sign-ups, abandoned cart recovery, thank-you coupon and review request.

= Triggers =

* WordPress: user registers, logs in, profile updated, role changes, post published, comment posted, or any WordPress action hook.
* Contacts: tag added or removed, contact unsubscribes, manual enrollment.
* Popups and banners: form submitted, button clicked, dismissed.
* Emails: email opened, link clicked.
* WooCommerce (when active): order placed, payment successful or failed, order status changed, completed, cancelled, on hold or refunded; product purchased, viewed or reviewed; added to or removed from cart, cart updated, **cart abandoned**; coupon applied; customer account created.
* Easy Digital Downloads (when active): purchase completed, download purchased, order refunded.
* Developers: custom events started from code with `swiftaction_fire_event()`.

= Actions =

* Send an email: a quick message, or an email from the email designer.
* Show a popup or banner to the contact on their next page view.
* Add or remove tags, update contact fields and email subscription status.
* Update user meta or change a user's role.
* WooCommerce: create a personal coupon, add an order note.
* Send a webhook, or run your own code through a WordPress action hook.

= Popups and banners =

* Block-based designer with live preview: text, images, buttons, forms, countdowns, coupons and social links.
* 11 popup and 10 banner templates, or start from scratch.
* Display rules: pages, devices, delay, scroll, exit intent and frequency.
* Modal, slide-in and full-screen popups; top and bottom bars, floating and inline banners.
* A/B tests for banners, with views, clicks and sign-ups per variant.
* Place them automatically, with the SwiftAction blocks, the `[swiftaction_popup]` / `[swiftaction_banner]` shortcodes or the widget.
* Forms that create and update contacts, with consent. Submissions list with CSV export.

= Emails =

* Email designer with templates, your brand kit and WooCommerce blocks (order items, coupons, products).
* Quick messages with merge tags, sent through your site's own `wp_mail()` (works with any SMTP plugin).
* Open and click reports for designed emails (each can be turned off; see Privacy).
* Unsubscribe links, one-click unsubscribe headers (RFC 8058) and a branded unsubscribe page.
* Marketing emails automatically skip unsubscribed contacts.

= Contacts =

* One contact for each user or guest, with tags, custom fields, email subscription status and a full history.
* Guests are recognised with a first-party cookie, which respects the WP Consent API.

= Privacy =

* Data stays in your database. No tracking of your visitors by third parties.
* Designed emails can count opens (a small image loaded from your own site) and clicks (links that pass through your own site). Turn either off under SwiftAction → Settings → Guest tracking, or per email.
* WordPress personal data export and erase, suggested privacy policy text, and data retention settings.

= Source code =

The admin editors are built with React (WordPress's own `@wordpress/*` packages) and React Flow (`@xyflow/react`, MIT) with Dagre (MIT) for the workflow canvas. The human-readable source is included in the plugin's `src/` folder; build it with `npm ci && npm run build` (see `package.json`). PHP dependencies are installed with Composer (Action Scheduler).

== Installation ==

1. In your WordPress admin, go to **Plugins → Add New Plugin**, search for **SwiftAction**, click **Install Now**, then **Activate**.
2. Open **SwiftAction** in the admin menu. The dashboard shows a short getting-started checklist.
3. Go to **SwiftAction → Workflows → Add New Workflow**, pick a template or start from scratch, and build it in the workflow builder. Popups, banners and emails work the same way.

Delays and background steps run on Action Scheduler (bundled; the same library WooCommerce uses). If your site has little traffic, set up a real cron job for WP-Cron so delays run on time. See [Installation & setup](https://swiftcoder.in/docs/swiftaction/installation).

== Frequently Asked Questions ==

= Does it need WooCommerce? =

No. SwiftAction works on any WordPress site. Its WooCommerce and Easy Digital Downloads triggers, actions and templates appear in the workflow builder when those plugins are active.

= Is anything paid or locked? =

No. Every feature described here is in this plugin, with no limits and no licence key.

= Does it send email through an external service? =

No. Emails are sent with WordPress's `wp_mail()`. For good delivery, use an SMTP plugin with your email provider.

= My delays don't run on time. =

Delays run on WP-Cron, which only runs when someone visits your site. Set up a real server cron job that calls `wp-cron.php` every minute. SwiftAction → Dashboard warns you when background jobs are late.

= Does it work with page caching? =

Yes. Popups and banners are decided in the browser, so cached pages still show the right popup to the right visitor.

= Is it GDPR-friendly? =

SwiftAction stores data only in your own database, supports WordPress's personal data export and erase tools, can wait for consent through the WP Consent API before setting its cookie, lets you turn off email open and click tracking, and has retention settings. You are responsible for your own privacy policy; SwiftAction suggests text for it.

= Is there a developer API? =

Yes: register your own triggers, conditions, actions and templates, start workflows from code, extend the builder and designers, and use the REST API. See the [developer docs](https://swiftcoder.in/docs/swiftaction/developers).

== External services ==

SwiftAction does not contact any external service on its own. It only sends requests to other servers in these cases, all set up by you:

* **YouTube thumbnails:** when you add a YouTube video block to an email in the email designer, SwiftAction downloads that video's thumbnail image from YouTube (`img.youtube.com`) once, to show it in the email with a play button. Only the video's ID is sent. YouTube [Terms of Service](https://www.youtube.com/t/terms), Google [Privacy Policy](https://policies.google.com/privacy).
* **Images you link:** a video block's own thumbnail URL, if you enter one, is downloaded from the address you give, for the same purpose.
* **Webhooks:** the "Send webhook" action sends the data you choose to the URL you enter, when a workflow reaches that step.
* **Email:** emails are handed to your site's `wp_mail()` function, which delivers them through your server or the SMTP/email plugin you use.

== Screenshots ==

1. The workflow builder.
2. Live view: contacts moving through a workflow.
3. The popup designer.
4. A popup on a site.
5. The email designer.
6. The run page: every step of a run and its result.
7. The dashboard: key numbers, runs chart and recent errors.
8. A contact's page: tags, fields, subscription status and history.

== Changelog ==

= 1.0.0 =
* First public release: workflow builder with Live view, Replay and Simulate; popup, banner and email designers; banner A/B tests; email open and click reports; contacts, tags and logs; WooCommerce and Easy Digital Downloads.

== Upgrade Notice ==

= 1.0.0 =
First public release.
