---
title: "Send a PDF attachment with tags"
url: "https://docs.signnow.com/docs/salesforce-send-attachment-with-tags"
type: "page"
section: "Integrations"
slug: "salesforce-send-attachment-with-tags"
---

# Send a PDF attachment with tags

# Send a PDF attachment with tags from a Salesforce record

## Overview

This use case enables a seamless signing workflow for the document you generated and attached to a Salesforce object. By using SignNow text tags within the generated document, fillable fields are automatically created upon sending, eliminating the need for manual field placement and assignment to specific recipients.

## Scenario

**A sales manager (the document sender):**

- Generates a purchase agreement using the Salesforce CPQ (or other document generation tool) and uploads it to the Opportunity record. This document contains pre-defined SignNow text tags.
- Creates a pre-configured document flow that sends the purchase agreement to the seller and buyer from the Opportunity record by clicking the button.

**Recipients:**

- Receive the email invites.
- Open the purchase agreement.
- Complete the document (by adding their information to the fillable fields converted from text tags and sign the agreement.

## Prerequisites

- SignNow for Salesforce installed and configured.
- A document generation tool (like Salesforce CPQ) capable of outputting PDFs.
- Access to SignNow Admin Tools within Salesforce.

Follow the steps below to configure this setup in Salesforce.

## Step 1. Generate a PDF purchase agreement

Use the Salesforce CPQ (or another document generation tool) to generate a purchase agreement. 

To automate field creation when the document is processed by SignNow, the source PDF must contain text tags. These tags define the type of field, who it is assigned to, its size, and whether it is required. 

Add [text tags](https://support.signnow.com/help-center/editing-documents-templates/new-how-do-i-use-text-tags) to the agreement template to create fillable fields for the seller and buyer.

### Examples of the tags for fillable fields:

| Field type | Tag syntax | Notes |
| :--- | :--- | :--- |
| **Text field** | `{{t:t;r:y;o:"Role name";w:100;h:15;}}` | Required text input. |
| **Signature** | `{{t:s;r:y;o:"Role name";w:100;h:15;}}` | Required signature. |
| **Initials** | `{{t:i;r:y;o:"Role name";w:100;h:15;}}` | Required initials. |
| **Dropdown** | `{{t:d;r:y;o:"Role name";w:100;h:15;dd:"Option1, Option2, Option3";}}` | Dropdown with three options. |
| **Checkbox** | `{{t:c;r:y;o:"Role name";w:100;h:15;}}` | Standard checkbox. |
| **Date** | `{{t:t;r:y;o:"Role name";w:100;h:15;v:"13435fa6c2a17f83177fcbb5c4a9376ce85befeb";}}` | Validates for MM/DD/YYYY. |


> Replace `Role name` with the actual role names you will use in the Document Flow (e.g., "Buyer", "Seller").

That’s how the text tags for fillable fields look in the agreement:

![agreement_tags.png](/reference-assets/images/SignNow_Salesforce/use_case_3/agreement_tags.png)

## Step 2. Upload the generated document to Salesforce record

Once the agreement is ready, the sender (or the automated CPQ process) must attach it to the Opportunity record.

**For manual upload:**

- Select the **Opportunity** > **Notes & Attachments** > **Upload Files**.
- Select the generated agreement.


> 💡 Give the uploaded file a recognizable name. This helps the user select the correct attachment later if multiple files are present on the record.

## Step 3. Create a Document Flow in SignNow

> This configuration should be performed once by the admin.

The **Document Flow** defines the rules for handling the document, including who receives it and what steps the sender needs to take.

- Go to **App Launcher** > **SignNow Admin Tools**.
- Select the **Document Flows** tab > **Create Document Flow** to configure the automated flow for sending the attachment for signature.
- Name the flow and select which steps the [sender can configure](/docs/document-flows#configure-the-senders-experience).

> When naming a document flow, start with the Salesforce object that triggers the flow, followed by the name of the attachment. This approach enables you to quickly identify which flow is linked to a custom button on the Salesforce object and update it as needed.<br><br>For example: `Opportunity - Purchase agreement attachment`

![flow_create.png](/reference-assets/images/SignNow_Salesforce/use_case_3/flow_create.png)

- Customize email invite message.

You can add a custom email subject and message for recipients. Leave these blank to use the system defaults.

- Add recipients

In this scenario, we will add the **Seller** (the current Salesforce user sending the document) and the **Buyer** (a Contact related to the Opportunity).

[Generate tags](/docs/document-flows#pre-fill-recipient-emails-using-tags) to map Salesforce fields (like Contact Email or User Email) to the recipient email addresses.

![recipients_flow.png](/reference-assets/images/SignNow_Salesforce/use_case_3/recipients_flow.png)

> If you choose to hide this step for the sender (making it a fully automated background process), the role names defined in the document MUST exactly match the role names defined here in the Document Flow. If they do not match, the sender will experience an error.<br><br>If the recipients might change unpredictably, we recommend **not hiding this step**, allowing the sender to manually confirm email addresses before sending.

• Click **Save** to save the flow configuration.

## Step 4. Add the Send attachment button to the Opportunity layout

Create a button that will trigger the configured document flow from the Opportunity.

- Go to the **SignNow Admin Tools** > **Custom Links**.
- In the **What should be sent for signature section**, select **File: from the list of files attached to the Salesforce record**.
- Add the document flow you have created in **Step 3**.
- Enter the API name of the object where you want to add the button.

![custom_links.png](/reference-assets/images/SignNow_Salesforce/use_case_3/custom_links.png)

- On the resulting screen, copy the generated c**ustom link URL**. You will need this for the next step.
- Add the button to the object page layout as described [here](/docs/custom-links#add-the-custom-button-to-the-salesforce-object).

## Step 5. Define where to store signed documents

- Go to the **SignNow Admin Tools > Document Storage**.
- Use the toggle to define whether completed documents should be stored in Salesforce.
- Choose whether to keep copies of completed documents in the SignNow account.
- Choose whether the signed document should be downloaded with the Document History.

![document_storage.png](/reference-assets/images/SignNow_Salesforce/use_case_3/document_storage.png)

## Step 6. Explore the user experience

Let’s test the flow and click the button in the Opportunity record.

When a sales manager clicks the **Send the agreement attachment** button in the Opportunity,  SignNow will show a list of *all* attachments found on this Salesforce record.

**Carefully select the exact file you uploaded in Step 2 that contains the text tags.** (Refer to the distinct name you gave it). 

<!-- theme: danger -->
> If you select a different version of the file that does not contain tags, the recipient will receive a flat PDF that they cannot fill out.

![salesforce_send_attachment_with_tags.gif](/reference-assets/images/SignNow_Salesforce/use_case_3/salesforce_send_attachment_with_tags.gif)

As shown on the preview, text tags are converted to fillable fields and assigned to the seller and buyer.

Now you can send the agreement for signature.

## Step 7. Track the signing status

After sending, the status of the document can be tracked directly on the Salesforce record using the [SignNow Invites Status widget](/docs/salesforce-invites-status-widget).

![invite_status_widget.png](/reference-assets/images/SignNow_Salesforce/use_case_3/invite_status_widget.png)

After the document is signed, it will appear attached to the Opportunity record it was triggered from.

The copy of the document may also appear in the sender's personal document storage of SignNow web application. (Check **Document Storage** settings in **Step 5**).


---
*Full page: https://docs.signnow.com/docs/salesforce-send-attachment-with-tags*
