# Flows

The fixed sales-ops recipes PYLO can run for you, how to try them in shadow before going live, and how to set their notifications.

A flow is a fixed recipe that runs when something happens, such as a form coming in, a call being booked or an outcome being filed. You choose whether each flow is off, running in shadow, or live, and you set what it writes to Close and which notifications it sends.

## Who can open it

Owners and admins. A live flow writes to Close and sends notifications, so nobody else can change flows.

## The flows

| Flow | Runs on |
| --- | --- |
| Lead intake | A submission to this workspace's website form URL |
| Booking | A new Calendly booking |
| Reschedule | A Calendly booking moved to another time |
| Cancellation | A Calendly booking cancelled |
| Outcome | A post-call form or a DM close form |
| Payment | A payment succeeding or failing at the processor |
| Hand-off | An outcome of closed won |

## Off, shadow and live

Every flow starts off. Choosing a mode saves it straight away.

- **Off** does nothing. Everything works exactly as it does today.
- **Shadow** records on each lead's page what the flow would have done, and writes nothing anywhere.
- **Live** writes to Close and sends the notifications itself. PYLO's own step for the same thing stands down.

Try a flow in shadow first, and set it live when the shadow runs look right.

## Close settings

Lead intake, Booking, Cancellation and Outcome have a `CRM step`. Set it to `Close` to show the fields for that flow, such as `Pipeline`, `Lead status`, `Opportunity status`, `Won status`, `Lost status`, the setter and closer fields, and the fields UTM values are written to. Type each name exactly as Close spells it, because the names are matched each time the flow runs.

## Notifications

Each flow except Hand-off has a notification. Payment has two: one for when a payment succeeds and one for when it fails.

1. Choose `Discord` or `Slack`, or `No notification`.
2. Under `Sent where this event goes`, choose the event whose channel it should post to, such as booked calls or closed.
3. Choose who to `Mention`: nobody, everyone or here.
4. Under `Carries`, tick what the message includes: name, email, phone, Close link, PYLO link, source and country eligibility.
5. Choose `Save settings`.

Channels come from your Slack and Discord set-up on [Integrations](/docs/settings/integrations).

## Hand-off

Hand-off posts to your own webhook address, for example in n8n, Make or Zapier, when a deal is closed won. Enter an https address, then create the signing secret. Each post is signed in the `X-Pylo-Signature` header as `t=<time>,v1=<signature>`, where the signature is an HMAC-SHA256, keyed by your signing secret, of the time, a dot and the raw body. Check it before trusting a post. The secret is shown once, and creating another replaces it.

## Parallel mode

Parallel mode runs PYLO next to the client's current setup before it takes anything over. In parallel, PYLO reads everything and writes nothing to the client's tools: no CRM changes, list adds, webhooks or checkouts. Every flow and recipe runs in shadow, whatever its own mode. Only an owner switches the workspace between parallel and live.

## The parallel scorecard

While the workspace is in parallel, this page shows PYLO's figures beside the client's current setup for the same period: registrants, attendees, bookings, shows, closes and cash. The current setup's side is read from the tools themselves: the CRM's own records and won deals, the booking tool's meetings, and the SMS platform. When PYLO cannot read a side, it says why instead of showing a zero.

Open `on one side only` under any figure to see each person who is on one side and not the other, with the likely reason, such as a registrant the signup automation never put in the CRM. Cash is shown per currency and never added across currencies. Change the dates and choose `Show` to read another period. Your agent reads the same with `get_parallel_scorecard`.

## Going live one piece at a time

A workspace moves to live one piece at a time: webinar registration, CRM updates, SMS platform sends, email list adds, flows and recipes, webhook registration, checkouts, setup in the client's tools, and event relaunches. The protocol is the one PYLO uses for every cutover: at least 7 days in parallel, and fewer than 5 differences on the scorecard. Each piece on this page says whether it is ready.

Ask your agent for `plan_switch_to_live`. It makes one plan per piece, each saying what to turn off in the current setup first, and the plan that rolls it back. A person approves each plan, because going live is hard to reverse. Keep the old automation turned off, not deleted, for 14 days, so turning it back on is the rollback. When every piece is live, switch the workspace itself to live.

## Pause writes

`Pause writes` stops every write to the client's tools and every scheduled send straight away, whatever a flow, a token or a plan says. Reads keep running and agents stay connected. Owners and admins can pause, with a one-sentence reason that every page of the workstation then shows in a banner. Only an owner can lift a pause, here with `Lift the pause`, or from the chat with a code PYLO sends to them. An agent pauses with `pause_writes` and asks for the code with `lift_write_pause`. A pause for the whole agency is lifted by the agency's owner. For a hard stop of every agent, `Revoke every agent token` in [Agency settings](/docs/agency/settings) still does that.

## Hourly limits

Each workspace has hourly limits on writes to the client's tools, contacts touched and messages queued, set well above anything a normal day needs. A plan with more writes than the hour allows is split: the first part applies, and planning the same thing again after the hour gives a plan of what is left. A paced send waits for the next hour in the same way. This page shows the current hour's use while the workspace is in parallel.

## What changes elsewhere

In shadow, you can see each flow's planned steps on the lead's page. In live, the flow updates Close and posts to your channels in place of PYLO's own step.
