=== Sequensy ===
Contributors: summix
Tags: workflow, automation, integrations, triggers, actions
Requires at least: 6.4
Tested up to: 6.9
Requires PHP: 8.0
Stable tag: 2.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Build visual workflows that automate WordPress tasks — connect triggers to actions with zero code.

== Description ==

Sequensy lets you automate repetitive tasks on your WordPress site by building visual workflows. When something happens (a trigger), Sequensy runs a series of actions — creating posts, updating orders, syncing subscribers to your email platform, and more.

= Build Workflows Visually =

Design automation workflows on a visual canvas. Connect a trigger to one or more actions, configure each step with a simple form, and publish. No code, no cron jobs to manage, no third-party automation platform required — everything runs inside WordPress.

= WordPress Triggers =

Start workflows when key events happen on your site:

* **Post Published** — fires when any post type is published
* **User Registration** — fires when a new user account is created
* **User Profile Updated** — fires when a user's profile information changes
* **Comment Submitted** — fires when a new comment is posted

= WooCommerce Triggers =

Automate your store with triggers for order events:

* **New Order** — fires when a customer places an order
* **Order Completed** — fires when an order is marked complete

= WordPress Actions =

Perform tasks on your site automatically:

* **Create Post** — create a new post, page, or custom post type
* **Update Post** — update the title, content, or status of an existing post
* **Create User** — register a new WordPress user account

= WooCommerce Actions =

Manage your store without manual work:

* **Update Order Status** — change an order to processing, completed, on-hold, etc.
* **Add Order Note** — append a note to an order (customer-visible or internal)
* **Create Coupon** — generate a coupon code with a specified discount type and amount

= Third-Party Integrations =

Connect workflows to external services you already use:

* **Kit (ConvertKit)** — create subscribers, add tags, and remove tags to manage your email audience
* **Notion** — create database entries to log data from your WordPress site
* **Campaign Monitor** — add, update, and remove subscribers from your mailing lists

= Features =

* **Visual Workflow Builder** — point-and-click canvas with a clear trigger → action flow
* **Conditional Filters** — run actions only when specific conditions are met (e.g., post type is "product", user role is "subscriber")
* **Variable Substitution** — pass data between steps using `{{Trigger.field}}` and `{{action_id.field}}` syntax
* **Activity Log** — see a timeline of every workflow execution with status, duration, and error details
* **Async Execution** — workflows run in the background via Action Scheduler so your site stays fast
* **Modular Packages** — each integration is a self-contained package you can activate or deactivate independently

= External Services =

Sequensy can connect to third-party services to extend your workflow automation capabilities. **Data is only sent to these services when you explicitly connect your account AND create a workflow that uses the service.** You have complete control over what data is sent and when.

No data is sent to Sequensy or Summix servers. All workflow data is stored locally in your WordPress database.

**Kit (ConvertKit)**

Email marketing platform for creators. Sequensy uses the Kit API to create subscribers and manage tags on your Kit account.

What Data Is Sent: Email address, first name, and any custom fields you configure in your workflow actions.
When Data Is Sent: Only when a workflow executes a Kit action (create subscriber, add tag, remove tag).

