**Document signing** in your admin sidebar, under Content.

Send a document to one or more people for an electronic signature. Every mail
and every signing page carries your firm's name, logo and colours on your own
domain, so a signer never sees Propper. When everybody has signed, each signer
gets the signed PDF with a certificate page that lists who signed, when, from
where and the fingerprint of the document.

## Who can change what

| Permission         | What it allows                                                                 |
| ------------------ | ------------------------------------------------------------------------------ |
| `view_documents`   | Open the screen, every document, who signed it and when, and download it       |
| `manage_documents` | Send documents, remind, change a signer, withdraw, countersign, edit templates |

Somebody with only `view_documents` sees everything, without the buttons that
change something. A role that held every permission when the screen arrived was
given both.

## The documents

The list shows every document you sent, the newest first: its title and
template, how many of its signers have signed, where it stands, when it went out
and when it expires or ended. Search finds a document by its title, by the name
or email address of a signer, or by its id (`sreq_...`). Filter by status, by
template, and by whether it is attached to a person. The counts in the header
show what waits for somebody else and what waits for you, and clicking one
filters the list.

A document is one of these:

| Status           | What it means                                                       |
| ---------------- | ------------------------------------------------------------------- |
| Sent             | Out for signing, nobody has signed yet                              |
| Partially signed | Some signers have signed, the rest have not                         |
| Completed        | Everybody signed. The signed PDF is ready and can no longer change  |
| Declined         | A signer refused, which closes it for everybody                     |
| Withdrawn        | You withdrew it before everybody signed                             |
| Expired          | It ran past its expiry date before everybody signed                 |

Opening a document shows three tabs.

- **Signers**: everybody on it in signing order, with their role, address and
  status, when they were invited, opened it and signed, how often they were
  reminded, and a reason when they declined. Remind sends somebody their link
  again. Change gives a signer who has not signed yet another name or address:
  their old link stops working and the new address gets a fresh invitation.
- **Document**: the pages exactly as they were sent, the values you filled in,
  and the fingerprints (SHA-256) of the sent and the signed file.
- **History**: every step, from created and sent to signed or withdrawn, with who
  did it, the IP address and the device. This is the same evidence the
  certificate page prints.

Withdraw closes a document that is still open and asks for a reason, which only
your team sees. Somebody who opens their link afterwards reads that it was
withdrawn. A completed document cannot be withdrawn: send a new one instead.

## Signing order and countersigning

Every role has a number. Everybody with the lowest number signs first, and
signers with the same number sign at the same time. The next number is invited
only when everybody before it has signed.

When it is your own turn, the document opens with **Sign** at the top. You sign
right there, without the mailed link, and the evidence records your account
rather than a link. Signing goes the same way as for anybody else: agree to sign
electronically, fill in your fields, then type or draw your signature.

## Sending a document

**New** opens the form beside the list. Start from a template or upload a PDF.

- **From a template**: pick the template, then put a person in every role, by
  name and email address or by searching your team and traders. Your own role is
  filled with you. Fill in the values the template asks for, such as a
  commission or a start date. They become part of the text everybody signs.
- **From a PDF**: upload the file, add the signers in their order, and place each
  signer's fields on the pages by clicking where they go. A form the PDF already
  contains is removed when it is sent, so place the fields again.

Then add a message for the mail if you like, pick when it expires (30 days unless
you choose otherwise, at most a year) and, if you want, how often reminders go
out on their own. **Send** freezes the document: from then on its pages and
fields cannot change, and every signer reads exactly the same file.

A signer picked from your people is linked to their account while the address is
theirs. The document is then attached to that person.

## Templates

**Templates**, from the header of the list, holds the documents you send again
and again. A template is written in the editor or uploaded as a PDF, and has:

- **Roles**: a place for each signer, such as Trader and Firm, with its signing
  order and which one is yours.
- **Fields**: what a role fills in, as a signature, initials, their name, the date
  signed, text, a tick box or a choice from a list. In a written template a field
  is the token `[[key]]` in the text. In a PDF you place it on the pages.
- **Variables**: what you fill in when sending, written `{{key}}` in the text or
  placed on the PDF.

The editor refuses a template that does not fit together: a token in the text that
is not defined, a field or variable that never shows, or a role with nowhere to
sign. Every change to the text, the PDF, the roles, the fields or the variables
raises the version. A document that was sent keeps its own copy, so changing,
archiving or deleting a template never touches a document already sent.
Archiving hides a template from the form without deleting it.

## Notifications

Whoever sent a document hears in the notification bell and on the phone app when
somebody signs it, when everybody has signed, and when somebody declines. A
decline and a document that expires also arrive by mail. Each can be switched off
under Notifications in the settings.

## Errors

| Message                             | What happened                                                              |
| ----------------------------------- | -------------------------------------------------------------------------- |
| `403 forbidden`                     | You lack `view_documents`, or `manage_documents` for what you tried        |
| This document is no longer open     | It was completed, declined, withdrawn or expired while you looked at it   |
| It is not your turn to sign         | Somebody earlier in the signing order has not signed yet                  |
| The PDF cannot be read              | The file is encrypted, damaged or empty. Save it again as a normal PDF    |