# Automations

> Flows that act at the moments that matter: an email when someone signs up, a reminder when a checkout stalls, a note to you when a lead looks at pricing.

Source: https://datacenter.so/docs/automations
Section: Measure

An automation (a flow) waits for a moment, like a signup or a stalled checkout, then runs its steps for that one person.

**Automations** in the sidebar holds every flow on every site in one place: the site, the flow's status (Live, Draft or Paused), its trigger, how many people are **in it now**, what it **sent** and its **sales** in the last 30 days, and its **last run**. Filter by status, search by name, or pick a site; the site shows as a chip, and its **x** shows every site again.

Each flow belongs to one site. With more than one site, **New flow** and **Use this** on a template ask which site; with one site, they ask nothing.

Automations are on paid plans: Solo, Studio and Agency. Free shows the page with the plans.

## Make a flow

1. Open **Automations** in the sidebar. A new account starts on the templates.
2. Press **Use this** on a template, such as **Welcome new signups** or **Abandoned checkout**, or press **New flow** to start blank.
3. Press the trigger at the top to choose what starts the flow.
4. Press **+** between steps to add one. Press a step to change it in the panel on the right (on a phone it slides up from the bottom).
5. Drag a step by its handle to move it, or use the up and down arrows in the panel.
6. Press **Test run**, pick a person, and read what each step would do for them. Nothing is sent.
7. Press **Publish**. The flow is live.

Changes save as you go, as a draft. People already in a flow keep the version they started on. **Publish changes** makes a new version for everyone who starts after that. **Pause** stops new people from starting; people on the way wait until you press **Resume**.

## Manage flows

Each flow's **⋯** menu has **Edit**, **Rename** (type the new name in place, Enter to keep it), **Open in new tab**, **Publish** (or **Pause** and **Resume** once it is live), **Duplicate** and **Delete**. With more than one site, **Copy to** puts a draft copy on another site.

- **Delete** keeps the flow for 30 days under **Deleted**, where **Restore** brings it back, paused, so it never starts sending on its own. After 30 days it is gone for good, with its numbers. Deleting a live flow asks once: the people in it stop there.
- **Undo** shows for a few seconds after a delete.
- Tick flows to **Pause**, **Delete** or **Move to site** them together. On a computer the tick box shows when you point at a flow. A moved flow arrives paused, and the people in it stop, since people belong to a site.

## Triggers

