Legal & Operations ← All use cases

Service contracts

Auto-generate client contracts the moment a deal closes. Conditional clauses, custom terms per tier, and automatic delivery to Google Drive or Dropbox ”” no manual steps.

The problem

Contracts shouldn't sit in a queue waiting for someone to generate them

Legal reviews the template once. After that, contracts are largely mechanical ”” fill in the client name, the tier, the start date, attach the right appendix. But "mechanical" doesn't mean it happens automatically: someone still has to open the template, copy in the data, export to PDF, and email it.

That delay ”” sometimes hours, sometimes days ”” sits between a won deal and a signed contract. PDFox generates the document the moment your CRM fires the webhook, with the right conditional sections already resolved.

How it works

From CRM event to signed contract in three steps

1

Build the contract template

Design your contract in the PDFox visual editor. Use Handlebars {{#if}} blocks for tier-specific clauses, optional appendices, and jurisdiction-dependent terms. Legal reviews and publishes.

2

Trigger on CRM event

Wire a webhook from your CRM to a small Express handler (or serverless function). When a deal closes, POST the client data and contract parameters to PDFox. The PDF renders immediately.

3

Deliver automatically

Configure the PDFox integration to deliver completed PDFs to a Google Drive folder or Dropbox path. Attach the document link back to the CRM deal record for your sales team.

Webhook handler · Node.js / Express

// Express webhook ”” fires when a CRM deal is marked "closed-won"
app.post('/webhooks/crm/deal-closed', async (req, res) => {
  const { dealId, clientName, address, tier, terms } = req.body;

  const { data } = await axios.post(
    'https://api.pdf-fox.com/v1/generate',
    {
      templateId: 'tpl_service_contract',
      data: {
        client: { name: clientName, address },
        contract: {
          tier,          // controls {{#if premium}} blocks in template
          terms,
          startDate: new Date().toISOString().slice(0, 10),
          reference: `CTR-${dealId}`,
        },
      },
    },
    { headers: { Authorization: `Bearer ${process.env.PDFOX_API_KEY}` } }
  );

  // data.jobId ”” poll or use webhook_url for completion
  await crm.attachNote(dealId, { contractJobId: data.jobId });
  res.json({ ok: true });
});

The template handles conditional rendering ”” your webhook only sends the data. Add webhook_url to the request body to receive a completion event with the signed download URL.

Why teams choose PDFox

Legal control, operations speed

Conditional Handlebars blocks

Show or hide entire contract sections based on client tier, region, or service type ”” all resolved at generation time from the data you send. No copy-paste variants.

Auto-delivery to cloud storage

Connect Google Drive or Dropbox in Settings once. Completed contracts land in the right folder automatically ”” no manual download and re-upload steps.

Published vs draft versioning

Legal can update the template in draft without affecting live generation. Publish only when the new version is approved ”” agents and webhooks always use the published version.

Ready to build this?

Free tier included. No card required. Start generating contracts in minutes.