Perfex Flow Studio documentation

Perfex Flow Studio adds visual workflow automation to Perfex CRM. A workflow starts on a trigger — a record created or changed, a date coming closer, a schedule or a button — and runs steps: send an e-mail, update a field, assign someone, create a task, ask a manager to approve, call another system. Every execution keeps its steps, results and timings.

Administrators build and publish workflows. Other staff see what their Perfex rights allow: all executions, the executions of their own records, or only the approvals assigned to them.

Installation

Requirements

Install

  1. Back up the CRM database and files.
  2. Extract the download perfex-flow-studio-1.0.0.zip on your computer. Inside are the installable perfex_flow_studio-1.0.0.zip, this documentation, the changelog and the licenses.
  3. In Perfex, open Setup › Modules, upload the inner perfex_flow_studio-1.0.0.zip, then install and activate Perfex Flow Studio.
  4. Open Flow Studio in the sidebar. With no workflow yet, the page offers the template gallery.
What activation does: creates the module's tables and settings and the staff permissions. It does not modify Perfex core files. Nothing runs until you publish a workflow.

Upgrade from the 0.2 preview

Workflows made with the 0.1 or 0.2 development preview carry over. The upgrade only adds tables, columns and indexes; it never removes or rewrites your data.

  1. Back up the database.
  2. Upload perfex_flow_studio-1.0.0.zip in Setup › Modules over the installed module — do not uninstall the old one first, uninstalling deletes its data.
  3. If Perfex shows a database upgrade notice for the module, run it. Flow Studio also completes its own upgrade on the first page load.
  4. Open Flow Studio: workflows, published versions, executions, approvals with their decision history and the audit trail are all there.

Files and tables

WhereWhat
modules/perfex_flow_studio/The module, with its interface font and the Lucide icons. Nothing is loaded from a CDN.
Tables pfs_*Workflows, versions, events, executions, steps, approvals and reviewers, audit trail, schedules, date watches, field snapshots and sealed secrets.
Options pfs_*Settings. Secrets of the web request step are sealed with your installation's key and never shown again.

First steps

  1. Check that Perfex's cron runs every minute. Flow Studio › Workflows shows when the worker last ran.
  2. Open Flow Studio › Templates, pick one (for example New lead follow-up) and click Use Template. Choose the colleague the template's steps should name.
  3. In the builder, adjust texts and people, press Test, choose a real record and read what each step would do.
  4. Press Publish, add a short note. The workflow is active from now on.
  5. In Setup › Staff › Roles, give reviewers the Approve right and give managers View or View (Own).
The workflows page with totals, the last seven days, the worker and workflow cards
Workflows: totals, the last 7 days, the worker and one card per workflow with its trigger, version and executions.

Concepts

TermMeaning
WorkflowA named map of one trigger and its steps. Active, paused, draft or archived.
TriggerWhat starts the workflow: a Perfex event, a date, a schedule, a button or an event of one of our modules.
StepOne action or decision. Steps are connected by ports: next, yes / no after a condition, approved / rejected / expired after an approval, and an optional error port on actions that can fail.
VersionAn unchangeable copy of the workflow made when you publish, with a number, a note and a checksum.
ExecutionOne run of a version for one event, with its steps, results, record and timings.
WorkerThe background part that runs steps on Perfex's cron, at most once a minute, for a limited time per run.

Drafts and versions

You always edit a draft; Save Draft keeps it and nothing changes for running workflows. Publish checks the draft completely and makes a new version. Executions that already started finish on the version they started with, and a new version never picks up events from before it was published. Pause stops new executions; queued steps wait, approval deadlines keep counting.

The version list shows every version with its note. Compare shows what changed between two versions; Restore copies an older version into the draft (the published version stays until you publish again). A workflow that has never run can be deleted; otherwise archive it — archived workflows keep their history and can be restored.

Fields in texts

Subjects, messages, titles and request texts can use fields. Click Insert a field and pick from the trigger's fields and the outputs of earlier steps; the builder writes the placeholder for you:

Fields are looked up, never run as code. A field that does not exist stays empty.

The field picker open in a task step, listing the ticket's fields and earlier steps' outputs
Insert a field: the trigger's fields and the outputs of earlier steps.

Conditions

If / else compares a field with a value or with another field and continues on yes or no. Operators: is, is not, contains, does not contain, starts with, ends with, is greater than, is less than, is at least, is at most, is one of, is none of (comma separated), has a value, is empty, is not empty, is before (date), is after (date) and is within the next N days. Text comparisons ignore upper and lower case; numbers are compared by value (1500 equals 1500.00).

Triggers