[Terms of Service](https://kit.com/terms)
[Privacy Policy](https://kit.com/privacy)

**Campaign Monitor**

Email marketing platform for subscriber management. Sequensy uses the Campaign Monitor API to add, update, and remove subscribers on your lists.

What Data Is Sent: Email address, name, mobile number, custom fields, and consent to track preferences you configure in your workflow actions.
When Data Is Sent: Only when a workflow executes a Campaign Monitor action (add subscriber, update subscriber, remove subscriber).

[Terms of Service](https://www.campaignmonitor.com/policies/#terms)
[Privacy Policy](https://www.campaignmonitor.com/policies/#privacy-policy)

**Notion**

Collaborative workspace and documentation platform. Sequensy uses the Notion API to create entries in your Notion databases.

What Data Is Sent: User-configured properties and content as defined in your workflow actions (can include text, numbers, dates, etc.).
When Data Is Sent: Only when a workflow executes a Notion action (create database entry).

[Terms of Service](https://www.notion.so/terms)
[Privacy Policy](https://www.notion.com/trust/privacy-policy)

= Privacy =

Sequensy can connect to third-party services when you configure integrations. For complete details about what data is sent to each service and when, see the "External Services" section above.

No data is sent to Sequensy or Summix servers. All workflow data is stored locally in your WordPress database.

== Installation ==

1. Upload the plugin files to `/wp-content/plugins/sequensy/` or install directly through the WordPress plugin installer.
2. Activate the plugin through the **Plugins** screen in WordPress.
3. Go to **Sequensy** in the admin sidebar to open the workflow builder and start automating.

== Frequently Asked Questions ==

= What PHP version is required? =

PHP 8.0 or higher. Sequensy uses modern PHP features like named arguments and match expressions.

= Does this work with WooCommerce? =

Yes. Sequensy includes a WooCommerce package with triggers for new orders and completed orders, plus actions for updating order status, adding order notes, and creating coupons. WooCommerce 8.0 or higher is recommended.

= How do I connect third-party services? =

Go to **Sequensy > Integrations** in the admin sidebar. Click **Connect** on the service you want to use and enter your API credentials. Once connected, the service's actions become available in the workflow builder.

= Are workflows executed immediately? =

Workflows run asynchronously in the background using Action Scheduler. When a trigger fires, the workflow is queued and processed within seconds. This keeps your site responsive — visitors and admins won't experience slowdowns from long-running actions.

= Can I use data from one action in another? =

Yes. Sequensy supports variable substitution across workflow steps. Use `{{Trigger.field_name}}` to reference trigger data or `{{action_id.field_name}}` to reference the output of a previous action. For example, `{{Trigger.user_email}}` inserts the email of the user who triggered the workflow.

= What is the difference between Sequensy and Sequensy Pro? =

The free plugin includes the visual builder, 6 triggers, 10 actions, conditional filters, variable substitution, and an activity log. Sequensy Pro adds advanced features like nested AND/OR filter groups, workflow version history, unlimited activity logging, and access to the integrations marketplace with additional packages.

= Can I extend Sequensy with custom packages? =

Yes. Sequensy's package system is extensible. Developers can build custom packages that register their own triggers and actions. Each package is a self-contained directory with a manifest, action definitions, and optional trigger definitions. See the developer documentation for details.

= Where is my workflow data stored? =

All workflow configurations, execution history, and activity logs are stored in your WordPress database in dedicated `wp_sequensy_*` tables. No data is sent to external servers unless you explicitly configure a third-party integration and create a workflow that uses it.

= How does async execution work? =

When a trigger fires, Sequensy evaluates the workflow's filters. If the conditions pass, it schedules the workflow's actions via Action Scheduler — a battle-tested WordPress library used by WooCommerce. Actions are then processed in a background queue, typically within a few seconds.

== Screenshots ==

1. Dashboard with workflow stats and recent activity
2. Workflows list with search, filters, and status badges
3. Visual workflow builder
4. Configure triggers with conditional filters
5. Integrations page showing connected services
6. Activity log for monitoring workflow executions

== Development ==

= Source Code =

The uncompiled JavaScript/TypeScript source code is included in the `admin/src/` directory within this plugin.

The admin interface is built with React and TypeScript using Vite. To rebuild from source:

1. Navigate to the `admin/` directory
2. Run `npm install` to install dependencies
3. Run `npm run build` to compile assets

= Build Tools Used =

* Vite (build tool)
* React 18 (UI framework)
* TypeScript (type-safe JavaScript)
* Tailwind CSS (styling)

== Changelog ==

= 2.0.0 =

* Modular package system — integrations are now self-contained packages that can be activated and deactivated independently
* Redesigned visual workflow builder with improved canvas
* Graph-based workflow engine — actions use ID-keyed routing instead of ordered arrays, enabling flexible branching
* New integrations page for managing installed packages and connecting services
* WooCommerce package with order triggers and actions
* Kit (ConvertKit) package with subscriber and tag management
* Notion package with database entry creation
* Campaign Monitor package with subscriber management
* Improved activity log with execution status, duration, and error details
* Async execution powered by Action Scheduler for reliable background processing
* Conditional filters with comparison operators for targeted automation

= 1.0.0 =

* Initial release
* Visual workflow builder
* WordPress triggers and actions
* Activity logging
* Async execution with Action Scheduler
