## Overview

A contract usually has two sides: the **contracted party** (your issuing company) and the **external
signers** (the customer and other parties). In VL2A Chat:

- **Internal signing** is the contracted company's electronic approval, recorded on the server.
  This act does not apply a certificate to the PDF and is not classified as ICP-Brasil authentication.
- **External signing** is done by the signers through a secure **public page**, with no need to sign
  up or log in.

The displayed levels are **simple**, **advanced** and **qualified**. Authentication is configured
per signer: a representative configured with **OTP** must still verify it. In qualified mode, the
issuing company's certificate is applied to the **final PDF** after the signing acts; the document
seal does not prove that external signers used certificates.

## Prerequisites

- Contracts module **enabled** and a contract generated from a template.
- A registered **issuing company** (for the auto-signature). For the qualified level, it needs a valid
  **A1 certificate**.
- To send the link to external signers, a native channel (**WhatsApp** or **email**) and the signers'
  **contact details**.

## Step by step

1. On the contract, define the **signers** (the contracted party and the external signers).
2. Choose the **signature level** (simple, advanced or qualified).
3. **Send for signature**: each external signer receives, **in their own conversation**, a card with
   the contract summary, the **signing link inside the message text** and the **PDF attached**. On the
   channels that support it, the link also shows up as a button. When a signer only has an e-mail
   address, the invitation goes out by e-mail with the same link and the same PDF. A signer who confirms
   identity with a **WhatsApp code** always gets the invitation **on WhatsApp**: with no linked
   conversation, it is opened on the WhatsApp inbox chosen in the contract message settings (or the
   account's only WhatsApp inbox). When that is impossible — no phone, several inboxes and none chosen, or
   a Cloud number with no approved template to open a conversation outside the 24-hour window — the send
   is refused with the reason; the invitation is never moved to e-mail. The send result reports the real
   channel used for each signer.
   The template rule applies to **every** verification method: if a signer's invitation (e-mail code or no
   code) would open a new conversation on a Cloud number without the approved “Send contract” template,
   the send — and the reminder too — is refused with that explanation and no message is written. To fix
   it, choose the template in the contract message settings or, on the draft, pick an existing
   conversation with the contact under **Delivery conversation**.
4. If the contract has an **automatic company approval**, it follows the permissions described below.
5. Each signer who uses the **public page**, including an explicitly added representative of the contracted party, reviews and signs through their own link and authentication method.
6. At the **advanced** level, the signer validates an **OTP code** and records a **visual signature**
   (drawn, typed or uploaded as an image).
7. Once the signing acts are complete, the system generates and stores the **final PDF**; qualified mode also applies and verifies the certificate seal before confirming completion.

## Settings & options

- **Signature levels**:
  - **Simple** — consent with capture of IP, date/time and device.
  - **Advanced** — OTP by email/WhatsApp + visual signature (drawn, typed or uploaded).
  - **Qualified** — application of the issuing company's certificate to the final PDF, separate from the signers' acts.
- **OTP delivery channel**: set per signer. A signer configured for **e-mail OTP** gets the code at
  their registered address; one configured for **WhatsApp OTP** gets it in their own conversation. If
  the configured channel is unavailable the system tries the other one before giving up — and when
  neither exists it says so instead of treating the delivery as done.
- **Individual link**: every signer has their own link, valid only for them. A signer never receives
  another party's link.
- **Auto-signature**: follows the **company signature** mode (see below); its event records the method actually used and the rule that authorized it.
- **Order and multiple signers**: define who needs to sign.
- **Time-stamp (TSA)**: optional; requested from the configured service when signing the PDF. Without configuration, there is no time-stamp.
- **Audit trail**: records date/time, method and consent, with the available context of the act and its document link. SHA-256 identifies document bytes, not a time-stamp.

### Each signer's method and history

An explicitly added representative uses their own signing link; if configured with OTP, they keep that requirement. A link configured for
certificate authentication that it cannot verify is refused with a clear message; the requirement
is not removed automatically. Recording a new approval does not reclassify signed acts or rewrite
previous events and PDFs.

### When the AI agent sends the contract

This policy applies only to the **automatic company approval**, when that automatic signer exists on the contract. An explicitly added representative of the contracted party follows their own link and authentication; sending the contract, by a person or bot, does not automatically sign on their behalf.

When a person sends, the existing automatic approval is recorded in the same step. For an AI agent's send, that approval depends on the options in **Contracts > Settings > AI agent**:

