How to auto-populate contracts from Salesforce opportunity data
By Monica Talbert, Solutions Architect. Published November 2026.
What is the fastest way to auto-populate contracts from Salesforce?
To auto-populate contracts from Salesforce opportunity data, map each value in your contract template to a field on the opportunity or a record it looks up, such as Amount, Account.Name or Owner.Email, then send from the record. With TurboSign for Salesforce, an admin builds that mapping once per contract type. A rep clicks Send for Signature, checks the filled values, previews the contract and sends it, and the signers come from the record too. The app is free and MIT licensed, and 5 signatures a month are free.
This page covers contracts and agreements: order forms, MSAs, NDAs and SOWs that need a signature. If you are building sales proposals instead, see Salesforce proposal automation.
Can Salesforce fill a contract from opportunity fields automatically?
Not on its own. Salesforce stores the deal, but turning those fields into a signed contract takes a document tool that reads the record. The usual workaround is a rep copying the account name, amount and contact into last month's contract, then typing the same names and emails again into a signature tool. That is two chances to get it wrong on every deal.
TurboSign for Salesforce adds a Send for Signature button to Salesforce records, starting with Opportunity. Behind the button is a document setup: which TurboDocx template to use, which field fills each value, who signs, and where each person signs. Admins build setups in a no-code builder on the TurboSign Setup tab, and the builder suggests a matching field for each value in the template. Before reps see it, the admin can run the setup against a real record. Setups are saved as custom metadata, so they move from a sandbox to production like the rest of your configuration.
If your intake form already writes into Salesforce fields, those fields are what the contract reads. The record is the single source for both the contract and the signers.
Which Salesforce fields can a contract pull from?
Any field on the opportunity the sending user can read, plus fields on records the opportunity looks up, written as a path such as Account.Name or Owner.Email. Standard and custom fields both work, and so do custom lookups, for example a Contact__r lookup to the customer contact.
A few limits are worth knowing before you design the template:
- Paths follow lookups up from the record. Related lists, such as opportunity contact roles or opportunity products, are not read.
- Field-level security applies. A value comes from a field only if the user sending can read it.
- Currency, number and date fields are formatted for the sender's locale and the record's currency, and an admin can set one date format for the whole document.
How do you map template fields to opportunity and account data?
Start from your approved contract in Word, with a placeholder wherever a deal value goes. In the document setup, pick the template, choose Opportunity as the source object, and map each placeholder to a field path. Then add the signers, set their order, and place the signing spots. The builder's anchor check confirms each signing spot lands where it should in the document.
Here is a worked example: an order form sent from an opportunity.
| In the order form | Filled from | Notes |
|---|---|---|
| {CustomerName} | Account.Name | The account on the opportunity |
| {OrderTotal} | Amount | Formatted as currency for the sender |
| {StartDate} | CloseDate | Formatted as a date |
| Customer signer (order 1) | Contact__r.Name and Contact__r.Email | A custom Contact lookup on the opportunity |
| Countersigner (order 2) | Owner.Name and Owner.Email | The opportunity owner |
| Document name | Order Form - {Account.Name} - {date} | One name pattern, filled per record |
On an opportunity for Acme with an amount of 48,000 dollars, the rep clicks Send for Signature and picks Order Form. The contract arrives already named for Acme, with the total shown as currency. The Acme contact signs first, then the opportunity owner countersigns. The same setup works for an MSA or an NDA: swap the template and the mapping, keep the signers.
What happens if a field is empty?
Each value and each signer is marked required or optional in the setup, and the app treats them differently when the record has a gap:
A required value is empty
The send stops before anything goes out, with a message naming the value, so the rep can fill in the field or the admin can mark the value optional.
An optional value is empty
That spot in the contract renders empty, or the admin can give the value a default to use instead.
A required signer has no email
The send stops and says which signer is missing an email.
An optional signer has no email
That signer is skipped, the signing order closes the gap, and everyone else still signs in order.
Optional signers suit contracts with a second party that only some deals have, such as a guarantor or a second customer signer.
How do you send the filled contract for signature?
- The rep clicks Send for Signature on the opportunity and picks the document setup, for example Order Form.
- The send window lists every value and signer filled from the record, with where each one came from. The rep corrects anything that needs it.
- The rep previews the finished contract with their edits applied, then clicks Send.
- Signers get the contract in order, verify by email code if your organization requires it, and sign in the browser or on their phone. Use email codes: the app sends no phone numbers, so a send fails if your default code method is text message.
- When everyone has signed, the signed PDF and audit trail are saved to the opportunity’s Files and an optional field update runs, such as Stage to Closed Won. That write-back is on the Pro plan and up.
How long does it take? In a real-time demo, going from Send for Signature on an opportunity to the signed copy back on the record and the deal at Closed Won took 1 minute 8 seconds, with one signer. Saving the signed copy and updating the stage is on the Pro plan and up.
Want no click at all? The app includes a Flow action, so a Flow can send the contract when an opportunity reaches a stage. See sending for signature from a Salesforce Flow, or the step-by-step guide to sending documents for signature from Salesforce.
Do you need to re-enter deal data in a separate signature tool?
No. Re-entering the same deal in your CRM and your signature tool is the problem this setup removes. The contract values and the signer names and emails are read from the opportunity when the rep sends, and on the Pro plan and up the signed PDF and audit trail come back to the same record. Nobody keeps two systems in step by hand, and the record shows the deal's signature status.
It also helps that the app lives in your org. The source is on GitHub under the MIT license, it works on Enterprise, Unlimited, Performance and Developer editions, and your TurboDocx API key is stored encrypted in a Salesforce Named Credential rather than in a field. The admin guide in the docs walks through building a document setup.
On cost, the app is free and 5 signatures a month are free. Salesforce sends count toward the 60 API signatures a month listed for Pro. API plans start at $0.30 per signature, with no minimums. Start on the free plan and pay only for the signatures you send beyond it, so a month with one extra signature costs $0.30. The pricing page has the full plans, and TurboSign covers the e-signature product itself.
Salesforce contract automation FAQ
Can I fill an order form or MSA from a Salesforce opportunity and send it for signature in one step?
Yes. With TurboSign for Salesforce, an admin builds a document setup once for each contract type, such as an order form, MSA, NDA or SOW. A rep clicks Send for Signature on the opportunity, picks the setup, reviews the values filled from the record, previews the finished contract and sends it. There is no export, upload or copy and paste between the two.
Can the opportunity owner countersign the contract automatically?
Yes. A signer can take their name and email from any field the record can reach, so Owner.Name and Owner.Email make the deal owner a signer. Give the customer signing order 1 and the owner signing order 2, and the owner countersigns after the customer. A fixed address, such as your legal team, works too.
Can the customer's contact be the signer?
Yes, through a Contact lookup field on the opportunity. The setup reads fields on the record and on records it looks up, so a lookup such as Contact__r with Contact__r.Name and Contact__r.Email gives you the customer signer. Opportunity contact roles are related lists, not lookups, so the setup can't read them directly.
Do I still have to re-enter deal data in a separate signature tool?
No. The contract values and the signers are read from the Salesforce record when the rep sends, so nobody retypes the account name, amount or signer emails into another tool. The rep can still correct any value in the send window before the contract goes out.
Will the contract amount show in the right currency format?
Yes. Currency, number and date fields are formatted for the sender's locale and the record's currency, so Opportunity.Amount reads as money in the contract rather than a raw number. An admin can also set one date format for every date in the document.
What does it cost to auto-populate and sign contracts from Salesforce?
The TurboSign for Salesforce app is free and open source under the MIT license, and 5 signatures a month are free. Saving the signed copy back to the record and updating the stage is on the Pro plan and up. Salesforce sends count toward the 60 API signatures a month listed for Pro. API plans start at $0.30 per signature, with no minimums. Start on the free plan and pay only for the signatures you send beyond it, so a month with one extra signature costs $0.30.
Related
E-signature for Salesforce
The TurboSign for Salesforce app: install, admin setup, security and plans.
Send documents for signature from Salesforce
A step-by-step guide to sending from any Salesforce record.
Send for signature from a Salesforce Flow
Send the contract automatically when an opportunity changes stage.
How to generate SOWs from CRM data
Turn the deal record into a statement of work without retyping it.
Sales automation guide
Where contract generation and signing fit in a wider sales workflow.
TurboSign e-signature
The e-signature product behind the app, with 5 free signatures every month.
Send your next contract from the opportunity
Install the free app, build one document setup for your order form, and send it from a real record.