URL: /code/files/systems · Id: `page:/code/files/systems`

# The systems/ folder: one file and what it compiles to

> What one systems/ file holds, what each key compiles to, and the checks that read it.

One `systems/` file is an override of one [System](https://startupbuilder.dev/business/nouns/system) the [Startup](https://startupbuilder.dev/business/nouns/startup) inherits. SalesBuilder compiles it, and `show` traces every key.

```mdx title="systems/sequences.mdx"
---
warmup: { days: 14, start: 5, cap: 40 }
sendDays: [mon, tue, wed, thu]
---
New Mailboxes warm for 14 days, from 5 to 40 a day.
```

```text title="show"
$ npx startup-builder show systems/sequences.mdx
warmup    { days: 14, start: 5, cap: 40 }  systems/sequences.mdx:2
sendDays  [mon, tue, wed, thu]             systems/sequences.mdx:3
owner     SalesBuilder
```

```text title="leaseline.app"
leaseline.app/
├── plays/
│   ├── cold-email.mdx
│   ├── warm-intros.mdx
│   ├── signup-interviews.mdx
│   ├── lead-reactivation.mdx
│   └── events-and-webinars.mdx
├── audiences/
│   ├── small-property-managers.mdx
│   ├── lapsed-leads.mdx
│   └── renewal-season.mdx
├── sequences/
│   └── cold-email-thread-founder.mdx
├── funnels/
│   └── signup.mdx
├── workflows/
│   └── outbound.mdx
├── agents/
│   ├── sales/prospector.mdx
│   └── marketing/content-lead.mdx
├── systems/   ← this folder
│   └── sequences.mdx
├── domains/
│   └── leaseline.app.mdx
├── offers/
│   ├── pro.mdx
│   └── team.mdx
├── content/
│   └── webinars/60-day-notices.mdx
├── metrics/
│   ├── q4.mdx
│   └── positive-reply-rate.mdx
└── startups.lock
```

## The file
| Key | On the page | Compiles to | Checked by |
| --- | --- | --- | --- |
| `warmup` | Warm up your inbox | <Op verb="Mailbox.warm" /> on every new Mailbox: days, starting cap and daily cap; the first cold email waits on it | — |
| `sendDays` | Send days | the days every Sequence step may send | — |

## Checks
| Check | It holds | What dev prints |
| --- | --- | --- |
| [S2](/code/checks#s2) | Every send passes a code-tier Check before it goes. | `sequences/cold-email-thread-founder.mdx:5  S2  steps.second sends with no code-tier Check. Add guards: [customer-collision].` |

## Refusals
| Code | Fix, then the call that clears it |
| --- | --- |
| [`address-cap`](/code/refusals#check-address-cap) | Bundle the extra Tenants into the next message; the cap resets after 24 hours. Then <Op verb="Message.schedule" />. |
| [`billing-connected`](/code/refusals#check-billing-connected) | Connect Stripe so every charge and Meter reading is live. Then <Op verb="Integration.connect" />. |
| [`change-feed`](/code/refusals#check-change-feed) | Connect your code host so the feed reads each merged Change. Then <Op verb="Integration.connect" />. |
| [`claim`](/code/refusals#check-claim) | Cut the line, or cite the Offer term that grants it. Then <Op verb="Conversation.answer" />. |
| [`consent-stop`](/code/refusals#check-consent-stop) | Ask once for a yes to the other Startup. Then <Op verb="Message.schedule" />. |
| [`conversion-send`](/code/refusals#check-conversion-send) | Connect the ad account and send one test qualified Lead; the Venue stays off until it lands. Then <Op verb="Integration.connect" />. |
| [`correction-cap`](/code/refusals#check-correction-cap) | Hold the correction for next week, or 30 days for the same Contact. Then <Op verb="Message.schedule" />. |
| [`count-floor`](/code/refusals#check-count-floor) | Say “2 people on your team”, never a name. Then <Op verb="Message.schedule" />. |
| [`customer-collision`](/code/refusals#check-customer-collision) | Send it to their CSM instead: the Contact leaves the List. Then <Op verb="Lead.assign" />. |
| [`display-consent`](/code/refusals#check-display-consent) | Ask the reviewer once; the Review shows when they agree. Then <Op verb="Message.schedule" />. |
| [`domain-authenticated`](/code/refusals#check-domain-authenticated) | Add the 3 DNS records shown; it passes once they resolve, often within an hour. Then <Op verb="Domain.authenticate" />. |
| [`double-opt-in`](/code/refusals#check-double-opt-in) | Wait for their yes on the introducer’s thread. Then <Op verb="Decision.list" />. |
| [`embargo`](/code/refusals#check-embargo) | Hold the number until the release lifts at T-0. Then <Op verb="Post.schedule" />. |
| [`evidence`](/code/refusals#check-evidence) | Ask the publisher for subscriber and open numbers first. Then <Op verb="Message.schedule" />. |
| [`gift-cap`](/code/refusals#check-gift-cap) | Pick a gift under the class cap, or send none to that Organization. Then <Op verb="Message.schedule" />. |
| [`gift-connection`](/code/refusals#check-gift-connection) | Connect gift delivery in draft-only mode; only your Approval releases the Card. Then <Op verb="Integration.connect" />. |
| [`handle-connected`](/code/refusals#check-handle-connected) | Connect the founder’s Handles to read; every reply is still pressed by hand. Then <Op verb="Handle.connect" />. |
| [`import-refusal`](/code/refusals#check-import-refusal) | Send each Person to the Form to register themselves. Then <Op verb="Message.broadcast" />. |
| [`inbound-source`](/code/refusals#check-inbound-source) | Forward sales@ to your inbound address, or connect your form or ad source. Then <Op verb="Integration.connect" />. |
| [`invite-bounce`](/code/refusals#check-invite-bounce) | Ask the referrer to share the link instead of typing addresses. Then <Op verb="Message.schedule" />. |
| [`mailbox-warm`](/code/refusals#check-mailbox-warm) | Wait for the warm-up to finish, 14 days from day 0; warm intros keep running. Then <Op verb="Mailbox.warm" />. |
| [`movement-limit`](/code/refusals#check-movement-limit) | Wait 30 days, or 180 days after 3 unanswered notes; send upward moves only. Then <Op verb="Message.schedule" />. |
| [`named-score`](/code/refusals#check-named-score) | Get recorded Consent and the founder's approval, or leave the name out. Then <Op verb="Message.schedule" />. |
| [`obligation-void`](/code/refusals#check-obligation-void) | Send the help Messages; the guarantee stands until then. Then <Op verb="Message.schedule" />. |
| [`opt-in`](/code/refusals#check-opt-in) | Send the introducer their opt-in page first. Then <Op verb="Message.schedule" />. |
| [`original-audience`](/code/refusals#check-original-audience) | Post the derivative in another format or another feed. Then <Op verb="Post.schedule" />. |
| [`owned-by-a-person`](/code/refusals#check-owned-by-a-person) | Leave it to the person who owns it: the draft waits in their queue. Then <Op verb="Task.assign" />. |
| [`paying-user`](/code/refusals#check-paying-user) | Wait for the first paying connection; send the private link to one. Then <Op verb="Message.schedule" />. |
| [`price`](/code/refusals#check-price) | Get the discount approved, or quote at the floor. Then <Op verb="Approval.approve" />. |
| [`provenance-hold`](/code/refusals#check-provenance-hold) | Cut the line, or cite its timestamp in the transcript. Then <Op verb="Content.draft" />. |
| [`quiet-hours`](/code/refusals#check-quiet-hours) | Wait for their window; the narrower of two time zones wins. Then <Op verb="Message.schedule" />. |
| [`read-only`](/code/refusals#check-read-only) | Connect the old tool with its read-only export scope instead. Then <Op verb="Integration.connect" />. |
| [`renewal-notice`](/code/refusals#check-renewal-notice) | Send the renewal notice with its amount; the renewal waits 30 days after it. Then <Op verb="Message.schedule" />. |
| [`rights-hold`](/code/refusals#check-rights-hold) | Ask the host for the grant; the Page waits for it. Then <Op verb="Message.schedule" />. |
| [`room-cadence`](/code/refusals#check-room-cadence) | Skip that Room this time; it returns next month. Then <Op verb="Post.schedule" />. |
| [`sandbox-connected`](/code/refusals#check-sandbox-connected) | Connect each partner’s sandbox account; no suite touches a production account. Then <Op verb="Integration.connect" />. |
| [`sandbox-only`](/code/refusals#check-sandbox-only) | Run it in the partner’s sandbox. Then <Op verb="Integration.connect" />. |
| [`spam-brake`](/code/refusals#check-spam-brake) | Send to a smaller List, or wait an hour for the rate to fall. Then <Op verb="Message.broadcast" />. |
| [`summons-only`](/code/refusals#check-summons-only) | Reply only to a post that mentions or quotes the Handle. Then <Op verb="Post.schedule" />. |
| [`supplied-address`](/code/refusals#check-supplied-address) | Ask where to send it in the thread; ship only to their answer. Then <Op verb="Message.schedule" />. |
| [`visit-in-copy`](/code/refusals#check-visit-in-copy) | Open on a public fact about the company instead. Then <Op verb="Message.schedule" />. |

## Calls

```text title="systems/ compiled · Ask"
Connect the sending System and warm Dana’s inbox, as a dry run.
```

```ts title="systems/ compiled · SDK"
import { $ } from 'startup-builder'

await $.Integration.connect({ system: 'system_1', scope: 'studio', grants: ['Example grants'] }, { mode: 'try' })   // systems/sequences.mdx
return await $.Mailbox.warm({ mailbox: 'mailbox_1', cap: 40 }, { mode: 'try' })   // 14 days to 40 a day
```

```json title="systems/ compiled · Response · sample"
{
  "mailbox": {
    "$id": "https://api.sb/leaseline.app/mailboxes/mailbox_1",
    "$type": "Mailbox",
    "medium": "email",
    "address": "dana@leaseline.app",
    "stream": "transactional"
  },
  "action": {
    "$id": "https://api.sb/leaseline.app/actions/action_1",
    "operation": "Mailbox.warm",
    "status": "done"
  }
}
```

| Call | What it does |
| --- | --- |
| <a id="mailbox-warm"></a><Op verb="Mailbox.warm" /> | Warm ramps a new Mailbox from a few sends a day to its cap over two to four weeks. Emits [`Mailbox.warmed`](/code/events#mailbox-warmed). |
| <a id="mailbox-rest"></a><Op verb="Mailbox.rest" /> | Rest pauses a Mailbox’s sending when a brake fires and resumes it when the reading clears. Emits [`Mailbox.rested`](/code/events#mailbox-rested). |
| <a id="handle-connect"></a><Op verb="Handle.connect" /> | Connect binds a Handle to the Integration credential it publishes through, once the platform confirms the account. Emits [`Handle.connected`](/code/events#handle-connected). |
| <a id="integration-connect"></a><Op verb="Integration.connect" /> | Connect asks an account holder to approve an outside account for one System and records the grants they approve. Emits [`Integration.connected`](/code/events#integration-connected). |
| <a id="message-schedule"></a><Op verb="Message.schedule" /> | Schedule holds a Message until a set time and sends it then, unless it is canceled first. Emits [`Message.scheduled`](/code/events#message-scheduled). |
| <a id="message-broadcast"></a><Op verb="Message.broadcast" /> | Broadcast sends one Message to an Audience, now or at a set time, split by Variant when an Experiment runs. Emits [`Message.broadcasted`](/code/events#message-broadcasted). |
| <a id="post-schedule"></a><Op verb="Post.schedule" /> | Schedule puts a drafted Post on its Handle’s calendar for a set time. Emits [`Post.scheduled`](/code/events#post-scheduled). |