# License renewals

URL: /workflows/processes/license-renewals · Id: `process:license-renewals`

> License renewals renews each business license and permit before it expires and holds any Offer that depends on one that lapses.

License renewals renews each business license and permit before it expires and holds any [Offer](/business/nouns/offer) that depends on one that lapses.

## Outcome
| Part | This Process |
| --- | --- |
| Outcome | Every license and permit the Company holds is renewed before it expires, or the Offers that need it are held. |
| Reads | [Credential](/business/nouns/credential) |
| Leaves | [Credential](/business/nouns/credential), [Document](/business/nouns/document) |
| On time | Within 5 days (business hours); the clock stops while an Action waits on `awaitingInput`. Late Actions go to the [Legal Lead](/agents/legal/legal-lead). |
| Runs in | Each Startup |

## Accountable
[Compliance Officer](/agents/legal/compliance-officer), [Legal Team](/agents/legal).

Responsible: [Compliance Officer](/agents/legal/compliance-officer).

Consulted: [Legal Lead](/agents/legal/legal-lead).

Informed: [Founder](/agents/founding/founder).

## Workflows
| Workflow | Runs | Team |
| --- | --- | --- |
| [Renew a license](/workflows/processes/license-renewals/renew-license) | every week | [Legal Team](/agents/legal) |

## Who does each step

| Workflow | Step | Role | Calls | Approval |
| --- | --- | --- | --- | --- |
| [Renew a license](/workflows/processes/license-renewals/renew-license) | 1. List each license and permit that expires inside the renewal window. | [Compliance Officer](/agents/legal/compliance-officer) | [Credential.list](/business/nouns/credential/list) | None |
| [Renew a license](/workflows/processes/license-renewals/renew-license) | 2. Prepare each renewal from the Company’s records. | [Compliance Officer](/agents/legal/compliance-officer) | [Document.render](/business/nouns/document/render) | None |
| [Renew a license](/workflows/processes/license-renewals/renew-license) | 3. Ask the Founder to sign where the license requires the owner. | [Compliance Officer](/agents/legal/compliance-officer) | [Approval.create](/business/nouns/approval/create) | None |
| [Renew a license](/workflows/processes/license-renewals/renew-license) | 4. Submit the renewal and record the new expiry on the Credential. | [Compliance Officer](/agents/legal/compliance-officer) | [Credential.update](/business/nouns/credential/update) | None |
| [Renew a license](/workflows/processes/license-renewals/renew-license) | 5. Withdraw any Offer whose license lapsed until it is renewed. | [Compliance Officer](/agents/legal/compliance-officer) | [Offer.withdraw](/business/nouns/offer/withdraw) | Asks first |

## Events
| Direction | When | What happens |
| --- | --- | --- |
| In | Every week | Starts [Renew a license](/workflows/processes/license-renewals/renew-license) |
| Out | [`Document.rendered`](/business/events/Document.rendered) | Raised by step 2 of [Renew a license](/workflows/processes/license-renewals/renew-license) |
| Out | `Approval.created` | Raised by step 3 of [Renew a license](/workflows/processes/license-renewals/renew-license) |
| Out | `Credential.updated` | Raised by step 4 of [Renew a license](/workflows/processes/license-renewals/renew-license) |
| Out | [`Offer.withdrawn`](/business/events/Offer.withdrawn) | Raised by step 5 of [Renew a license](/workflows/processes/license-renewals/renew-license) |

## Plays
No Play names this Process.

## Controls
No Control names this Process or a Workflow of it.

## Settings
| Setting | Type | Default | Say | Set with |
| --- | --- | --- | --- | --- |
| `licenses.renewDays` | `integer` | `90` | Start license renewals 90 days before they expire | [Setting.update](/business/nouns/setting/update) |

## Failure
A failed step retries; when retries run out, the Action goes to the [Legal Lead](/agents/legal/legal-lead).

| Step | On failure |
| --- | --- |
| [Renew a license](/workflows/processes/license-renewals/renew-license) 3. Ask the Founder to sign where the license requires the owner. | Times out after 7 days. Goes to the [Legal Lead](/agents/legal/legal-lead). |

## Loop
No loop: the path is never randomized, because it serves [Licensing](/systems/legal-and-corporate/floor/licensing).

## Code

**Ask**

```text
Turn on license renewals
```

**API**

```bash
curl -X POST https://api.sb/leaseline.app/processes/process_1/enable \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY"
```

**SDK**

```ts
import { $ } from 'startup-builder'

await $.Process.enable({ process: 'process_1' })
```

**CLI**

```bash
npx startup-builder do Process.enable --json '{"process":"process_1"}'
```

**MCP**

```json
{
  "name": "do",
  "arguments": {
    "code": "return await $.Process.enable({ process: 'process_1' })"
  }
}
```

## Enable
Off until someone calls [Process.enable](/business/nouns/process/enable). [Process.pause](/business/nouns/process/pause) stops new Actions; Actions in progress finish.

**Ask**

```text
Start license renewals 90 days before they expire
```

**API**

```bash
curl -X PATCH https://api.sb/leaseline.app/settings/setting_1 \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"value":90,"key":"licenses.renewDays"}'
```

**SDK**

```ts
import { $ } from 'startup-builder'

await $.Setting.update({ id: 'setting_1', value: 90, key: 'licenses.renewDays' })
```

**CLI**

```bash
npx startup-builder do Setting.update --json '{"id":"setting_1","value":90,"key":"licenses.renewDays"}'
```

**MCP**

```json
{
  "name": "do",
  "arguments": {
    "code": "return await $.Setting.update({ id: 'setting_1', value: 90, key: 'licenses.renewDays' })"
  }
}
```

## Example
A home-inspection [Marketplace](/products/templates/marketplace) holds a city business license that expires in 90 days. The [Compliance Officer](/agents/legal/compliance-officer) prepares the renewal that week, and the [Founder](/agents/founding/founder) signs. Eight days later the new expiry is on the [Credential](/business/nouns/credential).