Pick a trigger in the builder: click the trigger step, then Change. Triggers are grouped by record type and searchable. Each trigger lists the fields it provides.

The trigger picker grouped by record type
Choose a trigger: grouped by record type, with a search box.

Record triggers

RecordTriggers
LeadsCreated, updated, status changed, field changed, deleted; converted to customer, marked as lost, marked as junk; not contacted for N days
CustomersCreated, updated, activated or deactivated, field changed, deleted
ContactsCreated, updated, activated or deactivated, field changed, deleted
TasksCreated, updated, status changed, field changed, deleted; completed, staff assigned, comment added; due soon, overdue
ProjectsCreated, updated, status changed, field changed, deleted; deadline coming up
TicketsOpened, status changed, field changed, deleted, reply added
InvoicesCreated, updated, status changed, field changed, deleted; sent to the customer, paid in full, cancelled; due soon, overdue
EstimatesCreated, updated, status changed, field changed, deleted; sent, accepted, declined, converted to an invoice; about to expire
ProposalsCreated, updated, status changed, field changed, deleted; sent, accepted, declined, comment added; about to expire
ContractsCreated, updated, field changed, deleted; signed by the customer; about to end
PaymentsRecorded, updated, deleted
ExpensesCreated, updated, field changed, deleted
Credit notesCreated, updated, status changed, deleted
SubscriptionsCustomer subscribed (Stripe checkout); renewal coming up (N days before the next billing date)

Triggers react to changes made anywhere in Perfex — by staff, by customers in the portal, by other modules — but not to changes made by a running workflow step, so a workflow cannot start itself in a loop. “Deleted” triggers start just before the record is removed, with its last values.

Field changed from / to

Choose <Record> field changed, the field to watch and, optionally, a From value and a To value (a value or its readable name; empty means any). The trigger provides the field, the old and the new value. Status triggers work the same with a list of the record's statuses (“Any status” for every change). Changes made through Perfex's forms, the kanban boards and other modules are seen; one event per changed field.

Date triggers

Date triggers fire a number of days before or after a date of the record: invoice due soon and overdue, estimate and proposal about to expire, contract about to end, task due soon and overdue, project deadline coming up, subscription renewal coming up, lead not contacted for N days. They are checked on every cron run in your time zone. Each record fires once per date; if the date moves, it fires again for the new date.

Manual, schedule and our modules

Actions and logic

StepWhat it does
Send an e-mailThrough Perfex's mail settings, with one of Perfex's e-mail templates and its merge fields or your own subject and text. To: the record's own address, the customer's primary contact, the person responsible, a staff member or an address. Outputs: recipient, sent.
Update a fieldSets one field of the record (an allow-list per record type, typed and audited). Outputs: field, old and new value.
Change the statusMoves the record to another status through Perfex's own models, with their activity log.
AssignMakes one person responsible, or the next one of a rotation (round robin): lead, ticket, proposal, invoice or estimate owner, task assignee, customer admin or project member. Optional notification.
Add a noteA note on the record; a comment on tasks.
Add tagsAdds tags; existing tags stay.
Create a taskThrough Perfex's tasks, related to the record, assigned (with Perfex's notification), due in N days; the workflow owner is the author. Outputs: task ID and link.
Create a ticket / a lead / a reminderA ticket for the record's customer with department and priority; a lead with source and status; a reminder on the record for a colleague, optionally also by e-mail.
Notify staffA Perfex bell that opens the record — or the execution, for people who may see it.
Send a web requestSee Web request step.
If / elseSee Conditions.
WaitWaits minutes, hours or days before the next step.
Set a valueKeeps a value for later steps as {{vars.name}}.
ApprovalSee Approvals.
FinishEnds the execution.

Every action that can fail has an optional error port (“When it fails”). Connected, the execution continues there and the step shows its error; not connected, the execution stops as failed. People chosen in steps are checked again when the step runs: an inactive colleague makes the step fail with a clear message instead of acting.

The builder

The palette on the left lists the steps by category; click one to add it after the selected step, or drag it onto the canvas and connect it by dragging from a port. The panel on the right shows the selected step's settings. The status bar above the canvas shows whether the draft is valid; Check validates it like Publish without publishing.

The builder with the palette, the canvas and the approval step's settings
The builder: palette, canvas with branches, and the selected step's settings.

Approvals

An Approval step pauses the execution and asks people to decide. It continues on approved, rejected or expired (deadline passed).

Reviewers get a Perfex notification. Flow Studio › Approvals lists open requests (with a count in the menu) and closed ones. Approve and Reject open a dialog for an optional note.

