> ## Documentation Index
> Fetch the complete documentation index at: https://docs.canary.effectiveai.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Underwriting a submission

> Write an underwriting guideline as an RSL process over the log of a submission: questions and roles, referrals and sign-offs, offers and bind.

A **guideline** holds the underwriting rules of a program. It is a
[process](https://docs.canary.effectiveai.app/rsl/concepts/processes.md) over the log of one submission. People and tools write
answers, sign-offs and acts to the log, and the guideline folds the log into a status. The
status says where the submission stands, which questions are open and who answers each.

A guideline calls a [rater](https://docs.canary.effectiveai.app/rsl/uses/rating.md) for the premium. The rater stays a function, so
the same file still rates a book alone.

The two files change for different reasons. A filed rate changes with a filing, on the
regulator's calendar. An authority limit changes when the carrier decides, often between filings.

## Guideline parts

| The underwriting guideline says | The guideline holds | Read more |
| - | - | - |
| Who works the submission | Roles, from lowest to highest | [Rules, grants and decisions](https://docs.canary.effectiveai.app/rsl/concepts/rules-and-decisions.md) |
| Who answers each question | A role on each question | [Rules, grants and decisions](https://docs.canary.effectiveai.app/rsl/concepts/rules-and-decisions.md) |
| The risks the carrier writes | A rule with a code, which makes a submission ineligible | [Rules, grants and decisions](https://docs.canary.effectiveai.app/rsl/concepts/rules-and-decisions.md) |
| A role must approve a risk | A referral, which waits for that role's sign-off | [Rules, grants and decisions](https://docs.canary.effectiveai.app/rsl/concepts/rules-and-decisions.md) |
| Quote, bind, decline and withdraw | Acts, each with the role that takes it | [Processes and the log](https://docs.canary.effectiveai.app/rsl/concepts/processes.md) |
| What the risk costs | A call of the rater | [Modules](https://docs.canary.effectiveai.app/rsl/concepts/modules.md) |

## Guideline shape

The guideline of [Turn guidelines into a program](https://docs.canary.effectiveai.app/guides/underwriting/write-guidelines.md) underwrites a
staffing firm. It links the rater, declares its roles and names its acts:

```rsl theme={"languages":{"custom":["languages/rsl.tmLanguage.json"]}}
use ts = "rater.rsl"

Roles = { assistant < uw < manager }

Acts = {
    quote: offer live -> live by @Role.uw,
    bind: accept live -> bound by @Role.uw,
    decline: refuse live -> declined by @Role.uw,
    withdraw: end live -> closed by @Role.assistant,
}
```

It gives questions to roles, reads the rater's premium and refers two kinds of risk to a manager:

```rsl theme={"languages":{"custom":["languages/rsl.tmLanguage.json"]}}
financially_sound: Bool by @Role.uw when self.operation = @Operation.peo [cite: guideline:p1],
policy: ts.Policy,
policy.experience by @Role.uw
...
premium: Premium = ts(self.policy).premium
...
refer new_venture when self.years_in_operation < established_years
    to @Role.manager because "The firm is in operation for less than 3 years." [cite: guideline:p1]
refer large_account when self.premium >= large_premium
    to @Role.manager because "The premium is $10,000 or more." [cite: guideline:p2]
```

## Questions and roles

Each question names the role that answers it. A question that lacks a role is open to every role.
A role answers for each role below it, so a manager answers an underwriter's questions too. A
write from a lower role gets the refusal `NOT_AUTHORIZED`, and the log keeps the refusal beside it.

A data source is a role too. A loss-data bureau that answers the loss experience is one role, and
an underwriter above it corrects the bureau's answer.

An input marked `per quote` is a **term**, such as a limit. Each offer sets its own terms, and
every other input is a fact that all offers share.

## Rule forms

A manual says more than "refer this". Each kind of rule has its own form:

| The manual says | Form | What waits for it |
| - | - | - |
| A role must approve the risk | `refer` | The quote |
| "If yes, describe": a role looks at it | `note` | Every act stays open |
| Loss runs are due before the policy is issued | `require … before bind` | The bind, after the quote |
| These questions need answers, and they decide only that | `on file` | The quote |
| The class is ineligible, unless an underwriter writes it anyway | `overridable by` | The quote, until overridden |
| A coverage or limit is offered only on some answers | `not_offered` | The quote of that option |

[Guidelines](https://docs.canary.effectiveai.app/rsl/reference/language.md#guidelines) in the language reference gives the syntax of each form.

## Referrals and sign-offs

A referral names a condition, the role that signs it off and the reason that role sees. While the
condition holds, the submission waits for `Approved` or `Declined` from that role.

A sign-off stands while the values its condition read stay the same. When one of them changes,
the sign-off lapses and the status names the value. Other answers leave it in place.

## Offers, quotes and bind

* An offer act saves the outcomes of the moment under a name, such as `q1`. The offer stands while the answers stay the same.
* An accept act takes an offer that stands, so the bound premium always matches the answers in the log.
* A refuse act declines while a rule or a sign-off declines, and the entry records its code. An end act closes the submission.
* A broken coded rule makes the status `ineligible`, and the submission stays open. A typing error breaks a rule as a true answer does, so a person decides: correct the answer, or decline.
* An accepted, refused or ended submission is final. The log then refuses each later write.

## Rater calls

The `use` line links the rater under a short name. The rater's record is one input of the
guideline, so the rater's questions keep their names. The call returns the rater's outcomes.

A guideline reads a rater in one of two forms:

* The short call, `ts(self.policy).premium`, reads the premium. A coded rule of the rater then makes the whole submission `ineligible` with the rater's code.
* A `match` on the call gives the guideline its own value for a refused call, such as a minimum premium for a small account.

A guideline reads a rater through its inputs and outcomes only, and `rslc check` holds it to
that. So the rater's steps stay free to change, and one rater serves several guidelines. One
check covers the guideline and each rater it uses.

## Submission logs

* Locally, `rslc log` writes and reads a log file. [Turn guidelines into a program](https://docs.canary.effectiveai.app/guides/underwriting/write-guidelines.md) works one submission from application to bind.
* [Run a submission](https://docs.canary.effectiveai.app/rsl/how-to/run-a-submission.md) covers each command, offer options and missing answers.
* On Effective, release the guideline and keep each submission's log through the API. [Programs on Effective](https://docs.canary.effectiveai.app/rsl/programs-on-effective.md) shows the flow.

Cancellations, claims, renewals and audits take the same form: a process over a subject's log.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.