This guide is intended for an end-user experience. If you would like to learn how to use the template editor and leverage advanced S-Docs features to create high-quality templates, please refer to the S-Docs Developer's Guide and the S-Docs Cookbook
If you would like to review the setup and configuration for S-Docs, please refer to the S-Docs Quick Install & Config Guide.
Generating and Emailing Documents with S-Docs
In this guide, we will discuss how you can use S-Docs to create documents for a Salesforce object. This object can be a standard object or a custom object; all it requires is that your S-Docs Developer has set up templates and S-Docs buttons for your object.
Go to an object that meets the above criteria, and then go to any record you would like to generate documents for. As an example, we selected the Contact object, and we will generate documents for the Paul Allen Contact record. Click the “S-Docs” button at the top of your page.
Now, select the documents you would like to generate for this contact. Then, click “Next Step” at the bottom of the page. In this example, we will be creating a golf invitation and an account summary for Paul Allen.
After clicking “Next Step”, the documents are generated and you are given a list of the generated documents. To download a document, find the name of the document you want to download under “Document Name” and click the Document Number to the left of it. To email documents, check the boxes of the documents that you would like to email and click “Email Selected Docs”. If you would like to add a comment to that document, find the name of the document you want to add a comment to under “Document Name” and click the Add button to the right of it.
In our example, we added a comment to our golf invitation, and we unchecked the account summary because we would like to email the golf invitation by itself. Note that we can click SD-108 to download the account summary document or SD-109 to download the golf invitation. We would like to email Paul Allen the golf invitation, so our next step is to click “Email Selected Docs”.
From here, you can email documents or you can click “<< Back” to return to the page of the record you just used to generate documents.
Clicking “Email Selected Docs” opens the Email Documents page. Note that the docs you select are automatically included as attachments to the email. You can click the name of an attachment and it will download to your computer. In our example, we see that Paul Allen’s golf invitation is included as an attachment.
If you would like to add more attachments to the email, click the “Attach a file” button. In the resulting pop-up, click one of the boxes under “Attach” to attach (or detach) a particular document to your email. Note that there are three tabs: the S-Docs tab contains all the documents ever generated for this record, the attachments tab allows you to upload attachments from your computer, and the documents tab allows you to attach files stored in the documents folder in your production org. The pop-up will close after each selection; click “Attach a file” again if you would like to attach (or detach) more files.
To choose recipients, select an email address from the Contact Quick Pick drop-down menu, or search for a Contact’s email address in the Contact/User Lookup field. If you search for and select a Contact, their email address will be added to the To field, as well as the Contact Quick Pick list. Feel free to move these email addresses to CC or BCC, and type in a subject and a body as you would a normal email.
Alternatively, if you know the email addresses of the people you’d like to send the document(s) to, you can just type them into the To, CC, and BCC fields. However, if you type in an email address that is not listed under any Contact record in your org, this may not work. 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 "email@example.com". 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.
Here is how a completed email page might appear. Click “Send” to send the email.
After generating or emailing documents, you will return to the page for the record you just generated documents for.
Notice the S-Docs related list at the bottom of the page; the documents we just generated in our example are now in this related list. We can click the icons in the “View” or “Email” columns to download or email these documents.
Note that generating multiple documents with the same template for the same record will not result in these documents being overwritten; in our Paul Allen example, if we were to generate the golf invitation 10 more times, there would be 11 different golf invitation documents in the S-Docs table on the Paul Allen page. We could delete some of these by clicking “Del” under the Action column.
If “Auto Create Attachment” is checked on our template’s page, our generated document will be included in the Notes & Attachments related list. We can click “View” to download and view a document in this list.
Additionally, note that if the auto-create attachment box is not checked, documents in the S-Docs related list will be regenerated each time they are opened. For example, if this box was not checked for an account summary template, and you opened an account summary document from 6 months ago, the document would be regenerated and the current account info would be displayed, rather than the account info from 6 months ago.
We see that this box is checked for the account summary template, but not the golf invitation template. Thus, only the account summary document appears in the Notes & Attachments related list.
Note. On newer versions of S-Docs, the "Auto-create Attachment" checkbox can be found in the "Document Options" tab of the template editor. On older versions, this checkbox will appear on the S-Docs Template record detail page, as in the screenshots below.
Note that the email we sent earlier is saved in the Activity History related list.
Opening it up reveals that this email is stored as a task.
Note that when we generated our documents for Paul Allen earlier, there was a pencil under the “Edit” column in the row containing the account summary document. We can click this pencil to edit the document that has just been created.
This pencil does not appear for the golf invitation document. This is because we have checked the “Allow Edit” box for the account summary template, but not for the golf invitation template.
Clicking this pencil opens an editor for that document. We can make any changes we want to the document, and click “Save” to save these changes.
Note that even though our account summary document was generated as a PDF, a document that cannot normally be edited, S-Docs provides the power to allow editing at this step nonetheless.