Open approvals with reviewers, deadlines and the voting rule
Approvals: open requests with their reviewers, voting rule and deadline.
The decision dialog with an optional note
Approve with an optional note.

Web request step

Send a web request sends the event, your own body or nothing to another system and hands the answer to the next steps (status, ok, body, json fields and attempts).

SettingOptions
MethodPOST, GET, PUT, PATCH, DELETE
Address (URL)An https:// address; fields may be used in it.
What to sendThe event (all trigger fields as JSON), your own body, or nothing. Format JSON, form or text; at most 64 KB.
HeadersName / value rows; fields may be used in values.
AuthenticationNone, a bearer token, or a key in a header you name.
Sign the requestHMAC-SHA256 signature with a signing secret (see below).
A web request step with its settings and an error branch
A web request with signing; its error branch notifies finance.

Security

For an installation on a private network only, an administrator can add define('PFS_HTTP_ALLOW_PRIVATE', true); to application/config/app-config.php; private addresses (and plain http) are then allowed. Cloud metadata addresses stay closed.

Checking the signature

Every request carries User-Agent: PerfexFlowStudio/1.0.0 and X-Flow-Studio-Execution (the execution number). With signing on, it also carries:

X-Flow-Studio-Timestamp: 1760640000
X-Flow-Studio-Signature: sha256=<hex HMAC-SHA256 of "<timestamp>.<raw body>" with your signing secret>

On the receiving side, recompute and compare in constant time, and refuse old timestamps:

$body = file_get_contents('php://input');
$ts   = $_SERVER['HTTP_X_FLOW_STUDIO_TIMESTAMP'] ?? '';
$sig  = $_SERVER['HTTP_X_FLOW_STUDIO_SIGNATURE'] ?? '';
$ok   = abs(time() - (int) $ts) < 300
     && hash_equals('sha256=' . hash_hmac('sha256', $ts . '.' . $body, $secret), $sig);

Templates

Flow Studio › Templates holds 20 starters by category. Preview shows the steps; Use Template asks which colleague the steps should name and opens the new draft. Templates that need a module you do not have are not shown.

CategoryTemplates
SalesNew lead follow-up · Lead round-robin and welcome · Accepted estimate hand-off
FinanceOverdue invoice reminder · Invoice due soon · High-value invoice review · Payment thank-you · Send new invoices to another system
SupportHigh-priority ticket escalation
ProjectsProject kickoff · Overdue task nudge
ApprovalsReview before acting · Discount approval
OperationsCustomer onboarding · Contract renewal · Daily operations reminder
SellMyCode modulesNew conversation follow-up (Inbox) · AI triage of incoming messages (Inbox + AI Staff) · Client file received (Client Hub)
BasicsYour first workflow
The template gallery
The template gallery.

Testing

The test dialog with a ticket chosen and the steps it would take
Test on a real ticket: each step's result, without effects.

Executions

Flow Studio › Executions lists executions newest first: status, workflow and version, record, start and duration. Filter by status, workflow, period and tests, or search by execution, record number or workflow name.

StatusMeaning
Queued / RunningWaiting for, or in, the next worker run.
WaitingIn a Wait step.
ApprovalWaiting for reviewers.
CompletedReached Finish.
FailedA step failed without an error branch. Retry Safe Step runs it again when it has no effect (condition, value, finish); after a failed action, check the record and use Run Again. A failed Ask AI Staff step has Ask AI Again instead (see below).
InterruptedThe server stopped while a step with an effect was running. Flow Studio never repeats such a step by itself; check the record, then run again or cancel.
CancelledCancelled by a person.

An execution page shows each step with its time, duration, input and result, the details and the event data. Links to records open the record in Perfex.

An execution with its steps, details and event data
An execution: steps, details and the event data.
A failed execution with the step's error explained
A failed step explains itself.

Workers and failures. One workflow that cannot run (for example a damaged version) is paused with the reason, its owner is notified, and the others keep running. Limits per workflow (500 executions an hour by default) and per workflow and record (20 an hour) stop loops and floods; the audit trail records when a limit was hit.

Analytics

Flow Studio › Analytics shows executions, success rate, failures, time to finish (median and 95th percentile) and processing time without waits, executions per day, and tables by workflow, by step, by error and for approvals (time to decision per reviewer, open and overdue). Periods: 7, 30, 90 days, 12 months or custom; one workflow or all; tests in or out. Staff with View (Own) see the numbers of their own records only.

Run analytics for 30 days
Run analytics for 30 days.
Analytics by workflow with success rate, failures and durations
By workflow: executions, success, failures, median and 95th percentile.

