Introduction
Suppose you’re developing an S-Doc template for a contact. Including merge fields for a contact’s name or phone number is pretty straightforward. However, what if you want to include data outside the scope of the contact object, such as the date the document itself was generated? Or, perhaps you find that {{!Contact.Id}} displays an 18-character ID when you’d really like to display a 15-character ID. No problem! To provide you with an increased range of easy-to-use templated data, S-Docs includes a special set of merge fields, shown in the following table.
Special Merge Fields
Merge Field | Rendered Text in Output Document |
{{!DocumentID}} | S-Doc ID of the document you generated (e.g. SD-174; this is not a Salesforce ID). |
{{!DocumentName}} | Name stored in the “Template Name” field on your S-Doc template record detail page. |
{{!DocumentObject}} | Type of Salesforce object that this document was generated for. |
{{!DocumentDate}} | Date that this document was generated. (See Formatting Dates for information on formatting dates in merge fields). |
{{!DocumentDateSOW}} | Start of week date for the document that was just generated. |
{{!DocumentDateEOW}} | End of week date for the document that was just generated. |
{{!DocumentDateTime}} | Date and time that this document was generated. |
{{!DocumentFormat}} | Filetype of this document (PDF, DOC, etc.). |
{{!ObjectId18}} | 18-character ID of the Salesforce record this document was generated for. |
{{!ObjectId15}} | 15-character ID of the Salesforce record this document was generated for. |
{{!UserFirstName}} | First name of the user who generated this document. |
{{!UserLastName}} | Last name of the user who generated this document. |
{{!UserName}} | Full name of the user who generated this document. |
{{!UserOrganizationName}} | Organization name of the user who generated this document. |
{{!UserLoginName}} | Salesforce username of the user who generated this document. |
{{!UserEmail}} | Email address of the user who generated this document. |
{{!UserDepartment}} | Department of the user who generated this document. |
{{{!UserSignature}}} | Salesforce email signature of the user who generated this document. |