A trigger starts a workflow for a contact. Pick it on the workflow’s first step. Most triggers have settings that narrow them down (only certain products, a minimum cart total, a specific popup). Data a trigger provides can be used in conditions and as merge tags such as {{trigger.order_id}}.
Who the contact is
User triggers run for that user. Order triggers use the customer’s account, or their billing email for guest checkouts. Visitor triggers (cart, product views, popups) need a known visitor: someone logged in, or a guest recognised by email or, with consent, by cookie. See Guests.
WordPress
Users, posts, comments, tags and SwiftAction's built-in actions.
User registers
A new user account is created.
core.user_registeredNo settings: it fires for every matching event.
{{trigger.user_id}}User logs in
A user signs in.
core.user_loginNo settings: it fires for every matching event.
{{trigger.user_id}}User profile updated
A user's profile is saved.
core.profile_updatedNo settings: it fires for every matching event.
{{trigger.user_id}}User role changes
A user is given a different role.
core.role_changed| Setting | Type | Details |
|---|---|---|
| Only when the new role is | Choice | Any role · Administrator · Editor · Author · Contributor · Subscriber · Customer · Shop manager |
{{trigger.user_id}}, New role {{trigger.role}}, Previous roles {{trigger.old_roles}}Tag added
A tag is added to a contact.
core.tag_added| Setting | Type | Details |
|---|---|---|
| Tags | Tags | Leave empty for any tag. |
{{trigger.tag_id}}, Tag name {{trigger.tag_name}}Popup button clicked
A visitor clicks a link button in a SwiftAction popup.
core.popup_clicked| Setting | Type | Details |
|---|---|---|
| Popup | Choice | Pick from your site (or “Any popup”). |
{{trigger.popup_id}}, Popup name {{trigger.popup_title}}Popup dismissed
A visitor closes a SwiftAction popup without clicking or submitting.
core.popup_dismissed| Setting | Type | Details |
|---|---|---|
| Popup | Choice | Pick from your site (or “Any popup”). |
{{trigger.popup_id}}, Popup name {{trigger.popup_title}}Form submitted (popup or banner)
A visitor submits the form in a SwiftAction popup or banner. The answers are available as {{form.…}} merge tags and conditions.
core.popup_submitted| Setting | Type | Details |
|---|---|---|
| Popup or banner | Choice | Pick from your site (or “Any popup or banner”). |
{{trigger.popup_id}}, Popup name {{trigger.popup_title}}, Submission ID {{trigger.submission_id}}, Page URL {{trigger.page_url}}Contact unsubscribes
A contact unsubscribes from marketing emails: from an email's link, their email app's unsubscribe button, an admin or a workflow.
core.email_unsubscribed| Setting | Type | Details |
|---|---|---|
| From email | Choice | Pick from your site (or “Any email”).Only when they unsubscribed from this email's link. |
{{trigger.email_id}}, Source (link, one_click, admin, workflow, api) {{trigger.source}}Email opened
A contact opens a designed email (first open only). Opens are an estimate: some email apps load images automatically, others block them.
core.email_opened| Setting | Type | Details |
|---|---|---|
| Choice | Pick from your site (or “Any email”). |
{{trigger.email_id}}, Email name {{trigger.email_title}}, Subject {{trigger.subject}}, Send ID {{trigger.send_id}}Email link clicked
A contact clicks a link in a designed email (once per link and email).
core.email_clicked| Setting | Type | Details |
|---|---|---|
| Choice | Pick from your site (or “Any email”). | |
| Only links containing | Text | e.g. "/pricing" or "utm_campaign=spring". Leave empty for any link. |
{{trigger.email_id}}, Email name {{trigger.email_title}}, Subject {{trigger.subject}}, Send ID {{trigger.send_id}}, Link {{trigger.url}}WooCommerce
Orders, payments, refunds, product views and reviews, cart activity, abandoned carts, coupons.
Order placed
A customer completes checkout (before payment is confirmed). Works with classic and block checkout.
woo.order_placed| Setting | Type | Details |
|---|---|---|
| Also for orders created in wp-admin | Toggle |
{{trigger.order_id}}, Order number {{trigger.order_number}}, Order status {{trigger.status}}, Order total (number) {{trigger.total}}, Payment method ID {{trigger.payment_method}}, Billing email {{trigger.billing_email}}, Number of items {{trigger.item_count}}Payment successful
An order is paid: a gateway confirms payment, or an order moves to Processing or Completed. Fires once per order.
woo.payment_complete| Setting | Type | Details |
|---|---|---|
| Cash on delivery: wait until the order is completed | Toggle | Cash on delivery orders go to Processing before any money is collected.Default: on |
{{trigger.order_id}}, Order number {{trigger.order_number}}, Order status {{trigger.status}}, Order total (number) {{trigger.total}}, Payment method ID {{trigger.payment_method}}, Billing email {{trigger.billing_email}}, Number of items {{trigger.item_count}}Order status changed
An order moves from one status to another.
woo.order_status_changed| Setting | Type | Details |
|---|---|---|
| From status | Choice | Any status · Pending payment · Processing · On hold · Completed · Cancelled · Refunded · Failed · Draft |
| To status | Choice | Any status · Pending payment · Processing · On hold · Completed · Cancelled · Refunded · Failed · Draft |
{{trigger.order_id}}, Order number {{trigger.order_number}}, Order status {{trigger.status}}, Order total (number) {{trigger.total}}, Payment method ID {{trigger.payment_method}}, Billing email {{trigger.billing_email}}, Number of items {{trigger.item_count}}, Previous status {{trigger.from_status}}, New status {{trigger.to_status}}Payment failed
An order's payment fails (status Failed).
woo.payment_failedNo settings: it fires for every matching event.
{{trigger.order_id}}, Order number {{trigger.order_number}}, Order status {{trigger.status}}, Order total (number) {{trigger.total}}, Payment method ID {{trigger.payment_method}}, Billing email {{trigger.billing_email}}, Number of items {{trigger.item_count}}, Previous status {{trigger.from_status}}Order completed
An order is marked Completed (fulfilled).
woo.order_completedNo settings: it fires for every matching event.
{{trigger.order_id}}, Order number {{trigger.order_number}}, Order status {{trigger.status}}, Order total (number) {{trigger.total}}, Payment method ID {{trigger.payment_method}}, Billing email {{trigger.billing_email}}, Number of items {{trigger.item_count}}, Previous status {{trigger.from_status}}Order cancelled
An order is cancelled by the customer, an admin, or because it went unpaid.
woo.order_cancelledNo settings: it fires for every matching event.
{{trigger.order_id}}, Order number {{trigger.order_number}}, Order status {{trigger.status}}, Order total (number) {{trigger.total}}, Payment method ID {{trigger.payment_method}}, Billing email {{trigger.billing_email}}, Number of items {{trigger.item_count}}, Previous status {{trigger.from_status}}Order on hold
An order is put On hold, e.g. awaiting a bank transfer.
woo.order_on_holdNo settings: it fires for every matching event.
{{trigger.order_id}}, Order number {{trigger.order_number}}, Order status {{trigger.status}}, Order total (number) {{trigger.total}}, Payment method ID {{trigger.payment_method}}, Billing email {{trigger.billing_email}}, Number of items {{trigger.item_count}}, Previous status {{trigger.from_status}}Order refunded
A full or partial refund is made.
woo.order_refunded| Setting | Type | Details |
|---|---|---|
| Refunds | Choice | Full and partial · Full refunds only · Partial refunds onlyDefault: Full and partial |
{{trigger.order_id}}, Order number {{trigger.order_number}}, Order status {{trigger.status}}, Order total (number) {{trigger.total}}, Payment method ID {{trigger.payment_method}}, Billing email {{trigger.billing_email}}, Number of items {{trigger.item_count}}, Refund amount {{trigger.refund_amount}}, Refund reason {{trigger.refund_reason}}Product purchased
Fires once for each product in an order when the order is paid.
woo.product_purchased| Setting | Type | Details |
|---|---|---|
| Only these products | Multiple choice | Pick from your site. |
| Or products in these categories | Multiple choice | Pick from your site.Leave both empty for any product. |
{{trigger.order_id}}, Order number {{trigger.order_number}}, Order status {{trigger.status}}, Order total (number) {{trigger.total}}, Payment method ID {{trigger.payment_method}}, Billing email {{trigger.billing_email}}, Number of items {{trigger.item_count}}, Product ID {{trigger.product_id}}, Product name {{trigger.product_name}}, Quantity {{trigger.quantity}}, Line total {{trigger.line_total}}Product viewed
A known shopper (logged in, or a guest who allowed tracking) opens a product page. Throttled per shopper and product (see Settings → WooCommerce).
woo.product_viewed| Setting | Type | Details |
|---|---|---|
| Only these products | Multiple choice | Pick from your site. |
| Or products in these categories | Multiple choice | Pick from your site.Leave both empty for any product. |
{{trigger.product_id}}, Product name {{trigger.product_name}}Product reviewed
Someone posts a product review.
woo.product_reviewed| Setting | Type | Details |
|---|---|---|
| Rating | Choice | 2 stars or more · 3 stars or more · 4 stars or more · 5 stars · Any rating · 2 stars or less · 1 star |
| Only approved reviews | Toggle | |
| Only these products | Multiple choice | Pick from your site. |
| Or products in these categories | Multiple choice | Pick from your site.Leave both empty for any product. |
{{trigger.product_id}}, Product name {{trigger.product_name}}, Rating {{trigger.rating}}, Review ID {{trigger.comment_id}}Added to cart
A product is added to the cart. Fires for logged-in shoppers and guests who allowed tracking.
woo.added_to_cart| Setting | Type | Details |
|---|---|---|
| Only these products | Multiple choice | Pick from your site. |
| Or products in these categories | Multiple choice | Pick from your site.Leave both empty for any product. |
{{trigger.product_id}}, Product name {{trigger.product_name}}, Quantity {{trigger.quantity}}, Cart total (number) {{trigger.cart_total}}, Items in cart {{trigger.cart_item_count}}Removed from cart
A product is removed from the cart. Fires for logged-in shoppers and guests who allowed tracking.
woo.removed_from_cart| Setting | Type | Details |
|---|---|---|
| Only these products | Multiple choice | Pick from your site. |
| Or products in these categories | Multiple choice | Pick from your site.Leave both empty for any product. |
{{trigger.product_id}}, Product name {{trigger.product_name}}, Quantity {{trigger.quantity}}, Cart total (number) {{trigger.cart_total}}, Items in cart {{trigger.cart_item_count}}Cart updated
Anything in the cart changes: items, quantities or coupons. Fires at most once per page load. Fires for logged-in shoppers and guests who allowed tracking.
woo.cart_updated| Setting | Type | Details |
|---|---|---|
| Also when the cart is emptied | Toggle |
{{trigger.cart_total}}, Items in cart {{trigger.cart_item_count}}Cart abandoned
A known shopper leaves items in the cart without ordering (after the time set in Settings → WooCommerce). Use {{cart.recovery_url}} to bring them back to their cart.
woo.cart_abandoned| Setting | Type | Details |
|---|---|---|
| Minimum cart total | Number | Default: 0 |
{{trigger.cart_total}}, Items in cart {{trigger.cart_item_count}}, Minutes since the last change {{trigger.minutes_idle}}Coupon applied
A coupon is added to the cart. Fires for logged-in shoppers and guests who allowed tracking.
woo.coupon_applied| Setting | Type | Details |
|---|---|---|
| Coupon code | Text | Leave empty for any coupon. |
{{trigger.coupon_code}}, Cart total (number) {{trigger.cart_total}}, Items in cart {{trigger.cart_item_count}}Easy Digital Downloads
Purchase completed, download purchased, order refunded.
Purchase completed
An order is paid and complete.
edd.purchase_completedNo settings: it fires for every matching event.
{{trigger.order_id}}, Order number {{trigger.order_number}}, Order total (number) {{trigger.total}}, Customer email {{trigger.email}}, Payment gateway {{trigger.gateway}}Download purchased
Fires once for each download in a completed order.
edd.download_purchased| Setting | Type | Details |
|---|---|---|
| Only these downloads | Multiple choice | Leave empty for any download. |
{{trigger.order_id}}, Order number {{trigger.order_number}}, Order total (number) {{trigger.total}}, Customer email {{trigger.email}}, Payment gateway {{trigger.gateway}}, Download ID {{trigger.download_id}}, Download name {{trigger.download_name}}Order refunded
An order is fully or partially refunded.
edd.order_refundedNo settings: it fires for every matching event.
{{trigger.order_id}}, Order number {{trigger.order_number}}, Order total (number) {{trigger.total}}, Customer email {{trigger.email}}, Payment gateway {{trigger.gateway}}, Refund amount {{trigger.refund_total}}Custom events
Start workflows from any plugin or theme: a custom event fired from code, or any WordPress action hook.
Custom event
Fired from code: swiftaction_fire_event( 'event_name', $data, $who ).
generic.event| Setting | Type | Details |
|---|---|---|
| Event name * | Text | Lowercase letters, numbers and "_". The keys of $data are available as {{trigger.key}} merge tags. |
{{trigger.event}}WordPress hook
Any action hook fired by WordPress, a plugin or your theme (for example a form plugin's "form submitted" hook).
generic.wp_hook| Setting | Type | Details |
|---|---|---|
| Hook name * | Text | |
| Who is the contact? | Choice | The current visitor (logged-in user or recognised guest) · A user ID passed to the hook · An email address passed to the hookDefault: The current visitor (logged-in user or recognised guest) |
| Argument number | Number | 1 is the first argument the hook passes. For arrays, the "user_id" / "email" key inside it is used.Default: 1Shown when Who is the contact? is A user ID passed to the hook or An email address passed to the hook. |
{{trigger.hook}}, Argument 1 {{trigger.arg1}}, Argument 2 {{trigger.arg2}}, Argument 3 {{trigger.arg3}}