Skip to content

Proposals and contracts

Two modules cover the step before invoicing: modules/contracts and modules/proposals. Proposals needs contracts and invoicing; contracts stands alone.

Staff write a contract in Markdown, or start it from a template under Contracts > Templates. {client}, {business}, and {date} in a template are filled in when a contract starts from it. A contract stays a draft, editable and deletable, until it’s sent. Sending locks its text and emails the client’s portal contacts a link.

The client signs in the portal by typing their full name and ticking a box that consents to signing and doing business electronically. Signing records:

  • the typed name, and the portal account (user and email) that signed
  • the time, the IP address (X-Forwarded-For is honoured only from trusted proxies), and the browser’s user agent
  • when the client first opened it, and who sent it
  • the SHA-256 of the title and body, so anyone can check the text wasn’t changed later

Every contact at the client is emailed a link to /contracts/{id}/print, the contract with its signing record, which prints or saves as a PDF. Staff see the same record on the contract page. A client can also decline, with an optional reason, and staff can withdraw a contract the client hasn’t signed.

This is a simple typed-name electronic signature with a consent step and an audit record, which is the kind ESIGN and UETA recognise for most service agreements. It isn’t a certificate-based digital signature and doesn’t verify identity beyond the portal login (and its 2FA, where the role requires it). Contracts that need a witness, a notary, or identity verification belong in a dedicated signing service.

A proposal is a Markdown scope, optional pricing lines, an optional contract for the same client, an expiry date, and how many days the invoice gets once accepted. It stays a draft until sent.

Sending it:

  • creates an invoicing quote for the pricing, with answer_url pointing at the proposal, so the client answers the quote only through the proposal and invoicing doesn’t email it separately
  • sends a draft contract along with it, without its own email
  • emails the client one link to the proposal

The client reads the proposal, the pricing, and the contract on one page and accepts with a typed-name signature. Accepting signs the contract (if it isn’t signed yet) and accepts the quote, which issues the invoice. With Stripe installed, Stripe then sends that invoice as usual. Declining declines the quote and the unsigned contract too, and withdrawing withdraws both.

Catalog event When
contracts.contract_sent A contract went to a client, on its own or with a proposal
contracts.contract_signed A client signed; signer_name, signer_ip, document_hash are in the payload
contracts.contract_declined A client declined, with decline_reason
proposals.proposal_sent A proposal went to a client
proposals.proposal_accepted A client accepted; the payload has proposal, contract (or null), and invoice (or null)
proposals.proposal_declined A client declined, with decline_reason

Agents can be triggered by contracts.contract_signed, contracts.contract_declined, proposals.proposal_accepted, and proposals.proposal_declined. AI tools: contracts_list_contracts, contracts_get_contract, contracts_list_templates, contracts_draft_contract, contracts_send_contract, proposals_list_proposals, proposals_get_proposal, proposals_draft_proposal, and proposals_send_proposal. The draft tools only save drafts, so an agent can prepare a proposal for a person to review.

contracts.contracts.view, contracts.contracts.manage (write, send, withdraw, and templates), proposals.proposals.view, and proposals.proposals.manage.