Ironclad integration
Connect Ironclad with OAuth, import contracts, configure webhooks for automatic sync, and map fields in both directions between Ironclad and Contracts.ai.
Contracts.ai can import contracts from Ironclad, keep them in sync via webhooks, analyze documents with AI, and push enriched metadata back to Ironclad when field mappings are configured.
Open Admin → Integrations tab → Ironclad to manage the connection. After you connect, the panel has three tabs:
| Tab | Purpose |
|---|---|
| Connection | OAuth credentials, import options, webhooks, and selective import |
| Outgoing Field Mapping | Map Contracts.ai fields → Ironclad fields (for push sync) |
| Incoming Field Mapping | Map Ironclad fields → Contracts.ai fields (applied on import) |
Safe to connect first: Connecting to Ironclad does not automatically import contracts. You can verify the connection, configure mappings, and choose when data flows into Contracts.ai.
Prerequisites
- An Ironclad admin who can create API apps under Company Settings → API
- A Contracts.ai organization administrator
- (Optional) Webhook scopes if you want automatic sync when workflows complete in Ironclad
How to set up the Ironclad OAuth app
- In Ironclad, go to Company Settings → API and click Create new app. Name it Contracts.ai (or similar).
- Copy the Client ID and Client Secret from Ironclad. They are only shown once in Ironclad, so save them before leaving the page.
- In the Ironclad app settings, set Grant Type to Client Credentials and add these scopes:
| Scope | Why it's needed |
|---|---|
public.records.readRecords | Fetch and display your Ironclad contracts |
public.records.createRecords | Create new contract records in Ironclad |
public.records.updateRecords | Update contract metadata and fields |
public.records.createSmartImportRecords | Import existing contracts via Ironclad Smart Import |
public.records.readAttachments | Download contract documents for analysis |
public.records.createAttachments | Upload processed documents back to Ironclad |
public.records.readSchemas | Read record schemas to map fields correctly |
public.records.applyContractAction | Trigger workflow actions on contracts |
public.webhooks.createWebhooks | Register webhooks for automatic contract syncing |
public.webhooks.readWebhooks | Check existing webhooks to avoid duplicates |
public.webhooks.updateWebhooks | Update webhook endpoints when reconnecting |
public.webhooks.deleteWebhooks | Clean up webhooks when disconnecting |
Webhook scopes are only required for Automatic Sync (Webhooks). You can add them later in Ironclad and reconnect in Contracts.ai if you start without them.
- In the Contracts.ai Connection tab, enter:
- Client ID
- Client Secret
- Ironclad User Email — the email associated with your Ironclad account (used for API context)
- Region — match your Ironclad instance:
- North America 1 (
na1) - North America 2 (
na2) - Europe (
eu) - Australia (
au) - Demo (
demo)
- North America 1 (
- Click Connect to IronClad.
When connection succeeds, you’ll see IronClad connected successfully! with connection details (user email and region).
Connection tab — importing contracts
After connecting, use the Connection tab to control how contracts enter Contracts.ai.
Bulk import
Use Import Contracts to start a background import of Ironclad records.
Optional filters (apply before clicking import):
- Import Limit — cap how many contracts are imported (e.g.
10,25,50). Leave blank to import all matching records. - Record Types — check one or more Ironclad record types to include. Leave all unchecked to import every type.
Imports run in the background. Contracts appear in your contracts list after processing and AI analysis complete (may take several minutes depending on volume).
Search & import specific contracts
Use Browse & Select Contracts to cherry-pick individual records:
- Open the search dialog.
- Search by name, type, status, or record ID.
- Paste multiple IDs (one per line or comma-separated) to look up specific records at once.
- Select the contracts you want and click Import Selected.
Search index (recommended for large repos):
- The dialog shows whether a local index has been built.
- If the index is not built, searches query Ironclad live and may be slower.
- Click Build Index (or Re-sync after a prior build) to index your Ironclad records for faster search. Indexing runs in the background and may take a few minutes for large repositories.
Automatic sync (webhooks)
If you included the webhook scopes when creating the Ironclad app:
- On the Connection tab, find Automatic Sync (Webhooks).
- Click Enable Automatic Sync to register webhooks with Ironclad.
- When active, new or updated contracts can sync automatically when workflows complete in Ironclad—without a manual import.
You can Remove Webhook later to disable automatic sync. If you initially connected without webhook scopes, add them in Ironclad, then reconnect and enable automatic sync.
Outgoing Field Mapping (push to Ironclad)
Use Outgoing Field Mapping to define how Contracts.ai metadata is written back to Ironclad when you sync a contract.
Set up outgoing mappings
- Go to Admin → Integrations → Ironclad → Outgoing Field Mapping.
- Select an Ironclad Record Type.
- Click Load Field Suggestions to load field IDs seen on existing Ironclad records for that type. You can also type Ironclad field IDs directly.
- Create mappings:
- Your Field (Contracts.ai standard or custom metadata) → Ironclad Field
- Set the Ironclad field type when needed to avoid type-mismatch errors on sync (String, Date, Boolean, Number, Monetary, Duration).
- Optionally expand Regex transform to pattern-match and reshape values before sending to Ironclad.
- Click Add Mapping for each row.
- (Optional) Click Suggest with AI after loading field suggestions—AI proposes mappings you can review and edit.
- Click Save Mappings.
Outgoing mappings are required before you can push data from a contract back to Ironclad.
Incoming Field Mapping (import from Ironclad)
Use Incoming Field Mapping to copy Ironclad record properties into Contracts.ai fields when records are imported or synced from Ironclad.
Set up incoming mappings
- Go to Admin → Integrations → Ironclad → Incoming Field Mapping.
- Select an Ironclad Record Type.
- Click Load Field Suggestions.
- Create mappings:
- Ironclad Field → Your Field (standard or custom)
- Set Type when needed.
- Override AI — when enabled, the mapped Ironclad value takes precedence over AI extraction for that field on import/sync.
- Click Add Mapping for each row.
- Click Save Mappings.
Incoming mappings are applied automatically during Ironclad import and webhook sync. If you newly enable Override AI on a mapping, Contracts.ai can back-fill that field on existing Ironclad-imported contracts in the background.
Regex transforms (outgoing and incoming)
Both Outgoing Field Mapping and Incoming Field Mapping support an optional Regex transform on each mapping row. Regex runs after the source value is read and before it is written to the target field or sent to Ironclad.
Regex uses Python-style re.sub: the Pattern is searched in the source string, and matches are replaced with the Replacement string.
Where to configure it
| Direction | Tab | UI location |
|---|---|---|
| Outgoing (Contracts.ai → Ironclad) | Outgoing Field Mapping | Expand Regex transform under a mapping row |
| Incoming (Ironclad → Contracts.ai) | Incoming Field Mapping | Expand Regex transform under a mapping row |
If Pattern is empty, the value is left unchanged (no transform).
Fields
| Field | Description |
|---|---|
| Pattern | Regular expression to match (required for the transform to run) |
| Replacement | Text to substitute for each match. Use capture groups with $1 or \1 |
| Flags | Optional: i = case-insensitive, s = dot matches newlines, m = multiline |
Outgoing transforms (push to Ironclad)
When you Sync to Ironclad, Contracts.ai:
- Reads the value from your Contracts.ai field.
- Applies the row’s transform (if configured).
- Sends the result to the mapped Ironclad property.
Regex (outgoing)
Use when the Contracts.ai value needs cleanup or reshaping before Ironclad accepts it.
Example — extract a numeric amount from payment terms:
- Your Field:
payment_terms - Ironclad Field:
contractValue - Pattern:
USD\s*([\d,.]+) - Replacement:
$1 - Flags:
i
If payment_terms is "USD 1,250,000 per year", Ironclad receives 1,250,000.
Automatic date formatting (outgoing only)
When you map a date Contracts.ai field to Ironclad, the UI may auto-apply a date format transform (YYYY-MM-DD) instead of regex. You can still switch a row to regex if you need custom parsing.
Other outgoing transforms (backend)
The push pipeline also supports transforms such as value mapping and duration parsing, but the admin UI exposes regex explicitly on each row. Date fields get automatic date formatting when appropriate.
Invalid patterns
If the pattern is invalid, the sync logs a warning and sends the original string unchanged (sync does not fail solely because of a bad regex).
Incoming transforms (import from Ironclad)
When a record is imported or synced from Ironclad, Contracts.ai:
- Reads the Ironclad property value.
- Normalizes it (e.g. unwraps structured Ironclad values to a scalar).
- Applies Regex transform if Pattern is set.
- Coerces the result to your target field type (standard or custom).
- Writes to the mapped Contracts.ai field (when Override AI is enabled for that row, or on a forced re-apply).
Regex (incoming)
Use when the raw Ironclad value must be cleaned before it fits your field.
Example — strip a currency prefix from an Ironclad monetary field:
- Ironclad Field:
annualContractValue - Your Field: custom field
budget_code - Pattern:
^[A-Z]{3}\s* - Replacement: `` (empty)
- Flags:
i
Override AI and regex
Incoming mappings only write on import/sync when Override AI is on for that row (unless an admin force-applies mappings to an existing contract). Regex runs as part of that write path—it does not change AI analysis itself; it changes what gets stored from Ironclad when the mapping applies.
Tips
- Test regex on one contract before saving org-wide mappings.
- Use Flags →
iwhen matching text regardless of case. - Use capture groups when Ironclad stores extra text around the value you need.
- For outgoing sync, set the Ironclad field type correctly; regex output must still match what Ironclad expects (string, number, date, etc.).
- Clear Pattern to disable the transform without deleting the row.
Quick reference
| Outgoing | Incoming | |
|---|---|---|
| Runs when | Sync to Ironclad | Import / webhook sync (and bulk re-apply for new Override AI rows) |
| Source | Contracts.ai field value | Ironclad property value |
| Config keys | pattern, replacement, flags (under Regex transform) | Same |
| Also auto-applied | Date format on date source fields | — |
| If pattern invalid | Original value sent unchanged | Original normalized value used unchanged |
Pushing data back to Ironclad
After outgoing field mappings are saved, users with the right permissions can push enhanced metadata from Contracts.ai to Ironclad.
Permission required
Users need the Sync to Source System permission (sync_to_source) to see and use the sync action on contract details.
How to sync a contract
- Open a contract that was imported from Ironclad (linked via
ironclad://source identity or an Ironclad source URL). - Click Sync to Ironclad in the contract toolbar (or overflow menu on smaller layouts).
- Contracts.ai builds a payload from your outgoing field mappings and updates the corresponding Ironclad record.
- The UI shows sync status and when the last push occurred (success or warning).
If mappings are missing or no fields resolve, sync returns an error asking you to configure Outgoing Field Mapping first.
Note: Sync pushes metadata fields configured in outgoing mappings. It does not replace the full Ironclad workflow; it updates mapped properties on the linked record.
Disconnecting Ironclad
On the Connection tab, click Disconnect to remove the Ironclad connection and clean up webhooks (when configured).
- Already-imported contracts remain in Contracts.ai.
- OAuth credentials are removed from the integration.
- Field mapping configuration may be retained in your organization settings—verify behavior after disconnect if you plan to reconnect.
Typical workflows
Test connection, then import a small batch
- Connect with OAuth (no import yet).
- Set Import Limit to
10. - Click Import Contracts and verify contracts appear and analyze correctly.
- Configure Incoming Field Mapping if you need Ironclad properties on custom fields.
- Scale up with bulk import, record-type filters, or webhooks.
Keep Ironclad and Contracts.ai metadata aligned
- Configure Incoming Field Mapping so imports populate key fields from Ironclad.
- Let AI analysis enrich the contract in Contracts.ai.
- Configure Outgoing Field Mapping for fields you want written back.
- Users with Sync to Source System permission push updates with Sync to Ironclad.
Large repository: selective import
- Build Index in the search dialog.
- Search or paste record IDs.
- Import only the contracts you need.
Troubleshooting
| Issue | What to check |
|---|---|
| Connect fails | Client ID/secret, region, and Client Credentials grant type in Ironclad |
| No record types in dropdown | Connection scopes include readSchemas / readRecords; reconnect after fixing scopes |
| Import started but no contracts | Background job still running; check import limits and record-type filters |
| Slow search | Build or re-sync the search index |
| Webhooks not firing | Webhook scopes added in Ironclad; Enable Automatic Sync shows Active |
| Sync to Ironclad missing | User lacks Sync to Source System permission, or contract was not imported from Ironclad |
| Sync fails with mapping error | Complete Outgoing Field Mapping; verify Ironclad field IDs and types |
| Incoming values wrong | Review Incoming Field Mapping; use Override AI where Ironclad should win over AI |
Related settings
- Custom Fields — create targets for incoming mappings and sources for outgoing mappings.
- Field Label Customization — affects how field names appear in mapping UIs.
- Roles & Permissions — grant Sync to Source System to users who should push metadata to Ironclad.
- Contract Types / Gold Standard — Ironclad can also feed contract type reference data in separate admin workflows.
Summary
The Ironclad integration is a three-part setup: connect (OAuth), import (bulk, selective, or webhook-driven), and map fields in both directions. Outgoing mappings power Sync to Ironclad on individual contracts; incoming mappings populate Contracts.ai automatically when records arrive from Ironclad.
Did this answer your question?