# Building Flows {#building-flows}


Flows are automated sequences of actions triggered by events. Use them for welcome series, abandoned cart reminders, re-engagement campaigns, and more.


## How flows work {#how-flows-work}


A flow starts with a **trigger** — an event that kicks off the automation. Then it executes a series of **steps**: sending emails, waiting for a delay, splitting by condition, and more.


## Creating a flow {#creating-a-flow}


1. Go to **Flows > New Flow** ([app.nitrosend.com/my/flows/new](https://app.nitrosend.com/my/flows/new))
2. Choose a trigger (e.g., "New contact", "Add to list")
3. Add steps using the visual flow editor
4. Activate the flow


## Step types {#step-types}


- **Send Email** — send a template to the contact
- **Send SMS** — send a text message
- **Wait** — pause for a duration (e.g., 2 days)
- **Condition** — branch based on contact properties or behavior
- **Emit event** — record a business event
- **Categorize reply** — route a received reply into your named paths, plus Other
- **Random split** (beta, not yet on for every account): send each contact down one of two to six weighted paths at random, and keep them on it if they come back. A flow can have one. Its panel shows each path's people, opens and clicks so far
- **Reply to email** — send a reply you've written in the original conversation
- **Subscribe / Unsubscribe** — change a contact channel's subscription


## Testing {#testing}


Use **Test** to send a message to your approved test recipients before activating.
Testing an email does not enroll a customer or simulate an entire journey.


## Handle replies {#handle-replies}


To stop follow-ups, open the trigger settings and turn on **Stop this flow when
someone replies**. Check the receiving address shown there. This stops only the
answered journey; it doesn't send an automatic response.

For a response, choose **Automate replies** to create a separate draft with the
original flow selected. Add **Reply to email** for a reply you've written, or
**Categorize reply** if different replies need different paths. Give each
category a clear meaning. Other handles replies that don't fit; a failed check
never takes a business path. Review the draft before going live.

Replies need a monitored Inbox or supported receiving mailbox. If receiving
needs repair, fix it and use **Resume follow-ups** to review the retained work.
Reconnect never releases old follow-ups by itself. See [Replies in flows](https://docs.nitrosend.com/concepts/flows.md)
for source selection, costs and recovery.

**Quick preview** opens a centered viewer with desktop and mobile widths. For
products supplied by an event, expand **Preview event products** and paste the
event's `data` object, not the full event envelope. The designer uses the same
sample-data control. Previews do not record events, create orders or enroll
contacts.


## Your first ecommerce flow {#your-first-ecommerce-flow}


Start with one flow, not your whole email program:

1. Choose the event your store actually sends, such as `cart_add`. Your existing
   application sends it through the [Events API](https://docs.nitrosend.com/integrations/events-api.md); no
   catalog sync or custom store connector is required.
2. Add a wait, then an email. Use **From the trigger event** in the product
   controls and supply product names, actual links and any prices/images in
   the event. Preview and test a representative payload before going live.
3. In the trigger settings, choose the purchase event your store sends under
   **Stop this flow when…**. If you send `order_placed`, select that exact name.
4. Check the wait's timezone and your sender. A ready Nitrosend-provided sender
   does not require custom DNS setup. Keep one financial order feed per store
   so an API order is not also recorded through Shopify or Stripe.
5. Activate the agreed flow, then verify both paths with your own test contact:
   an abandoned cart continues; a purchase during the wait stops future steps.
   The contact's activity shows **Left flow after order placed** (or your
   selected event) and the flow name. A test email alone does not prove exits.

Activating a flow does not import past orders or replay past events. Keep
customer consent, sending allowances and existing delivery safeguards in place.


## Stop future steps after a purchase {#stop-future-steps-after-a-purchase}


In the trigger settings, add your purchase event to **Stop this flow when…**
(for example, `purchase` or `order_placed`). A new matching event for the same
brand and contact stops the next step before it starts. A purchase from before
the journey began does not stop it. An email already being sent cannot be recalled.

This setting is part of the approved flow revision. Editing a draft does not
silently change journeys already in progress.


## Continue at a local time {#continue-at-a-local-time}


On a Wait step, enable **Continue at a specific time**, choose a time and review
the timezone. The duration starts when the contact reaches the wait. The next
step is scheduled for the first chosen local time at or after that duration.
For example, a two-day delay followed by 09:00 waits at least two days, then
continues at the next 09:00 in the selected timezone.

The timezone is pinned with the approved revision. Resuming a paused flow does
not restart the delay or move an already-due step to tomorrow. During a daylight
saving gap, the first valid instant is used; during a repeated hour, the first
occurrence that meets the original delay is used.
