This quick installation & basic configuration guide will teach you how to create and email a custom document in Salesforce Classic in 4 basic steps:

  1. Install S-Docs
  2. Create your first template and associate it to an object
  3. Add an S-Docs button to your object's page layout
  4. Generate and email your first document

To view this article for Salesforce Lightning Experience, click here.

STEP 1: Install S-Docs

NOTE: You should download and install the S-Docs package into a SANDBOX or DEVELOPER organization. We strongly advise against installing it into any production org without proper testing.

You can watch the video above or follow the instructions below to install S-Docs.

      1. Navigate to our Salesforce AppExchange listing and click Get it Now.
      2. You will be prompted to log into your Salesforce org.
      3. Once you are logged in, you'll be given the option to install S-Docs in your production org or a sandbox instance. We highly recommend testing in a sandbox instance before installing in your production org.
      4. Confirm your profile details, agree to the terms and conditions, and click Confirm and Install.
      5. You'll then see the following screen. Make sure to select Install for All Users and then click Install.

Congratulations! S-Docs is now installed in your org.

STEP 2:  Configure Your First Template

In order to start using S-Docs, you need to configure and activate at least one template. Start by navigating to the S-Docs templates page by clicking All Tabs ("+" sign), scrolling down, and clicking S-Docs Templates.

This page is where all of your templates will appear. To create a new template, click New.

This is the template creation page. In this example, we will create a product information sheet from the Product object. Each field is explained below the screenshot.

Template Name: Enter a template name. This field is required.
Description: Optionally add a description. You should include any keywords that will be useful when searching for this template, because this field and the name field are searched during the document selection step. End users will see this field in the template listings.
Document Category: Optionally chose a category from the picklist. Templates can be grouped together so that a user can browse templates by using a category picklist. If needed, you can later customize this picklist.
Related to Type: Pick an object from the picklist. This is the base or primary object this template will use. If needed, you can customize this list with your custom objectsThis field is required.
Template Format: Pick an output format. To support the same document in multiple formats, simply clone the template with a different "Format" field value. This field is required.
Document Version: Optionally use this field to track any internally used version number (or date) for this template. This is only for reference purposes.
Available for Use: Keep this box checked (it is checked by default). This ensures that the template is visible for new document creation.
Initially Visible: Keeping this box checked (it is checked by default) will make this template visible on initial load of the document creation page based on the object type. Typically, you want to set this checkbox for the 10 most used templates for each object type.
Allow Edit: If you want users to be able to edit this document after it has been generated, check this box. You can read more about this feature here.
NOTE: On older versions of S-Docs, this page will also have an "Auto-create Attachment" checkbox (this is found in the "Document Options" tab of the template editor on newer versions, and is checked by default). This saves documents as attachments in the "Notes & Attachments" related list each time a document is generated.

Once you've filled in all of the values to your specifications, click Save. The template is now ready to be edited. Click the Template Editor button to design your template.

Note: This is a very basic overview of the template editor. For a more in-depth explanation, click here.

This is the WYSIWYG template editor (What You See Is What You Get). Add some text, place the cursor where you want your Salesforce record data to be merged into the template, and then click on the Insert field button.

Select the field from the object you want to insert and click Insert.  The editor will add the merge field in the correct syntax into the template editor.

Repeat the above step for other fields.  You can also use the editor tools to modify the document. Or, click Source to view the HTML and add your own styles; the customization options are endless! Click Save when done.

You have now created your first template!

NOTE: You can also insert images, span related objects and create child object line items and add CSS stylesheets. Click here for an in-depth explanation of the template editor, or click here to read about advanced template editor features.

STEP 3: Add An S-Docs Button To Your Object’s Page Layout

This section details setting up your S-Docs button for a standard object in Salesforce Classic. Although the setups are fairly similar, please reference this documentation as well for more information regarding S-Docs in Salesforce Lightning, and please refer to this documentation for more information on setting up S-Docs with a custom object.

