Skip to main content
Back to docs
Plugins

WordPress plugin

The Flowgration plugin for WordPress forwards form submissions, user events, WooCommerce orders and abandoned carts into your Flowgration CRM. It runs inside wp-admin, talks to api.flowgration.com over HTTPS, and is HMAC-signed end-to-end.

Quick start (5 min)

  • Install the plugin from wp-admin → Plugins → Add new → "Flowgration", or upload the zip from flowgration.com/integrations/wordpress.
  • Activate it. A new menu item Flowgration appears in the sidebar.
  • Open it and pick one path:
    • I have a Flowgration account → paste an API key from Settings → API keys (must start with sk_live_).
    • I don't have an account yet → enter your admin email; the plugin sends a magic link. Click it; Flowgration auto-creates the org, the user and a starter CRM, and logs you in.
  • The "Status" panel turns green and events arrive within ~30 seconds.

Two ways to connect

Flow A — existing account

WP plugin                 Flowgration
   │                          │
   │  POST /onboarding/initiate (mode=connect, api_key=sk_live_…)
   ├─────────────────────────►│
   │                          │ verify key → upsert PluginIntegration
   │ ◄────────────────────────┤ 200 { review_url, suggested_mappings }
   │
   │  redirect admin → /app/integrations?integration_id=42
  1. Generate an API key in Flowgration → Settings → API keys → New key.
  2. Paste it into the plugin.
  3. The plugin POSTs /api/plugin/onboarding/initiate with mode=connect.
  4. Flowgration creates a PluginIntegration row in pending_review and returns a URL. The plugin opens it in a new tab.

Flow B — auto (magic link)

WP plugin                 Flowgration                  Admin inbox
   │                          │                              │
   │ POST /onboarding/initiate (mode=auto, admin.email=…)    │
   ├─────────────────────────►│                              │
   │                          │ create PluginOnboarding row  │
   │                          ├──── magic-link email ───────►│
   │                          │                              │
   │                          │ ◄── admin clicks link ───────┤
   │                          │ materialize_crm (org+user+CRM)
   │                          │ 302 → /plugin-callback?token=…&api_key=…
  1. Plugin scans the WP install (form plugins, post types, WC products).
  2. POSTs the discovered schema + admin email to /onboarding/initiate.
  3. Admin receives a one-time magic link (TTL 24h).
  4. On click, Flowgration creates the org, the user, the CRM blueprint, mints an API key, and redirects to /plugin-callback with the JWT.
  5. The plugin polls /onboarding/blueprint?token=… and shows the loading screen while the CRM is being built.

