Setyenv · Docs
  • English
  • Spanish
  • Chinese
  • Japanese
  • Arabic
  • German
  • French
  • Hindi
  • Indonesian
  • Italian
  • Dutch
  • Portuguese
  • Russian
  • Turkish

Actions

Actions are buttons on records that trigger workflows. They let you add custom operations like "Close Deal", "Escalate Ticket", "Send Invoice" to any entity.

Action configuration

PropertyDescription
EntityWhich entity the action appears on
SluqUnique identifier within the entity
LabelDisplay text on the button (with locale support)
Event nameThe workflow trigger identifier (e.g., deal.close)
EQL filterShow the action only when the record matches this filter
Button styleprimary, secondary, or danger
Button iconDashicon class
Payload templateJSON with {{field_name}} placeholders resolved at invoke time
ConfirmationOptional confirmation dialog before executing
Role gateWhich roles can see and invoke this action
Sort orderOrder of action buttons on the record

Action visibility

An action appears on a record when ALL of:

  1. The user can read the entity
  2. The user passes the role gate (empty = anyone who can read the entity)
  3. The record matches the action's EQL filter (empty = always)

Action invocation

When invoked, the action:

  1. Resolves the payload template against the record's current values
  2. Fires three WordPress hooks: - pfm/action/<event_name> — namespaced action hook - pfm/event/<event_name> — generic event hook - pfm/action/any — catch-all for workflow subscriptions
  3. Any workflow listening for the event name triggers

Integration with WP-PFWorkflow

Actions are the primary way to connect PFM records with WP-PFWorkflow. When you create an action and have WP-PFWorkflow installed:

  1. Set the action's event name (e.g., deal.close)
  2. In WP-PFWorkflow, create a workflow with a "PFM record event" trigger listening for deal.close
  3. The workflow receives the record data + your custom payload as trigger data