The S-Docs button comes pre-created for the following standard objects: Contract, Opportunity, Account, Contact, Lead, Task, and Event. For these objects, you only need to add the button to the page layout. Skip to step 3 to learn how to do this. For other standard objects, such as products, you will need to create a custom button. In this example, we will be creating the button for the Product object. Navigate to Setup > Build > Customize > Products > Buttons, Links, and Actions.

Click New Button or Link to add a new button.

Fill in the following information for your button.
Button Label & Name: Choose a name for your button. We'll call it "S-Docs" here.
Description: Optionally add a description for your button, such as "Create documents for this object."
Display Type: Detail Page Button
Behavior: Display in existing window with sidebar (recommended)
Content Source: URL
Button URL: /apex/SDOC__SDCreate1?id={!Product2.Id}&Object=Product2

Note: Be sure to replace both instances of "Product2" with the name of your object in this URL.
To read about how you can customize this button to allow for one or zero click automation, click here.

Once you save this button, you'll need to add it to the detail page layout for your object. Navigate to an object record and click Edit Layout.

Click Buttons. The S-Docs button that you just created will appear in this menu. Click and drag it into the "Custom Buttons" square in the Product Detail section. Click Save when done.

Additionally, you should add an S-Docs Related List to your page by clicking Related Lists and dragging the S-Docs box down into the Related Lists table.

The S-Docs Related List on a given record should display all of the S-Docs ever generated* for that record, as well as options to download and email those documents again. In order to display this, we need to add these columns to our Related List. Click the wrench icon on the S-Docs related list.

Then, add the following categories: Action, View, Email, Edit, Name, Category, Status, Comments, Doc Created By, Doc Created On. To add a category, click on the category you wish to add and then click the triangle button below "Add."

The field will be moved to the “Selected Fields” box, which contains all the fields that will display as columns in your final related list. Click OK once you’ve added all of your fields. The related list will appear as follows on a particular record’s page.

Note: each time you edit an S-Doc template record with Auto Create Salesforce Attachment and link to record unchecked, the documents on the related list will change to reflect those edits. The related list will not store documents generated from previous versions of your templates, but rather generate a new document reflecting the most recent version of your template each time you view or email a document in this list.

Step 4: Generate And Email Your First Document

Open any record for your object and click the S-Docs button you just created.

The template you created earlier will appear. (If it doesn't, make sure you’ve checked the Available for Use and the Initially Visible checkboxes when you created your template. Additionally, make sure you set "Related to Type" to the object you're using.) Select the template and click Next Step.

The document will be generated. You can click on the "View" link or the document number to view or download your document. Click Email Selected Docs to bring up the email page for emailing the document.

You can edit all of the normal email fields on the email page, as well as the body of the email itself. The document you just generated is automatically added as an attachment to the email. To learn more about how to create custom email templates that automatically fill these fields in for you, click here.

Click Send when done. You have now created and emailed your first document with S-Docs!

Email Failure Troubleshooting

If you did not receive an email, or if you experience any failed email delivery, it may be due to the S-Docs package not being able to create a dummy contact record used for email delivery. By default, S-Docs will link outbound emails to the contact record with a matching email address. Salesforce requires this linkage. If you send an email to an unknown email address, S-Docs will attempt to link it to a single dummy contact record called "No Contact." This contact record is created just once by the S-Docs package to handle this linkage and is done automatically during the first send request to an unknown email address. However, if your org has implemented validation rules that require additional fields to be completed, then the S-Docs package will not be able to create this contact record, and you should do it manually. The contact record should named "No Contact Record" and must have an email address of "" This record only needs to be created once.

If you are testing S-Docs in a sandbox org and emails are not being delivered, you should check Settings > Email Administration > Deliverability, and check that "Access to Send Email" is set to "All email." By default, Salesforce turns off outbound email access when a sandbox is created to reduce the risk of inadvertently sending emails to contacts during development and testing. Be aware that this change effects the entire sandbox and not just S-Docs.