| Trigger | Starts when |
|---|---|
| Someone gives their email or phone | A profile gets an email or phone for the first time: a website form, the Events API, a connected store or tool. Never from an import. Pick **Website forms only** to start only from forms |
| Someone reaches a goal | Any goal, or the one you pick |
| First visit from an ad | Their first visit, with an ad click id in the address. Any ad platform, or the one you pick |
| Someone comes back after a while | They visit again after at least the days you set |
| Someone visits a page | A page like `/pricing`. Use `*` for any part, like `/pricing*` |
| Checkout started, no purchase | They reach a checkout page (like `/checkout*`) or send a checkout event (like `InitiateCheckout`), then buy nothing within the minutes you set |
| Someone buys | A sale from Stripe, Shopify, the Events API or your script, optionally above an amount. One sale starts a flow once, even when two sources report it |
| Someone clicks a short link | They visit through any short link, or the one you pick |
| Someone joins a segment | They join a [segment](https://datacenter.so/docs/segments-and-best-send-time). Checked every 15 minutes. People already in it when you publish are left out |
| Someone enters a stage | They become a Lead, Engaged, Customer, Repeat, At risk or Unsubscribed (see [stages](https://datacenter.so/docs/messages#stages)). Checked every 15 minutes, like a segment. People already in it when you publish are left out, and someone who leaves the stage and comes back does not start it again |
| Only people you add | Nobody starts it on their own. Add people from Profiles: filter by stage, then **Add to automation** |
| A deal is won in your CRM | A deal is marked won in [HubSpot or GoHighLevel](https://datacenter.so/docs/crm-connectors), for the person on the deal. Needs one of them connected. Only deals won in the last 3 days start it, so connecting a CRM never starts it for old deals. One deal starts a flow once |

Triggers that come from visits (goals, pages, ads, links, checkouts, coming back) need [90-day tracking](https://datacenter.so/docs/tracking-modes), and consent where the site waits for it, because they follow one person.

**Can someone go through it again?** **Once only**, **Again after some days**, or **Every time** (one run at a time). **Stop when they buy** ends their run as soon as a sale comes in. Abandoned checkout flows always stop on a purchase.

Ask the [assistant](https://datacenter.so/docs/assistant) to "Set up an abandoned checkout flow" or "Write and schedule a welcome series" and it builds the draft for you, in your brand's voice. It never publishes without your OK.

## Steps

| Step | Does |
|---|---|
| Wait | For minutes, hours or days, or until a time of day in their time zone |
| If / else | Checks one thing, then runs the Yes steps or the No steps. The two paths do not join again |
| Send email | Your email, built from blocks |
| Send text | A text from your texting number (when shipped) |
| Add tag | Puts a tag on the profile, for If / else steps and for finding people later |
| Send to webhook | Posts the profile as JSON to an address you give, signed |
| Push to CRM | Sends the profile right away to your connected [CRM or webhook](https://datacenter.so/docs/crm-connectors) (HubSpot, GoHighLevel, Airtable or a webhook), every one or the one you pick, with the fields picked for that tool. Works even if **Start sending** is off there. Needs one connected |
| Notify me | Emails you, with a link to the profile |
| End | The flow ends here |

**If / else can check:** has an email, has a phone, agreed to texts, came from a source, came from an ad platform, came from a campaign, visited a page, reached or did not reach a goal (within some days, or since they entered), is in a segment, is in a stage, spent more than an amount, has a tag.

**Their time zone** comes from their email or text tool when it told us one, else from the first country they visited from (a guess), else your site's time zone.

## Email

Build an email from blocks: heading, text, button, image and divider. Links in text and buttons are counted when clicked.

**Merge fields** fill in for each person: `{first_name}`, `{name}`, `{source}`, `{campaign}`, `{last_page}` and `{site_name}`. Add a fallback after a bar for people you do not know the field for: `{first_name|there}`.

Press **Preview** to see it with a sample person, and **Send a test to me** to get it in your own inbox.

Every email:

- Comes from your **From name**. It is sent from Datacenter's sending address, until you set up [email from your own domain](https://datacenter.so/docs/sending-domain); then it comes from your own address.
- Has its own reply address. When someone replies, the reply shows in [Messages](https://datacenter.so/docs/messages), and a copy goes to your **Replies go to** address (your account email when empty). Turn the copy off in **Automations settings**.
- Ends with your name, your **postal address** and an **Unsubscribe** link, as the US CAN-SPAM Act asks. A flow with an email cannot go live until the postal address is set in **Automations settings**.
- Carries one-click unsubscribe headers, so Gmail and Apple Mail show their own unsubscribe button.
- Has a plain-text version.

Emails go only to people whose email is stored: **Show contact details** must be on, in the settings of the site's customer profiles. Someone who unsubscribed, from a flow email or in Klaviyo or Mailchimp, is skipped.

## Texts (when shipped)

Texts go from your [texting number](https://datacenter.so/docs/texting-number), at 2¢ a part, billed with your plan each month. Until texts are switched on, text steps are skipped and say why. Once they are:

- **Consent first.** A text goes only to someone with consent to texts on record: a ticked box about texts on your website form (with form capture on; its words are kept as the record), or a yes in an imported **Agreed to texts** column. Everyone else is skipped.
- **Quiet hours.** No texts from 9 pm to 8 am in their time zone. A text due then waits until 8 am. When their time zone is a guess, a US or Canada number goes by its area code's time zone (by New York and Los Angeles both when the code is not known).
- **US and Canada numbers only.** Your texting number is a US one, so texts go to US and Canada numbers only.
- **STOP works at once.** A reply of STOP (or STOPALL, UNSUBSCRIBE, CANCEL, END, QUIT) stops all texts from that site. START turns them back on. HELP gets your brand, your **Replies go to** address (or "Reply here for help") and how to stop.
- **Your brand first.** Each text starts with your brand name, and the first text a person gets ends with "Reply STOP to opt out."
- **US numbers need registration.** Carriers block business texts to US numbers from unregistered senders. [Get a texting number](https://datacenter.so/docs/texting-number) registers your brand and campaign (or a toll-free number) for you, with every fee shown first.
- The editor counts characters and message parts. A plain text fits 160 characters in one part; emoji and some letters bring that to 70.

## Limits

| Plan | Live flows per site | Emails a day per site | Texts a day per site |
|---|---|---|---|
| Solo | 5 | 500 | 100 |
| Studio | 25 | 2,000 | 500 |
| Agency | 100 | 10,000 | 2,000 |

Set a lower daily limit in **Automations settings**: **Settings** on Automations, or on any flow of the site. A send past the day's limit waits until the next day (UTC), it is not dropped.

## Numbers

Each flow in the list shows four numbers: **In it now** (people waiting on a step), **Sent** (emails and texts, last 30 days), **Sales** (last 30 days) and **Last run**. Open a flow for the rest of the last 30 days: how many people **entered** and **completed** it, emails sent, opened and clicked, texts sent, delivered and replied, and **sales**. Each step shows its own counts on the canvas.

A sale counts for a flow when the buyer's last flow email or text came within the days you set in settings (5 by default): last touch. The **Attribution** tab shows these sales in a **By automation** table.

Opens are counted when the email's images load. Some mail apps load them on their own, so opens run high. Clicks are a better signal.

## Webhooks

A **Send to webhook** step posts JSON: the flow, the step, the site and the profile (id, label, email and name when stored, first and latest source, orders and revenue). It is signed: `x-datacenter-timestamp` and `x-datacenter-signature: sha256=` the HMAC-SHA256 of the timestamp, a dot and the body, with the key in **Automations settings**, under **For developers**. Addresses must use https.

## How it runs

Steps that are due run every 15 minutes, so a wait of 10 minutes can take up to 25. The first steps of a flow run the moment it starts. Each step is recorded before it acts, so an email or text is never sent twice, even when something is retried.