Audit Trail lists every change: drafts saved, versions published, workflows paused, archived, imported, settings saved, executions cancelled, review handovers, limits reached.

Integrations

Each integration appears only while the other module is active; turning that module off never breaks Flow Studio (a step that needs it fails with a clear message or takes its error branch).

ModuleAdds
Perfex Inbox All-in-OneTriggers: new conversation, message received, status changed, assigned, SLA target missed, any activity. Steps: send a message (reply in the conversation, or to a contact on an account), assign, label, change status, add an internal note. Messages go out through Inbox's own queue.
Perfex AI StaffAsk AI Staff: classify into your categories, summarise or draft; the answer is saved as a value for the next steps. It never sends or changes anything itself. Switch: Settings › Family Modules. When the step itself fails (provider error or timeout, rate limit, an AI Staff budget, AI Staff unavailable), an administrator can use Ask AI Again on the execution page once the cause is fixed: the dialog shows the last error and that it sends one more AI request; AI Staff's routing, budgets, permissions and usage log apply as for the first. At most 3 times per step and execution, never automatically; every retry is in the audit trail and on the execution page (who, when, previous error). An answer AI already gave is kept: when a later step fails, that step is retried and reuses the answer.
Perfex Brain ProSix widgets: executions, success rate, failures, executions by workflow, open approvals and my reviews.
Perfex SentinelGovernance actions (publishing, pausing, deleting, importing, settings, review reassignments, cancellations) in Sentinel's audit log; triggers on security events and on high or critical events.
Perfex Client HubTriggers: customer uploaded a file, share link created, feedback posted, feedback status changed.
Perfex DeliverablesTriggers: new version uploaded, version approved, changes requested, comment added, delivered, scope approved, change request approved, any event.
Perfex Document StudioTriggers: template published, default template changed.

Other modules can start workflows with the action pfs_emit_event (trigger “Extension event (by key)”).

Permissions

Staff rights are set in Setup › Staff › Roles (or per staff member), feature Flow Studio. Administrators can do everything.

WhoCan
AdministratorBuild, test, publish, pause, archive, import and export workflows; settings; everything below.
ViewAll workflows, executions, analytics and the audit trail (read only).
View (Own)Analytics and executions about their own records: executions they started, ones they review, and records they are responsible for (assigned lead, task assignee or follower, project member, assigned ticket, sales agent, customer admin and so on).
ApproveThe approvals assigned to them, with only the fields the request names.
Settings: permissions overview
Settings › Permissions: who holds which right.

Data retention

Settings › Data Retention decides how long history is kept. An hourly clean-up on the worker deletes:

The section shows the last clean-up and how much is due at the next one. When a lead, customer or contact is deleted in Perfex, its copies in finished executions and processed events are cleared.

Settings: data retention
Settings › Data Retention.

Settings

SectionSettings
GeneralLight or dark (follows Perfex Brain Pro's setting when it is installed, shared by all our modules).
WorkerTime per cron run (15 s by default, 5–120); executions per workflow per hour (500); executions per workflow and record per hour (20). Last run, and Run Worker Now.
Data RetentionSee Data retention.
Family ModulesLet workflows ask AI Staff; send governance actions to Sentinel; offer widgets in Brain Pro.
Outgoing RequestsAllow and deny lists of hosts, time limit, retries.
PermissionsWho holds which Flow Studio right, with a link to the roles.
Settings: outgoing requests with the allow list
Settings › Outgoing Requests.

Security notes

Deactivate and uninstall

Deactivate in Setup › Modules: the menu, the triggers and the worker stop at once; your workflows and history stay. Activating again continues where it stopped; events that happened while it was off are not recorded.

Uninstall (after deactivating) deletes every Flow Studio table, setting, staff right and notification, and Perfex deletes the module folder. Export your workflows first (Templates › Export Library) if you may want them back.

Troubleshooting

FAQ

Can I edit a workflow while it runs?

Yes. You edit the draft; running executions finish on their version.

Can customers see anything?

No. Flow Studio is for staff. Customers only receive what your steps send them.

Does it work without AI or our other modules?

Yes. They add triggers, steps and widgets when installed; everything else works the same.

Is it translated?

Yes: English, Spanish, Portuguese (Brazil), French, German, Italian, Dutch, Turkish and Russian.

How do I get support?

Send the module, Perfex and PHP versions and a screenshot of the execution through SellMyCode support — never passwords or secrets.

Changelog

Current version 1.0.6 (25 Oct 2026). Release notes of every version, newest first: perfexcrm.app/flow-studio/changelog/.

1.0.0 — 2026-10-16

0.2.0 and 0.1.0 — development previews

The full list is in changelog.txt in the download.