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
- Persist your system's ids in
external_metadata. Do not use contract title as the join key. - Create or update the contract through the public API when the upstream record is ready.
- Subscribe to webhook events for later lifecycle activity.
- On each event, verify the signature, return
2xxquickly, and fetch fresh contract, metadata, or document state when downstream systems need an authoritative record. - 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 downstream | Typical job |
|---|---|
| CRM | Create a contract from a deal or account milestone; write status and a SpotDraft link back to the CRM record. |
| ERP / procurement | Create or import contracts from vendor or PO records; sync execution and documents back to finance. |
| CPQ | Generate an agreement from quote data after the quote is approved. |
| Document storage | Copy executed files and versions into a repository you control. |
| Data warehouse | Land contract, metadata, and status snapshots for reporting. |
| Batch / migration | Page 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.