Compatibility

  • WordPress WordPress 5.8+ (tested up to 6.6).
  • PHP PHP 7.4+ (8.x recommended).
  • WooCommerce WooCommerce 7.x+ — optional. The plugin auto-detects WC and surfaces WC-specific toggles only if active.
  • WP Multisite — WP Multisite — not supported in v1 (see troubleshooting #9).
  • Supported form plugins:
    • Gravity Forms
    • WPForms (Lite and Pro)
    • Contact Form 7
    • Ninja Forms
    • Elementor Pro Forms
    • Formidable Forms
    • Fluent Forms

What gets synced

EventSourceWhen it firesWhat Flowgration does
user.createduser_register hookNew WP user registersCreates a Contact, mapped via field-mapping rules
user.updatedprofile_update hookWP user profile changesUpdates the existing Contact
form.submittedForm plugin (see list above)Any supported form submitsCreates/updates Contact, logs Activity, fires triggers
order.createdwoocommerce_new_orderOrder placed (any status)Creates Order + line items, links to Contact
order.status_changedwoocommerce_order_status_changedWC order transitions statusUpdates Order status, fires order.paid etc.
product.createdwoocommerce_new_productNew WC product publishedMirrors product to Flowgration catalog
cart.abandonedWC + plugin cart-trackerCart inactive >30 min, customer email knownFires cart.abandoned trigger for journeys
booking.createdWC Bookings / Amelia / BooklyNew appointment bookedCreates Booking row, links to Contact
subscription.activatedWC SubscriptionsRecurring subscription startsCreates Subscription, links to Contact + Plan

Every event carries an idempotency key, so retries are safe and duplicates are silently dropped.

Custom field mapping

On first connect, Flowgration scans the discovered schema (post types, form fields, WC meta keys) and suggests mappings to existing Contact fields. You review and adjust them in /app/integrations → Edit mappings.

  • Built-in Contact columns (email, first/last name, phone, company, city, country, …) are filled when the plugin can match a source field with high confidence.
  • Everything else lands in contact.custom_fields[<key>] — Flowgration creates the custom field on the fly if it doesn't exist.
  • You can override every suggestion or skip a source field entirely.
Mapping screen
Mapping screen — /docs/plugins/img/wp-mapping.png

The mapping is editable at any time. Re-saving it does not re-process historical events — use Backfill for that.

Backfilling historical data

The integration page has a Backfill button per data source (Users, Orders, Form submissions). It:

  • Fetches existing rows from WordPress in chunks of 500.
  • Pushes each chunk through the same /sync pipeline as live events, so the mapping rules apply identically.
  • Stores progress per chunk. If the job is interrupted (worker restart, network error, the merchant closing the tab) it resumes from the last completed chunk on the next click.
  • Skips rows whose idempotency key is already in PluginEventLog, so re-running the backfill is safe.

Typical throughput: ~1 000 rows/minute on a healthy WP host.

Schema refresh

The plugin caches the discovered schema (form fields, custom post types, WC meta keys) for performance. Trigger a refresh when:

  • You installed a new form plugin or added a new form.
  • You added new Custom Fields to WooCommerce products or users.
  • A form.submitted event arrives but a field is missing from the mapping dropdown.

To refresh: open the plugin's admin page → Settings → Refresh schema. The plugin re-scans the install and POSTs the updated schema to /onboarding/initiate in mode=connect. Existing mappings are preserved; only new fields appear as "needs mapping".

Troubleshooting

1. "Connection failed" on first connect
  • Check the API key starts with sk_live_ (it must not be a sk_test_ key — those reject /sync).
  • Check api.flowgration.com is reachable from the WP server: curl -I https://api.flowgration.com/health. Hosts behind a restrictive egress firewall must allow outbound HTTPS to *.flowgration.com.
  • Re-paste the key (whitespace is a common culprit).
2. Form submissions not appearing
  • Open the plugin's Settings → Form filter. The form may be excluded by ID. Empty the exclude list to capture everything.
  • Verify the form plugin is in the supported list above. Niche form plugins are not auto-captured — submit them via the Events API instead.
  • Check the form's mapping in /app/integrations. If no fields are mapped, the event is dropped server-side.
3. Orders not syncing
  • Confirm WooCommerce is active, not just installed.
  • Open Plugin → Events. The Orders toggle must be ON.
  • Run a manual test: place a test order with the WC test gateway. The event should appear in /app/integrations → <store> → Events within 30s.
4. Plugin admin page is blank
  • A JS error is bailing render. Check wp-content/debug.log (enable WP_DEBUG_LOG if needed) and the browser console.
  • Most common cause: another plugin's nonce middleware stripped our sub-admin nonce. Deactivate plugins one-by-one to isolate.
  • As a last resort, set define('FLOWGRATION_LEGACY_NONCE', true) in wp-config.php to fall back to the WP core nonce path.
5. "Could not authenticate with Flowgration" after weeks of working
  • The API key was revoked from /app/api-keys. Regenerate it and paste the new value into the plugin.
  • The org's plan was downgraded to a tier that disables plugins (Free → no plugin access).
6. Heartbeat showing "stalled" for >24h
  • WP cron is disabled on this install (DISABLE_WP_CRON=true in wp-config.php, or a host that uses a real cron).
  • Manually flush the queue: wp cron event run flowgration_cron_queue.
  • If you run a real cron, make sure it hits wp-cron.php at least every 5 minutes.
7. WooCommerce Subscriptions not syncing
  • Confirm the WooCommerce Subscriptions plugin is active — the built-in WC has no subscription objects.
  • Open Plugin → Events and switch the Subscriptions toggle ON. It defaults to OFF because most stores don't use it.
8. Encrypted key shown as "not connected" after wp-config salt rotation
  • The plugin encrypts the API key with a key derived from AUTH_KEY + SECURE_AUTH_KEY. Rotating WP salts invalidates the ciphertext.
  • Re-paste the API key in the plugin. The new ciphertext uses the new salts.
9. Multisite — "doesn't work across sites"
  • Multisite is not supported in v1. The plugin only activates on the network's main site; sub-sites silently no-op.
  • Workaround: install per sub-site by activating manually on each. Each sub-site needs its own API key.
10. Plugin slows down checkout
  • Events are enqueued, not POSTed inline — checkout requests return before the sync happens. If you see slowness, profile with Query Monitor: it's almost always another plugin.
  • The plugin's only checkout-time work is a single wp_insert_post into the flowgration_queue CPT (~5ms).

Privacy & data

What leaves your WP install

  • Only the events listed in What gets synced, plus the fields the merchant explicitly mapped.
  • No comments, no post content, no media files, no admin emails beyond the connecting admin's address.

Where it goes

Frankfurt, EU (AWS eu-central-1). Frankfurt, EU (AWS eu-central-1). No data ever leaves the EU in normal operation.

Retention

Events live in PluginEventLog for 90 days then are aggregated. Contact data persists until you delete the contact or uninstall the integration.

GDPR
A WordPress admin can request data export / erasure for any user from /app/contacts. Erasure is propagated back to WP via the next sync cycle (the user's wp_user_meta is cleared if data_write consent was granted).

Uninstall

From WP admin

  • Deactivate stops sending events but keeps the encrypted key in wp_options. Re-activate to resume.
  • Delete removes the plugin files, the flowgration_queue CPT rows, and the encrypted key. Already-synced data in Flowgration is untouched.

From Flowgration

  • /app/integrations → Open /app/integrations → Disconnect.
  • Marks the PluginIntegration row as disconnected.
  • Revokes the API key.
  • Synced contacts, orders, activities are kept. To wipe them, also delete the contacts.

Re-installation is idempotent: the next /onboarding/initiate in mode=connect upserts onto the same PluginIntegration row, preserving the mapping config.