Skip to main content

How to send documents for signature from a Salesforce record

Send a document for signature, which is stored as an attachment in a Salesforce record.

Updated this week

This workflow allows you to send a document for review, and then send it to a counterparty or client and receive a signed and completed copy directly in the Salesforce record.

Create a workflow

1. Open Salesforce and go to altaFlow Admin Tools.

2. Click Create workflow. The workflow setup wizard opens in a new tab.

3. Rename the workflow. In our case, we’ll name it Sign Agreement.

4. Click Add documents and select Document placeholder. This allows you to load the document stored in a Salesforce record.

Add fillable fields

Since the document stored in Salesforce may not have fillable fields, we’ll set it up so that we have the ability to add them. We’ll also add fields for the recipient to fill out.

1. Click the Add fillable field in the left panel under Fillable fields.

2. Select Field type > Signature. Since the document includes fields for both parties, use distinct field names. For example, use Company_signature for your side.

3. Check the Required field and Allow field drag & drop during signing checkboxes.

4. Click Add to add the field.

Repeat these steps for all required fields. For example, if you’re adding your name or date to the document. For the name, select Field type > Text; for the date — Date.

You also need to separately add fields for the recipient to fill out. They are added in the same way as described above, but the Field name for the corresponding recipient fields should be set to Signer name, Signer email, and Signer date.

5. Once all fields have been added, click Continue at the bottom.

Prepare the Variables document

This document will allow us to pull the name from Salesforce and insert it into the corresponding field in the document, as well as get the email address to which we’ll send the document for signature.

1. In the bottom left corner, click Documents.

2. Above the document list, click Add documents and select Form or survey in the panel on the right.

3. In the left panel, select Single line text. Name it, for example, “Client name”.

4. Select the Email field and name it Client email.

5. After adding the fields, click Continue at the bottom.

6. In the document list at the bottom left, rename the document to Variables.

Configure the workflow

Step 1. Initiator

The first step is the initiator, who will upload the document before sending.

1. Rename the first step to Initiator.

2. Click the gear icon to open step settings.

3. Go to Recipient, select Current user, then click Apply.

Step 2. Our signer

After the initiator launches the workflow, the document will be sent to an employee of our company. For example, this could be the CEO, on whose behalf the contract will be signed.

1. Click the plus icon and select Step.

2. Rename the step to Our signer.

3. Click the gear icon to open step settings.

4. Assign the fields this person will fill out. To do this, click the Assign fields button under Document placeholder.

5. From the list, select all fields intended for the company employee. In our case, these are: date, name, and signature. Click Assign.

6. Hide the Variables document from the employee. Next to the document name, click Manage document access, select Hide document, then click Apply.

7. Scroll up to Recipient. Under Send documents, select Email or phone.

8. In Email or phone, enter the recipient’s email address to which the document will be sent.

Step 3. Client

Once the document has been filled out and signed on the company’s side, it will be sent to the client for signature. To do this, create one more step.

1. Click the plus icon and select Step.

2. Rename the step to Client.

3. Click the gear icon to open step settings.

4. Assign the fields this person will fill out. To do this, click the Assign fields button under Document placeholder.

5. From the list, select all fields intended for the client. In our case, these are: date, name, and signature. Click Assign.

6. Hide the Variables document from the client. Next to the document name, click Manage document access, select Hide document, then click Apply.

7. Scroll up to Recipient. Under Send documents, select Email or phone.

8. In Email or phone, click the input field and then click +Data variable.

9. From the dropdown, select the Variables document and the Client email field.

10. If needed, customize the message for the recipient. For example, to insert the recipient’s name, click +Data variable above the message field, select the Variables document, and choose Client name.

11. Click Apply to save the step.

Add bots to import data and export completed documents

Now we’ll set up data import into the document that will be sent to the client using a bot. The key feature here is that we’ll use SOQL to filter and find specific contacts in an account by their title.

1. Go back to the Initiator step, click Bots on the step card, then click Add bot.

2. Select the Pre-fill from Salesforce records via SOQL bot.

3. Click Install bot. Select the Salesforce account to pull data from, then click Continue.

4. In Select and map data, enter the SOQL query. In our case, we’ll send the document to all contacts with the title Signer. Then click Update mapping.

Select Name, Email from Contact where AccountId = <<Record.Id>> and Title = 'Signer'

5. In Select type of data to pre-fill, select Single line.

6. Under Map object fields to document fields, map the fields for the client so their data is pulled in.

7. Click Continue.

8. Click Apply to save the step.

Step 4. Bot for sending the signed document to Salesforce

To send the signed document to Salesforce, add a separate bot. Configure it to run after the Client step.

1. Click the plus icon and select Bot.

2. Select the Export to Salesforce bot.

3. Click Install bot.

4. Connect the bot to the required Salesforce account.

5. In the Select destination and documents section, under Select a base object, select Account.

6. Under Select documents, select Document placeholder.

7. Make sure that Files and Create new are selected in the Select destination section.

8. Click Continue, then click Apply to save the step.

Step 5. Bot for pre-filling Salesforce record attachments

1. In the bottom right corner, click All bots.

2. Click Add bot, then select the Pre-fill Salesforce record attachments bot.

3. Click Install bot.

4. Connect the bot to the required Salesforce account.

5. Under Select document placeholder, 1 document is selected should be shown.

6. Click Continue, then click Apply to save the step.

7. In the top right corner, click Back to workflow

8. Click Publish at the bottom.Your workflow is now ready.

Create a custom button to launch the workflow from Salesforce

If you are creating a custom button for the first time, please complete the User Permissions setup as described in this article

1. Open Salesforce and go to altaFlow Admin Tools.

2. In the left navigation panel, select Custom buttons and click Create button.

3. Enter a Button label and Description, then click Next to action settings.

4. Under Action, select Run workflow.

5. Under Workflow, select the workflow you created.

6. Under Mode, choose the option that allows the initiator to review documents before sending them.

7. Switch on Select record attachments.

8. Make sure Allowed to proceed without selecting files is switched off. This setting prevents sending without an attached document.

9. Under Select layout and list, choose where the button should appear. In this case, select Account.

10. Click Finish.

The custom button is now set up on the Account layout and ready to trigger the workflow you created.

Did this answer your question?