- The bot only sends if the account allows it, and only to the contact of the conversation it is
  handling. It never sends by e-mail, into another conversation or by opening a new conversation: in
  those cases a person must send.
- By default, the bot **does not sign for the company**. The contract reaches the customer and shows
  as **waiting for the company signature**. To complete it, open the contract, click **Sign for the
  company** and confirm. This can happen before or after the customer signs.
- If the account turns on automatic company signing, the bot's send also signs for the company. The
  audit trail records that the AI agent made the send and that the signature was authorized by the
  account setting.

### Who signs for the company (company signature)

Under **Contracts > Settings > Company signature** you choose who signs for the issuing company on new
contracts. Each **issuing company**, each **template** and each **draft contract** can **inherit** that
default or choose its own; the screen shows where the value comes from ("Inherited from…") and offers
**Restore default**. The order is: contract → template → issuing company → account.

| Mode | What happens |
|---|---|
| **Automatic (as before)** | The default. The company signs by itself when the contract is sent; qualified contracts are sealed with the A1 certificate and the others are signed electronically, without a certificate. |
| **Automatic with A1 certificate** | The company signs by itself and the final PDF is sealed with its A1 certificate, on any tier. It can only be chosen with a valid certificate; without one, the send is refused with the reason. |
| **Automatic electronic signature, no certificate** | The company signs by itself, electronically. The audit trail records who authorized it and when, with IP "server" and no certificate seal. |
| **A representative signs for the company** | Nothing is automatic: the person representing the company signs through their own link and the contract's verification (e-mail or WhatsApp code), like any signer. |
| **The company does not sign** | Only the other parties sign. |

- The document, the audit trail and the screen always describe **what really happened**: "digital
  certificate" only appears when the company's certificate sealed the PDF and the signature was
  verified. An automatic signature without a certificate appears as the **automatic electronic
  signature of the company**.
- On a draft, the company party can be **edited** and **removed** in the signer list. While it signs
  automatically, only its name, e-mail and phone change; to require a code, switch the mode to
  representative. Removing the automatic party is the same as choosing "The company does not sign".
- The mode is **frozen at the first send**: later changes to the account, company or template do not
  affect contracts already sent. Contracts sent before this option existed stay as they were.
- Through the API and the AI agent, the `company_signature_mode` field accepts the same values
  (`automatic`, `auto_certificate`, `auto_electronic`, `representative`, `none`); empty means inherit.

## Use cases

- A customer signs over **WhatsApp** with **OTP** in a few taps, installing nothing.
- An operation requires the final PDF to be sealed with the issuing company's certificate.
- A contract with **automatic company approval** follows the account policy and waits for the parties who sign through their own links.

## Tips, limits & best practices

- Choose the authentication method required for each party; the company's certificate does not replace a representative's OTP.
- Make sure the signers' **contact details** are correct so the link is delivered.
- In qualified mode, check the selected issuing company's certificate, password and validity dates. The level name and visual seal do not establish trust in the ICP-Brasil chain.
- Track the contract's **status** — it shows who has signed and what's still pending.

## Troubleshooting

- **The send was refused**: when a signer has neither a phone number nor an e-mail address, the
  contract is **not sent** and the error names who has no destination. Complete the details and send
  again — the contract stays a draft until the send actually happens.
- **The signer didn't get the link**: confirm the channel and contact details; resend if needed.
- **The OTP code doesn't arrive**: check **that signer's** email/WhatsApp (the code goes to the
  channel configured on them, not to the contract's conversation) and resend.
- **The required PDF seal failed**: check the issuing company's certificate file, password and validity dates. The system reports the failure instead of completing with a new PDF without the required seal.
- **The audit IP shows as "unverified"**: the request came through a proxy or CDN the installation has not declared, so the recorded address may be the proxy's and not the signer's. Whoever runs the installation should list that proxy's ranges in `TRUSTED_PROXIES`; from then on, new events record the real IP. Older events are not rewritten.
- **The contract won't complete**: check that **all** signers have signed.

## See also

- [Contracts & E-signature overview](/hc/ajuda/articles/contracts-esignature-overview-en)
- [Issuing companies and the A1 digital certificate](/hc/ajuda/articles/contracts-esignature-empresas-emissoras-certificado-a1-en)
- [Templates, variables and auto-fill](/hc/ajuda/articles/contracts-esignature-templates-variaveis-auto-fill-en)
- [Public contract page and validator](/hc/ajuda/articles/contracts-esignature-pagina-publica-e-validador-en)