Skip to main content

Custom Integration Patterns

Start with the SpotDraft integrations catalog if a native connector already covers the use case. Use this page when you are building on the public API.

This guide describes a common integration pattern. Confirm the exact behavior for your workspace in the API reference. Native Salesforce, HubSpot, and similar connectors are configured in the product. The pages in this portal describe custom API builds.

Shared production pattern​

  1. Persist your system's ids in external_metadata. Do not use contract title as the join key.
  2. Create or update the contract through the public API when the upstream record is ready.
  3. Subscribe to webhook events for later lifecycle activity.
  4. On each event, verify the signature, return 2xx quickly, and fetch fresh contract, metadata, or document state when downstream systems need an authoritative record.
  5. Run a scheduled reconciliation job to repair missed or delayed processing. Reconciliation is not a substitute for webhooks.

APIs initiate and hydrate. Webhooks signal change. Follow-up GETs fill in the record.

Where the pattern shows up​

Upstream or downstreamTypical job
CRMCreate a contract from a deal or account milestone; write status and a SpotDraft link back to the CRM record.
ERP / procurementCreate or import contracts from vendor or PO records; sync execution and documents back to finance.
CPQGenerate an agreement from quote data after the quote is approved.
Document storageCopy executed files and versions into a repository you control.
Data warehouseLand contract, metadata, and status snapshots for reporting.
Batch / migrationPage through historical records, checkpoint progress, and resume without duplicate side effects.

For webhook verification, retries, and event types, use Webhooks. For an end-to-end create-and-sync flow, use Generate Contracts and Sync Data Back.

What to persist​

At minimum:

  • the upstream record id (account, deal, vendor, quote, or request)
  • the SpotDraft contract id
  • contract type or template ids your workspace requires

Isolate QA and production credentials, hosts, and webhook URLs.